__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/22012924
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int setNumberOfGroups (int type, int nr){ if(type < 0 || nr <0) return -1; if(type < numberOfGroups.length){ int ret = numberOfGroups[type]; numberOfGroups[type] = nr; return ret; }else{ int aux[] = new int[type+1]; for(int i=0; i<aux.length; i++) aux[i] = 0; System.arraycopy(numberOfGroups,0,aux,0,numberOfGroups.length); aux[type] = nr; numberOfGroups = aux; return 0; } } COM: <s> sets the numberofgroups for type t </s>
funcom_train/5398976
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Message getMessage(int messageCode, String lang) { Message message; if (lang != null && lang.trim().length() > 0) { message = messages.getMessage(messageCode, lang); } else { message = messages.getMessage(messageCode); } return message; } COM: <s> method get message returns the message for given code and language </s>
funcom_train/34341451
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getCodigoArticulo1() { if (CodigoArticulo1 == null) {//GEN-END:|48-getter|0|48-preInit // write pre-init user code here CodigoArticulo1 = new TextField("CodigoArticulo1 ", null, 5, TextField.ANY);//GEN-LINE:|48-getter|1|48-postInit // write post-init user code here }//GEN-BEGIN:|48-getter|2| return CodigoArticulo1; } COM: <s> returns an initiliazed instance of codigo articulo1 component </s>
funcom_train/51167094
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Map handlePropertyMap(Map propertyMap) { if (propertyMap != null) { Hashtable undo = new Hashtable(); Iterator it = propertyMap.entrySet().iterator(); while (it.hasNext()) { Map.Entry entry = (Map.Entry) it.next(); GraphCell cell = (GraphCell) entry.getKey(); undo.put(cell, GraphConstants.cloneMap(getAttributes(cell))); Map map = (Map) entry.getValue(); cell.setAttributes(map); } return undo; } return null; } COM: <s> applies code property map code to the model </s>
funcom_train/17711634
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getPanel_Available() { if (panel_Available == null) { panel_Available = new JPanel(); panel_Available.setLayout(new BorderLayout()); panel_Available.add(getPanel_AvailableTop(), BorderLayout.NORTH); panel_Available.add(getJScrollPane1(), BorderLayout.CENTER); } return panel_Available; } COM: <s> this method initializes panel available </s>
funcom_train/9271646
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeBytes(byte[] b) throws IOException { try { String clobStr = new String(b, "ISO-8859-1"); clob.setStringX(currentPos, clobStr, 0, clobStr.length()); currentPos += b.length; } catch (SqlException ex) { IOException ioEx= new IOException(); ioEx.initCause(ex); throw ioEx; } } COM: <s> write the code byte code to the code clob code value on </s>
funcom_train/1431277
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Filter getFilterPost() { if (otherRestrictions.isEmpty()) { return Filter.INCLUDE; } else if (otherRestrictions.size() == 1) { return (Filter) otherRestrictions.peek(); } else { return new FilterFactoryImpl().and(otherRestrictions.subList(0, otherRestrictions.size() - 1)); } } COM: <s> return the non bbox part 2 of original filter </s>
funcom_train/3740298
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void changeRealLifeRole(User who, User user, String realLifeRole) throws UserManagerException { if (!mayChangeInfo(who,user)) throw new UserManagerException(); try { Session sess = HibernateUtil.currentSession(); Transaction trans = sess.beginTransaction(); user.setRealLifeRole(realLifeRole); sess.saveOrUpdate(user); trans.commit(); } catch (HibernateException e) { throw new UserManagerException(); } } COM: <s> change real life role attribute of the given user </s>
funcom_train/5244503
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initAg() throws AILexception { // set the agent try { if (! Is.isEmpty()) { //setIntention(getIntentions().poll()); setIntention(getIntentions().remove(0)); } // getPL().init(this); } catch (Exception e) { throw new AILexception("Error creating the agent class! - " + e); } } COM: <s> transforms the initial beliefs into a belief base and the initial goals </s>
funcom_train/50370021
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addDir(String logicalFileName, String DSmsId) throws Exception { logger.trace("Calling catalogue service at: " + getEPR().getAddress().getStringValue()); Catalogue cat = makeProxy(Catalogue.class); AddDirectoryDocument in = AddDirectoryDocument.Factory.newInstance(); in.setAddDirectory(new LogicalFilename(logicalFileName, DSmsId).getLogicalFilename()); cat.AddDirectory(in); } COM: <s> creates new directory </s>
funcom_train/8485530
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNonExistentMethod() { try { // invokes foo(1) => error atTestObject.impl_invoke(atTestObject, AGSymbol.jAlloc("foo"), NATTable.atValue(new ATObject[] { NATNumber.ONE })); fail("Expected a selector not found exception"); } catch (XSelectorNotFound e) { // success: expected exception } catch (InterpreterException e) { fail(e.getMessage()); } } COM: <s> invokes a method that is not defined in the class </s>
funcom_train/42180370
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setNewHomeWallHeight(float newHomeWallHeight) { if (this.newHomeWallHeight != newHomeWallHeight) { float oldHomeWallHeight = this.newHomeWallHeight; this.newHomeWallHeight = newHomeWallHeight; this.propertyChangeSupport.firePropertyChange(Property.NEW_HOME_WALL_HEIGHT.toString(), oldHomeWallHeight, newHomeWallHeight); } } COM: <s> sets default wall height of new home walls and notifies </s>
funcom_train/9709794
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addMessageContext(MessageContext mc) throws AxisFault { if (this.mc != null) { throw new AxisFault(Messages.getMessage("cannotaddmsgctx")); } this.mc = mc; if (mc.getMessageID() == null) { setMessageID(mc); } mc.setServiceContext(sc); axisOp.registerOperationContext(mc, oc); this.completed = false; } COM: <s> adds a message context to the client for processing </s>
funcom_train/42612397
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void import_selected() { setMouse(Cursor.WAIT_CURSOR ); enableActions(false); SwingWorker worker = new SwingWorker() { @Override public Object construct() { logger.finest("call Importer"); importer=new Importer(importdata, textfield_source.getText()); importer.run(); // run() not start() because SwingWorker create Thread return true; } @Override public void finished() { importer=null; logger.finest("Importer finished"); setMouse(Cursor.DEFAULT_CURSOR); enableActions(true); } }; logger.finest("start SwingWorker"); worker.start(); } COM: <s> create importer and start it in new thread </s>
funcom_train/28596295
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String processEscapes(String str) { return str.replaceAll("\\\\\\\\\\\\", "&#92;") .replaceAll("\\\\\"", "&#34;") .replaceAll("\\\\'", "&#39;") .replaceAll("\\\\\\.", "&#46;") .replaceAll("\\\\-", "&#45;") .replaceAll("\\\\`", "&#96;"); } COM: <s> return the string with after processing the following backslash escape sequences </s>
funcom_train/18548722
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void remove(Vector<ResourceTaskTO> v, Connection c) throws DataAccessException { if (v!=null){ Iterator<ResourceTaskTO> i = v.iterator(); while (i.hasNext()){ ResourceTaskTO rtto = i.next(); this.remove(rtto, c); } } } COM: <s> remove a list of resource task objects from data base </s>
funcom_train/10590839
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void send() throws AddressException, MessagingException { SourceResolver resolver = null; try { resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE); doSend(resolver); } catch (ServiceException se) { throw new CascadingRuntimeException("Cannot get Source Resolver to send mail", se); } finally { this.manager.release(resolver); } } COM: <s> assemble the message from the defined fields and send it </s>
funcom_train/43631848
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void releasedMouse(java.awt.event.MouseEvent evt) { Iterator <Object>i = objects.iterator(); Object o = null; // unselect all while(i.hasNext()) { o = i.next(); if(o.isSelected()) { selected = o; break; } } if( o == null) return; o.doReleased(); updatePropEditor(); } COM: <s> called when the mouses button is released </s>
funcom_train/26514761
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean resolve(Bindings b) { String attribute; ValueFunction value; Enumeration enum = data.keys(); while( enum.hasMoreElements() ) { attribute = (String)enum.nextElement(); value = (ValueFunction)data.get(attribute); if ( (value = value.resolve(b)) == null ) return false; data.put(attribute,value); } return true; } COM: <s> this seems to be called when rete is trying to process </s>
funcom_train/44777708
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean remove(DBElement element) { if (element == null) { return false; } Object value = element.getProperty(myProperty); ValueTreeNode node = (ValueTreeNode) myValueTreeNodes.get(value); if (node != null) { return node.remove(element); } else { return false; } } COM: <s> removes given element from this node down </s>
funcom_train/28643069
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void info(Object msg, Throwable t) { if(isEnabled(LEVEL_INFO)) { msg = '[' + LEVELS[LEVEL_INFO] + ']' + String.valueOf(msg) + '\n'; write(LEVEL_INFO, String.valueOf(msg)); write(LEVEL_INFO, tools.getStackTrace(t)); } } COM: <s> write info message </s>
funcom_train/26068531
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void resetDirty(T o) { Method methods[] = o.getClass().getMethods(); try { for(int i = 0; i < methods.length; i ++) { if(methods[i].getName().equals("resetDirty")) { methods[i].invoke(o); } } } catch(IllegalArgumentException e) { throw new RuntimeException(e); } catch(IllegalAccessException e) { throw new RuntimeException(e); } catch(InvocationTargetException e) { throw new RuntimeException(e); } } COM: <s> looks for an optional reset dirty method on the object and invokes it </s>
funcom_train/32353529
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected GPXBounds parseBounds(final XMLNode node) { if (node != null) { final String nodeName = node.getName(); if (nodeName.equals(TAG_BOUNDS)) { final double minlat = parseDouble(node .getAttribute(ATTRIBUTE_MINLAT)); final double maxlat = parseDouble(node .getAttribute(ATTRIBUTE_MAXLAT)); final double minlon = parseDouble(node .getAttribute(ATTRIBUTE_MINLON)); final double maxlon = parseDouble(node .getAttribute(ATTRIBUTE_MAXLON)); final GPXBounds bounds = new GPXBounds(minlat, minlon, maxlat, maxlon); return bounds; } } return null; } COM: <s> parse the gpx bounds </s>
funcom_train/39909985
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCreateExamBundle() throws Exception { ExamBundle bundle = null; bundle = service.createExamBundle(ExamService.EXAM_TYPE_ADDITION, 1); assertNotNull("Bundle is NULL", bundle); assertNotNull("ID is NULL", bundle.getId()); assertNotNull("Exam location is NULL", bundle.getExamLocaion()); assertTrue("not a dir", new File(bundle.getExamLocaion()).isDirectory()); System.out.println(bundle); } COM: <s> test create exam bundle </s>
funcom_train/38388273
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CallableStatement prepareCall() throws SQLException { // prepare the statement CallableStatement statement = null; try { // build the full call syntax String sqlString = toSql(); statement = cursor.connection.connection.prepareCall(sqlString); // prepare the OUT parameters registerOutParameters(statement); } catch (SQLException e) { if (statement == null) { try { statement.close(); } catch (Exception ex) {} } throw e; } return statement; } COM: <s> prepares the statement and registers the out inout parameters if any </s>
funcom_train/25657363
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRelevanceBinning() { ModelIndexSearcher searcher = (ModelIndexSearcher)modelIdxSearcher; float[] range = searcher.relevanceRange(); assert(range.length == 4); assert(Math.abs(range[0] - 1) < epsilon); assert(Math.abs(range[1] - 7) < epsilon); assert(Math.abs(range[2] - 9) < epsilon); assert(Math.abs(range[3] - 10.2) < epsilon); } COM: <s> test if relevance binning is fuctional </s>
funcom_train/18662044
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateApplicationTitleEDT( final String newTitle ) { if ( SwingUtilities.isEventDispatchThread() ) { updateApplicationTitle( newTitle ); } else { Runnable r = new Runnable() { @Override public void run() { updateApplicationTitle( newTitle ); } }; SwingUtilities.invokeLater( r ); } } COM: <s> this method calls the </s>
funcom_train/9653671
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void afterComplete(ProcessInstance instance) throws Exception{ setEndTime(instance, GlobalContext.getNow(instance.getProcessTransactionContext())); ActivityFilter[] activityFilters = getProcessDefinition().getActivityFilters(); if(activityFilters!=null) for(int i=0; i<activityFilters.length; i++) activityFilters[i].afterComplete(this, instance); //add completed activity to transaction history. instance.getProcessTransactionContext().addExecutedActivityInstanceContext(new ActivityInstanceContext(this, instance)); // } COM: <s> this callback method would be called just after the fire completed method </s>
funcom_train/13383947
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void sendUpdateDebateInfoRequest(){ UpdateDebateInfoRequest request = new UpdateDebateInfoRequest(debate, debate.identifier); IServerResponse response = ClientController.instance().process(request); if(response.isPositive()) ; else MessageDialog.openError(getSite().getShell(), Messages.getString("DebateView.88"), response.getMessage()); //$NON-NLS-1$ } COM: <s> updates the graph information display with info about the specified graph </s>
funcom_train/24428907
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stopPlease() { if (logFileReader != null && logFileReader.isAlive()) { logFileReader.stopPlease(); while (logFileReader.isAlive()) { try { logFileReader.join(250); } catch (final InterruptedException e) { // do nothing } } logFileReader = null; } } COM: <s> try to stop file loading </s>
funcom_train/26281681
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void selectEllipse(double x, double y, double width, double height) throws JGimpException { this.selectEllipse(x, y, width, height, JGimpSelectionMode.REPLACE, true, false, 0.0); } COM: <s> sets the selection to an ellipse with antialiasing but no feathering </s>
funcom_train/5377675
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BundleFile createBaseBundleFile(File basefile, BundleData bundledata) throws IOException { BundleFile base = createBundleFile(basefile, bundledata); if (System.getSecurityManager() == null || !supportSignedBundles) return base; SignedBundleSupport support = getSignedBundleSupport(); if (support == null) return base; SignedBundle signedBundle = support.createSignedBundle(); signedBundle.setBundleFile(base); return signedBundle; } COM: <s> creates a base bundle file for a bundle </s>
funcom_train/14274687
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void renameVFSFile(VolumeReference volRef, String oldFilename, String newFilename) throws ConduitHandlerException, NotConnectedException { try { jHotSync.renameVFSFile(volRef, oldFilename, newFilename); } catch (DLPFunctionCallException e) { throw new ConduitHandlerException(e.toString(), e); } } // end-method COM: <s> rennames the specified vfs file to the newly specified name </s>
funcom_train/16327930
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDocContent(JMDDocument content) { document.setContent(content); document.addAttributes(editorSettings); document.setPosition(new Vector3D(JMDEditorDrawingArea.DEF_WIDTH * 0.5 * viewMagnification, JMDEditorDrawingArea.DEF_HEIGHT * 0.5 * viewMagnification, 0.0)); drawingArea.centerViewport(); activateSelectTool(); undoManager.clear(); document.fireDocumentEvent(); } COM: <s> sets the new code jmddocument code that this code jmdeditor pane code </s>
funcom_train/33931240
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCollation() { String[] strings = { "中华", "人民", "共和国" }; Locale locale = Locale.getDefault(); Collator collator = Collator.getInstance(locale); int compare = collator.compare(strings[0], strings[1]); assertFalse(compare == 0); Arrays.sort(strings, collator); for (String s : strings) { System.out.println(s); } } COM: <s> unfortunately unless all your words are in uppercase english ascii </s>
funcom_train/17475012
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Map getRequestMapForHttpMethod(String method) { if (method == null) { return requestMap; } if (!HTTP_METHODS.contains(method)) { throw new IllegalArgumentException("Unrecognised HTTP method: '" + method + "'"); } Map methodRequestmap = (Map) httpMethodMap.get(method); if (methodRequestmap == null) { methodRequestmap = new LinkedHashMap(); httpMethodMap.put(method, methodRequestmap); } return methodRequestmap; } COM: <s> return the http method specific request map creating it if it doesnt </s>
funcom_train/21727870
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void drawExplosion(Graphics g, Explosion e) { int x = e.getTexture().getImage().getHeight() / 2; int y = e.getTexture().getImage().getWidth() / 2; g.drawImage(e.getTexture().getImage(), (int) e.getPosition().getX() - x, (int) e.getPosition().getY() - y, null); } COM: <s> draws an explosion </s>
funcom_train/22279242
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Range selectedRange() { if( _selectedRange == null ) _selectedRange = allocateRange(); _selectedRange.index = _selection.selectionStart(); if( _selectedRange.index < 0 ) return allocateRange(); _selectedRange.length = _selection.selectionEnd() - _selection.selectionStart(); return _selectedRange; } COM: <s> returns the selected range </s>
funcom_train/1110587
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean intersects(JGraph graph, Rectangle2D rect) { boolean intersects = super.intersects(graph, rect); if (!isLeaf()) { return intersects; } else if (intersects) { Rectangle r = new Rectangle((int) rect.getX(), (int) rect.getY(), (int) rect.getWidth(), (int) rect.getHeight()); return getEdgeRenderer().intersects(graph, this, r); } return false; } COM: <s> returns true if this view intersects the given rectangle </s>
funcom_train/1209280
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isGetterOrSetter(String name, int index, boolean setter) { Slot slot = getSlot(name, index, SLOT_QUERY); if (slot instanceof GetterSlot) { if (setter && ((GetterSlot)slot).setter != null) return true; if (!setter && ((GetterSlot)slot).getter != null) return true; } return false; } COM: <s> returns whether a property is a getter or a setter </s>
funcom_train/36230716
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { if (!(obj instanceof ComplexPolygon)) { return false; } ComplexPolygon that = (ComplexPolygon) obj; if (this.isHole()!= that.isHole()) return false; if (!this.m_List.equals(that.m_List)) return false; return true; } COM: <s> return true if the given object is equal to this one </s>
funcom_train/35714356
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Color getColor(ILineDiffInfo info) { Assert.isTrue(info != null && info.getChangeType() != ILineDiffInfo.UNCHANGED); Color ret= null; switch (info.getChangeType()) { case ILineDiffInfo.CHANGED: ret= getShadedColor(fChangedColor); break; case ILineDiffInfo.ADDED: ret= getShadedColor(fAddedColor); break; } return ret == null ? getBackground() : ret; } COM: <s> returns the color for the given line diff info </s>
funcom_train/51610075
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { String res = op[1].toString(); if(!(op[1] instanceof MathsSet)) res=LEFT_BRACKET+res+RIGHT_BRACKET; if(!(op[0] instanceof MathsSet)) return LEFT_BRACKET + op[0].toString() + RIGHT_BRACKET +" "+INTERSECTION_SIGN+" " +res; else return op[0].toString()+" "+INTERSECTION_SIGN+" " +res; } COM: <s> returns a latex representation of this intersection </s>
funcom_train/49430944
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addActionMapping(String action, String methodName, Object ... params) { if(actionMap == null) { actionMap = new ActionMap(); } actionMap.addMapping(action, this, methodName, params, ActionMap.FLAG_ON_PRESSED); } COM: <s> installs an action mapping for the given action in the current action map </s>
funcom_train/8662783
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDefaultValue(MemberValue value) { ByteArrayOutputStream output = new ByteArrayOutputStream(); AnnotationsWriter writer = new AnnotationsWriter(output, constPool); try { value.write(writer); writer.close(); } catch (IOException e) { throw new RuntimeException(e); // should never reach here. } set(output.toByteArray()); } COM: <s> changes the default value represented by this attribute </s>
funcom_train/40771086
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SortState getSortState() { JavaScriptObject sortState = getSortState(getJsObj()); return new SortState(JavaScriptObjectHelper.getAttribute(sortState, "field"), SortDir.getValue(JavaScriptObjectHelper.getAttribute(sortState, "direction"))); } COM: <s> returns the sort state of the store </s>
funcom_train/4259420
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendMessage( RasipUser user, String msg ) throws RasipException { System.out.println("sendMessage( RasipUser user, String msg "); //getClient(user.getCompleteURI()).sendInvite( user.getUsername(), msg ); getClient(user.getCompleteURI()).sendMessage( RasipUser.getLocalUser().getCompleteURI(), msg ); } COM: <s> invia il messaggio </s>
funcom_train/1355893
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void putVariable(String name, Object val) { try { mgr.declareBean(name, val, Object.class); log.debug("Variable with name=" + name + ", value=" + val + " added to script engine."); } catch (BSFException e) { throw new ScriptingException("Error while registering variable for Bsf Engine: " + e.getMessage()); } } COM: <s> use this method to add variables that will be exposed and made </s>
funcom_train/46989210
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void toggleDeletePopup(javax.faces.event.ActionEvent event) { if (deleteCommentLink.getAttributes().get("commentId") != null) { flaggedCommentId = new Long(deleteCommentLink.getAttributes().get("commentId").toString()); } showDeletePopup = !showDeletePopup; actionComplete = false; } COM: <s> toggle delete popup </s>
funcom_train/4111378
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element getMetaElement(String name) { for (int i = 0; i < MetaData.size(); i++) { if (MetaData.get(i).hasAttribute("name") && MetaData.get(i).getAttribute("name").equals(name)) { return MetaData.get(i); } } return null; } COM: <s> returns the requested element </s>
funcom_train/7508536
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetRoles() throws AuthenticationException { System.out.println("setRoles"); DefaultUser user = createTestUser("setRoles"); user.addRole("user"); assertTrue(user.isInRole("user")); Set set = new HashSet(); set.add("rolea"); set.add("roleb"); user.setRoles(set); assertFalse(user.isInRole("user")); assertTrue(user.isInRole("rolea")); assertTrue(user.isInRole("roleb")); assertFalse(user.isInRole("ridiculous")); } COM: <s> test of set roles method of class org </s>
funcom_train/26335798
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void floodNoSpecials( int x, int y ) { // init fill map this.fill = new int[width][height]; for( int j = 0; j < height; j++ ) for( int i = 0; i < width; i++ ) this.fill[i][j] = -1; this.fillSize = 0; this.doFlood( x, y, x, y, 0, true ); } COM: <s> flood fill dont mind special tiles </s>
funcom_train/40926410
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void goUrl(Object url) { String u = (String) getProperty(url, "url"); if (u == null) return; try { BrowserLauncher.openURL(u); } catch (Exception e) { e.printStackTrace(); showStatus(e.getMessage()); } } COM: <s> open url in the system default browser </s>
funcom_train/43808862
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private PrimitiveType getPrimitiveType(Primitive primitive) { if (primitive == null) return null; for (PrimitiveType pt : system.getPrimitiveType()) if (pt.getPrimitive().equals(primitive)) return pt; PrimitiveType t = ModelFactory.eINSTANCE.createPrimitiveType(); t.setName(primitive.getName()); t.setDescription("Primitive type enclosure for primitive " + primitive.getName()); t.setSystem(system); t.setPrimitive(primitive); return t; } COM: <s> get the possibly cached primitive type corresponding to the given </s>
funcom_train/23044613
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addActorPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_AsyncActivity_actor_feature"), getString("_UI_PropertyDescriptor_description", "_UI_AsyncActivity_actor_feature", "_UI_AsyncActivity_type"), ConceptPackage.Literals.ASYNC_ACTIVITY__ACTOR, false, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the actor feature </s>
funcom_train/19323208
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getHyphenate(final FObj fobj, final FoContext context) { final PdHyphenate property = (PdHyphenate) getProperty( FoProperty.HYPHENATE); if (property != null) { return property.getValue(context, fobj); } return PdHyphenate.getValueNoInstance(context, fobj); } COM: <s> returns the hyphenate property </s>
funcom_train/36861244
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RSInterfaceChild getInventoryInterface() { if (getInterface(INVENTORY_COM_X).isValid()) return RSInterface.getChildInterface(INVENTORY_COM_X, INVENTORY_COM_Y); // Tab needs to be open for it to update it's content -.- if (getCurrentTab() != TAB_INVENTORY) { openTab(TAB_INVENTORY); wait(random(900, 1500)); } return RSInterface.getChildInterface(INVENTORY_X, INVENTORY_Y); } COM: <s> gets the inventory interface accessor </s>
funcom_train/21955458
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean checkConnection() { if (testAddress != null && testPort > -1) { try { Socket testSocket = new Socket(testAddress, testPort); testSocket.close(); return true; } catch (Exception e) { return false; } } // if there's no test case, assume that we're ok. return true; } COM: <s> p checks this connection to see if its actually up </s>
funcom_train/11415641
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AuthorizationPolicy getEffectiveAuthPolicy(Message message) { AuthorizationPolicy authPolicy = getAuthorization(); AuthorizationPolicy newPolicy = message.get(AuthorizationPolicy.class); AuthorizationPolicy effectivePolicy = newPolicy; if (effectivePolicy == null) { effectivePolicy = authPolicy; } if (effectivePolicy == null) { effectivePolicy = new AuthorizationPolicy(); } return effectivePolicy; } COM: <s> determines effective auth policy from message conduit and empty default </s>
funcom_train/29711394
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean atEdge(IDOMPosition position, boolean forward) { Node node = position.getContainerNode(); int offset = position.getOffset(); if (forward) { if (EditModelQuery.isText(node)) { return offset == node.getNodeValue().length(); } else { return offset == node.getChildNodes().getLength(); } } else { return offset == 0; } } COM: <s> determine whether the position is at nodes edge </s>
funcom_train/36811691
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setElement(int i, int j, double value) { if (i != j) { throw new ArrayIndexOutOfBoundsException("cannot separately set" + " elements out of diagonal" + " in a symetrical matrix"); } super.setElement(i, j, value); } COM: <s> set a matrix element </s>
funcom_train/37206660
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAttribute(String datasetName, Attribute attribute) { if (!query.containsDataset(datasetName)) { Dataset dataset = new Dataset(datasetName); if (datasetName.equals(martDataset.getName())) { query.addDataset(0, dataset); } else { query.addDataset(dataset); } } Dataset dataset = query.getDataset(datasetName); dataset.addAttribute(attribute); } COM: <s> adds an attribute to the dataset with the given dataset name </s>
funcom_train/7904097
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void requestStillImage() { if (gpsLogger.isTracking()) { File imageFile = pushImageFile(); if (null != imageFile) { Intent cameraIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(imageFile)); startActivityForResult(cameraIntent, TrackLogger.REQCODE_IMAGE_CAPTURE); } else { Toast.makeText(getBaseContext(), getResources().getString(R.string.error_externalstorage_not_writable), Toast.LENGTH_SHORT).show(); } } } COM: <s> request a still picture from the camera application saving the file in </s>
funcom_train/36737456
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean canReadFromResource(String resource) { boolean canRead = false; try { Reader reader = ReaderUtils.returnReaderFromResource(resource); if (reader != null) { String readString = IOUtils.toString(reader); canRead = (readString != null && !readString.equals("")); } } catch (IOException e) { e.printStackTrace(); } return canRead; } COM: <s> simplifies the above tests by performing the retrival and test code </s>
funcom_train/43887841
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int hashCode() { return 37 * (DESCRIPTOR == null ? 0 : DESCRIPTOR.hashCode()) + (37 * (TYPE == null ? 0 : TYPE.hashCode())) + (37 * (ID == null ? 0 : ID.hashCode())) + (37 * (content == null ? 0 : content.hashCode())) + 37 * userData.hashCode(); } COM: <s> override of hash code </s>
funcom_train/4507157
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void calculateExtendedInformation() { ElementUtil.setProperty(extendedInformation, "x.item:jid", user.getAddress().toString()); ElementUtil.setProperty(extendedInformation, "x.item:affiliation", affiliation.toString()); ElementUtil.setProperty(extendedInformation, "x.item:role", role.toString()); } COM: <s> calculates and sets the extended presence information to add to the presence </s>
funcom_train/31105705
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BetaNode ( AbstractNode leftInput, AbstractNode rightInput, VariableBundle variableBundle ) { super(variableBundle); mLeftInput = leftInput; mRightInput = rightInput; mNegated = leftInput.getNegated() && rightInput.getNegated(); mOneNegatedInput = leftInput.getNegated() ^ rightInput.getNegated(); mPrintedRepresentation = null; } COM: <s> creates a beta node that merges binding from the two input nodes </s>
funcom_train/5347228
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRejectHost() { CATCHER.endpoint = new Endpoint("localhost", Backend.REJECT_PORT); RouterService.connect(); sleep(); assertEquals("connect should have succeeded", 1, CATCHER.connectSuccess); assertEquals("connect should have failed", 0, CATCHER.connectFailures); } COM: <s> tests to make sure that a host is still added to the host </s>
funcom_train/3369242
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getAfterIndex(int part, int index) { if (part == AccessibleText.CHARACTER) { String str = super.getAfterIndex(part, index); return getEchoString(str); } else { // There is no word or sentence after the text // displayed in the JPasswordField. return null; } } COM: <s> returns the code string code after a given code index code </s>
funcom_train/1883177
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JScrollPane getDescriptionScrollPane() { if (this.descriptionScrollPane == null) { this.descriptionScrollPane = new JScrollPane(); this.descriptionScrollPane .setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED); this.descriptionScrollPane.setPreferredSize(new Dimension(200, 45)); this.descriptionScrollPane.setSize(new Dimension(200, 45)); this.descriptionScrollPane.setViewportView(this .getDescriptionTextArea()); } return this.descriptionScrollPane; } COM: <s> this method initializes description scroll pane </s>
funcom_train/4112144
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getOk6Band() { if (ok6Band == null) {//GEN-END:|161-getter|0|161-preInit // write pre-init user code here ok6Band = new Command("Ok", Command.OK, 0);//GEN-LINE:|161-getter|1|161-postInit // write post-init user code here }//GEN-BEGIN:|161-getter|2| return ok6Band; } COM: <s> returns an initiliazed instance of ok6 band component </s>
funcom_train/22001948
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { return new String(getSymbol() + ", " + getTradingDate() + ", " + getTradingTime() + ", " + QuoteFormat.quoteToString(getDayOpen()) + ", " + QuoteFormat.quoteToString(getDayHigh()) + ", " + QuoteFormat.quoteToString(getDayLow()) + ", " + QuoteFormat.quoteToString(getDayClose()) + ", " + getDayVolume()); } COM: <s> return a string representation of the stock quote </s>
funcom_train/34823283
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setConnectionIndex(SDFEdge edge, int index){ Map<SDFEdge, Integer> connections = getConnections(); SDFEdge connectionToRemove = null; for(SDFEdge existingConnections : connections.keySet()){ if(connections.get(existingConnections) == index){ connectionToRemove = existingConnections ; } } connections.remove(connectionToRemove); connections.put(edge, index); } COM: <s> sets this edge connection index </s>
funcom_train/50847310
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFirst() throws Exception { ResultSet rs = newScrollableROJdbcResultSet(); rs.first(); assertEquals("isFirst", true, rs.isFirst()); rs.next(); assertEquals("isFirst", false, rs.isFirst()); rs.close(); try { rs.first(); fail("Allowed first() after close()"); } catch (SQLException ex) { assertEquals( "error code", ex.getErrorCode(), -ErrorCode.X_24501); } } COM: <s> test of first method of interface java </s>
funcom_train/934403
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected MultipartElement createFileMultipartElement() throws IOException { MultipartElement element; //create a local file on disk representing the element File elementFile = createLocalFile(); element = new MultipartElement(this.inputStream.getElementName(), this.inputStream.getElementFileName(), this.inputStream.getElementContentType(), elementFile); return element; } COM: <s> create a multipart element instance representing the file in the stream </s>
funcom_train/18381246
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JLayeredPane getLayeredPane() { if(root instanceof JFrame) return ((JFrame)root).getLayeredPane(); if(root instanceof JApplet) return ((JApplet)root).getLayeredPane(); if(root instanceof JWindow) return ((JWindow)root).getLayeredPane(); if(root instanceof JDialog) return ((JDialog)root).getLayeredPane(); return null; } COM: <s> returns the code layered pane code object for the wrapped component </s>
funcom_train/41524622
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isCommandAuthorized(Command cmd){ TransactionStatus status = null; boolean result = false; try{ //Check user authorization status = getTxStatus(cmd.getActionName(), true, Command.ISOLATION_DEFAULT, Command.PROPAGATION_REQUIRED); result = cmd.isCommandAuthorized(); }catch(Exception e){ logMessage(cmd, "It is not possible to check user authorization", e); txManager.rollback(status); } txManager.commit(status); return result; } COM: <s> this method is responsible of check if user has </s>
funcom_train/266480
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void put(IValidatable bean) { for (Iterator<Binding> iter = _optComponents.values().iterator(); iter.hasNext();) { (iter.next()).put(bean); } for (Iterator<Binding> iter = _bindings.values().iterator(); iter.hasNext();) { Binding b = iter.next(); if (isPropertyNull(bean, b)) { b.clear(null); } else { b.put(bean); } } _modified = false; } COM: <s> copies data from the java bean to the ui components </s>
funcom_train/36190397
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean nodeExists(SessionPlanNode node) { boolean returnValue = false; if (null != node) { for (int i = 0; i < this.services.length; i++) { if (this.services[i].equals(node)) { returnValue = true; break; } } } return returnValue; } COM: <s> determine if a node exists in the session plans current services </s>
funcom_train/45468069
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isAFunction(final String text) { boolean isAFunction = false; // Add all supported functions in SAP DB here String[] knownFunctions = new String[] { "nextval", "currval" }; for (int i = 0; i < knownFunctions.length; ++i) { String function = knownFunctions[i]; if (text.equals(function)) { return true; } } return isAFunction; } COM: <s> tests a text string against a known list of functions to determine </s>
funcom_train/2955719
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void awake() throws ContradictionException { Explanation expl = ((PalmSolver) this.getProblem()).makeExplanation(); ((PalmConstraintPlugin) this.getPlugIn()).self_explain(expl); current = new PalmRealIntervalConstant(current.getInf(), current.getSup(), (PalmExplanation) expl.copy(), expl); propagate(); } COM: <s> first propagation of the constraint </s>
funcom_train/28363583
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PhaseVector phaseMean() { int N = this.getCount(); PhaseVector vecSum = new PhaseVector(); Iterator<Particle> iter = this.iterator(); while (iter.hasNext()) { Particle p = iter.next(); vecSum.plusEquals(p.getPhase()); } vecSum.timesEquals(1.0/N); return vecSum; }; COM: <s> compute the centroid of the ensemble </s>
funcom_train/5009508
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() throws IOException { RPacket rp=rt.request(RTalk.CMD_closeFile,(byte[])null); if (rp==null || !rp.isOk()) throw new IOException((rp==null)?"Connection to Rserve failed":("Request return code: "+rp.getStat())); closed=true; } COM: <s> close stream is not related to the actual rconnection calling </s>
funcom_train/8096442
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Range getRange(String initial, int upper) { Range result; if (initial == null) { result = new Range(); result.setRanges("1"); result.setUpper(upper); } else { result = new Range(initial); result.setUpper(upper); } return result; } COM: <s> returns a configured range </s>
funcom_train/36658884
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void runIoTask(IoRunnable ioTask, long nodeId) { checkNonTransactionalContext(); do { try { ioTask.run(); return; } catch (IOException e) { if (logger.isLoggable(Level.FINEST)) { logger.logThrow( Level.FINEST, e, "IoRunnable {0} throws", ioTask); } try { // TBD: what back-off policy do we want here? Thread.sleep(WAIT_TIME_BEFORE_RETRY); } catch (InterruptedException ie) { } } } while (isAlive(nodeId)); } COM: <s> executes the specified </s>
funcom_train/29521783
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Object value(Field f, String str) throws Exception { try { // // First, try to construct a value // return ReflectUtils.getDefault(). construct(f.getType(), str, System.err); } catch (Exception e) {} // // Then, try to return a reference to a static field // return staticValue(str); } COM: <s> try to constructor a new value from code f code and </s>
funcom_train/42709933
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JButton getJButtonDeleteArticle() { if (jButtonDeleteArticle == null) { jButtonDeleteArticle = new JButton(); jButtonDeleteArticle.setBounds(new Rectangle(270, 240, 121, 21)); jButtonDeleteArticle.setActionCommand("AddArticle"); jButtonDeleteArticle.setText("Delete"); jButtonDeleteArticle.setMnemonic(KeyEvent.VK_UNDEFINED); } return jButtonDeleteArticle; } COM: <s> this method initializes j button delete article </s>
funcom_train/2628378
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetWidgetOrContainer() { System.out.println("setWidgetOrContainer"); List<ComponentType> widgetOrContainer = new ArrayList(); ContentsType instance = new ContentsType(); instance.setWidgetOrContainer(widgetOrContainer); assertEquals(instance.widgetOrContainer,widgetOrContainer); } COM: <s> test of set widget or container method of class contents type </s>
funcom_train/7531937
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isEqual(IdentityDataItem item) { if (item == null) return false; if ((item.getType().equals(mType)) && (item.getPeer().equals(mHost)) && (item.getSignature().equals(mSignature)) && (item.getPublicKey().equals(mPublicKey)) && (item.getTimeStamp() == mTimeStamp)) return true; else return false; } COM: <s> tests if the delivered item is equal to this </s>
funcom_train/20308667
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void logMessage( boolean outgoing, Document msg ) { if (m_logCommunications) { StringWriter out = new StringWriter(); serialiseDocument( msg, out ); if (log.isDebugEnabled()) { log.debug( outgoing ? "Sending to DIG reasoner ..." : "Received from DIG reasoner ..." ); log.debug( out ); } } } COM: <s> p log the messages going to and from dig p </s>
funcom_train/20551676
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJContentPane() { if (jContentPane == null) { jContentPane = new JPanel(); jContentPane.setLayout(new BorderLayout()); jContentPane.add(getJPanel(), BorderLayout.NORTH); jContentPane.add(getJPanel1(), BorderLayout.CENTER); jContentPane.add(getJPanel2(), BorderLayout.SOUTH); jContentPane.add(getJPanel3(), BorderLayout.EAST); } return jContentPane; } COM: <s> this method initializes j content pane </s>
funcom_train/1460742
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void play(Sequence sequence, boolean loop) { if (sequencer != null && sequence != null && sequencer.isOpen()) { try { sequencer.setSequence(sequence); sequencer.start(); this.loop = loop; } catch (InvalidMidiDataException ex) { ex.printStackTrace(); } } } COM: <s> plays a sequence optionally looping </s>
funcom_train/986655
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getBackCommand2() { if (backCommand2 == null) {//GEN-END:|61-getter|0|61-preInit // write pre-init user code here backCommand2 = new Command("Back", Command.BACK, 0);//GEN-LINE:|61-getter|1|61-postInit // write post-init user code here }//GEN-BEGIN:|61-getter|2| return backCommand2; } COM: <s> returns an initiliazed instance of back command2 component </s>
funcom_train/18287585
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addObfuscationProperties(Properties props) { File proguardFile = EclipseMECorePlugin.getProguardJarFile(); boolean obfuscate = ((proguardFile != null) && proguardFile.exists()); // props.setProperty("flag.obfuscate", Boolean.toString(obfuscate)); if (obfuscate) { File proguardHome = proguardFile.getParentFile().getParentFile(); props.setProperty("wtk.proguard.home", proguardHome.toString()); } } COM: <s> add the obfuscation related properties </s>
funcom_train/190248
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TableBuilder addIndex(IndexBuilder index) { if(_escapeIdentifiers) { index.setName(Database.escapeIdentifier(index.getName())); for(IndexBuilder.Column col : index.getColumns()) { col.setName(Database.escapeIdentifier(col.getName())); } } _indexes.add(index); return this; } COM: <s> adds an index builder to the new table </s>
funcom_train/33372043
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean classPrepareEvent(ClassPrepareEvent event) { EventRequestManager mgr = vm.eventRequestManager(); List fields = event.referenceType().visibleFields(); for (Iterator it = fields.iterator(); it.hasNext(); ) { Field field = (Field)it.next(); ModificationWatchpointRequest req = mgr.createModificationWatchpointRequest(field); for (int i=0; i<excludes.length; ++i) { req.addClassExclusionFilter(excludes[i]); } req.setSuspendPolicy(EventRequest.SUSPEND_NONE); req.enable(); } return false; } COM: <s> a new class has been loaded </s>
funcom_train/43187794
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { String s = getClass().getName() + " = [\n"; for (Enumeration e = rectangles(); e.hasMoreElements(); ) { s += "(" + (Rectangle)e.nextElement() + ")\n"; } return s + "]"; } COM: <s> converts the list of rectangles to a displayable string </s>
funcom_train/5372070
/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 col) { if (cards == null) return ""; Player p = (Player)rowMap.get(row); switch (col) { case 0: return p.getFullName(); case 1: return String.valueOf(p.getRating()); case 2: return String.valueOf(p.getQuickRating()); case 3: return p.getExpires(); case 5: return p.getMemberNumber(); case 4: return ">>"; } return ""; } COM: <s> gets the value at attribute of the cross table model object </s>
funcom_train/18786874
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeProperty(Object bean, Object value) { assert ((bean != null) && (value != null)); Class[] types = { value.getClass() }; Object[] params = { value }; ReflectUtilities.execute(bean, removeMethodName, types, params); } COM: <s> removes the item from the indexed property </s>
funcom_train/31927433
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetSetupParameters() throws Exception { HashMap setupParams = null; String dataFile = "test/org/jtestcase/data/GetParamTest1.xml"; _jtestcase = new JTestCase(dataFile); setupParams = _jtestcase.getSetupParams(); assertEquals("Normal setup parameter not correctly read", "A setup parameter", (String) setupParams .get("setupparameter")); assertEquals("Paramgroup setup parameter not correctly read", "pg1.key", (String) setupParams.get("paramgroup/key")); } COM: <s> test the get setup params method </s>