__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/40469273
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onAttach() { if (null != layerCanvasElement) { ctx = getCanvasContext(layerCanvasElement); if (null != ctx) { if (null != linearGradient) { setLinearGradient(linearGradient); } if (null != radialGradient){ setRadialGradient(radialGradient); } } } } COM: <s> for future reference </s>
funcom_train/44841750
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean login(String userID, String pass) { Object o = invoke(login_0, new String[]{"userID", "pass"}, new Object[]{userID, pass}); return ((Boolean)o).booleanValue(); } COM: <s> login to server </s>
funcom_train/634806
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public I_OvCgiParamValidator getValidator(String id) throws OvConfigException { if (validatorsById.containsKey(id)) { return (I_OvCgiParamValidator) validatorsById.get(id); } throw new OvConfigException("No validator configured with ID '" + id + "'"); } COM: <s> returns a validator </s>
funcom_train/7518308
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public EstrangeiroDependente update(EstrangeiroDependente entity) { EntityManagerHelper.log("updating EstrangeiroDependente instance", Level.INFO, null); try { EstrangeiroDependente result = getEntityManager().merge(entity); EntityManagerHelper.log("update successful", Level.INFO, null); return result; } catch (RuntimeException re) { EntityManagerHelper.log("update failed", Level.SEVERE, re); throw re; } } COM: <s> persist a previously saved estrangeiro dependente entity and return it or </s>
funcom_train/1823569
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection verticesOutside(Collection vertices) { ArrayList outsideVertices = new ArrayList(); Polygon quadrilateralPolygon = toPolygon(); for (Iterator i = vertices.iterator(); i.hasNext();) { Coordinate vertex = (Coordinate) i.next(); Point p = factory.createPoint(vertex); if (!quadrilateralPolygon.contains(p)) { outsideVertices.add(vertex); } } return outsideVertices; } COM: <s> filters out points that lie inside this quadrilateral </s>
funcom_train/36060895
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Cursor searchGrain(String search) throws SQLException { String where = createWhere(search); Cursor mCursor = mDb.query(true, GRAIN_TABLE, new String[] { KEY_ID, KEY_NAME, KEY_MANUFACTURER, KEY_DESCRIPTION, KEY_EXTRACT, KEY_COLOR }, where, null, null, null, null, null); if (mCursor != null) { mCursor.moveToFirst(); } return mCursor; } COM: <s> return a cursor for all grains that match a search pattern </s>
funcom_train/46825404
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JogrePropertyHash (String properties) { this (); if (properties != null) { StringTokenizer st = new StringTokenizer (properties, ","); while (st.hasMoreTokens()) { String token = st.nextToken(); int commaPos = token.indexOf("="); if (commaPos != -1) { // extract key and value String key = token.substring (0, commaPos); String value = token.substring (commaPos + 1); // and add to the hash put (key, value); } } } } COM: <s> this constructor converts a string of format </s>
funcom_train/32769254
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public VHist findOrCreateVHist(String logicalName) { VHist vh = (VHist)vHistMap.get((Object)logicalName); if (vh == null) { vh = new VHist(); vHistMap.put((Object)logicalName, (Object)vh); } return vh; } COM: <s> if created the new vhist is empty </s>
funcom_train/9163578
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public UnaryExpression parseUnaryExpression() { String symbol = input.skipAndTest(Unary.SYMBOLS, AnyBreaks.INSTANCE); input.expect(symbol, AnyBreaks.INSTANCE); if (symbol == null) { throw new ParseException(input.getPlace(), "Expected unary operator."); } Unary op = Unary.get(symbol); return new UnaryExpression(input.getPlace(), op, parseOperand()); } COM: <s> parses a unary expression </s>
funcom_train/626675
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void outALiteralCollection(ALiteralCollection node) { // the element type of the collection Type eT = this.annotatedType(node.getCollectionItemList()); eT = ExpressionType.evaluateType(eT); Classifier cl = collectionClassifier(node.getCollectionKind(), eT.getClassifier()); annotate(node, cl.getInstanceType()); } COM: <s> annotates the type of a literal collection </s>
funcom_train/26240004
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void tableChanged(TableModelEvent e) { if (e.getType() != TableModelEvent.INSERT) { return; } int selectedRow = questionTable.getSelectedRow(); if (selectedRow == -1 || !tableModel.canBeRated(tableSorter.modelIndex(selectedRow))) { int lastRow = questionTable.getRowCount()-1; questionTable.getSelectionModel().setSelectionInterval(lastRow, lastRow); } } COM: <s> automatically select newly arrived questions if no question is currently </s>
funcom_train/3702053
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void commonInit() { //// 1. Get the internal unique ID, if it exists. if (strInternalUID == null) { strInternalUID = System.getProperty(Confab.COOKIE_INTERNAL_NAME); } //// 2. Extra debugging info. if (DEBUG == true) { System.setOut(new DebugPrintStream()); } } // of method COM: <s> make all output more palatable and easier to trace </s>
funcom_train/17500124
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected DocumentBuilder createDocumentBuilder(Parse parse) { try { parse.documentBuilder = documentBuilderFactory.newDocumentBuilder(); } catch (Exception e) { parse.addProblem("couldn't get new document builder", e); return null; } parse.documentBuilder.setErrorHandler(parse); return parse.documentBuilder; } COM: <s> customizable creation of a new document builder </s>
funcom_train/48480125
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HandlerRegistration addHeaderClickHandler(com.smartgwt.client.widgets.grid.events.HeaderClickHandler handler) { if(getHandlerCount(com.smartgwt.client.widgets.grid.events.HeaderClickEvent.getType()) == 0) setupHeaderClickEvent(); return doAddHandler(handler, com.smartgwt.client.widgets.grid.events.HeaderClickEvent.getType()); } COM: <s> add a on header click handler </s>
funcom_train/8406265
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void percolateUpMinHeap(final int index) { int hole = index; Object element = elements[hole]; while (hole > 1 && compare(element, elements[hole / 2]) < 0) { // save element that is being pushed down // as the element "bubble" is percolated up final int next = hole / 2; elements[hole] = elements[next]; hole = next; } elements[hole] = element; } COM: <s> percolates element up heap from the position given by the index </s>
funcom_train/23636006
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addUnitCarbonEmissionPerShipmentPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_TransportationMode_unitCarbonEmissionPerShipment_feature"), getString("_UI_PropertyDescriptor_description", "_UI_TransportationMode_unitCarbonEmissionPerShipment_feature", "_UI_TransportationMode_type"), CescsmodelPackage.Literals.TRANSPORTATION_MODE__UNIT_CARBON_EMISSION_PER_SHIPMENT, true, false, false, ItemPropertyDescriptor.REAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the unit carbon emission per shipment feature </s>
funcom_train/50334998
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setState(int state) { if ( (state==Transit.IDLE) || (state==Transit.ASSIGNED) ) { int old = mState; mState = state; firePropertyChange("state", Integer.valueOf(old), Integer.valueOf(mState)); } else log.error("Attempt to set Transit state to illegal value - "+state); } COM: <s> set the state of the transit </s>
funcom_train/37584776
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int size(int bound) { int result = 0; // javac 1.5.0_16 crashes with this annotation //for (@SuppressWarnings("unused") T elt : this) { result++; if (result == bound) break; } for (T elt : this) { result++; if (result == bound) break; } return result; } COM: <s> computes the size by traversing the iterator requires linear time </s>
funcom_train/11754446
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getExecutable(final String executable) { if (executable == null) { throw new IllegalArgumentException("Executable can not be null"); } else if(executable.trim().length() == 0) { throw new IllegalArgumentException("Executable can not be empty"); } else { return StringUtils.fixFileSeparatorChar(executable); } } COM: <s> get the executable the argument is trimmed and and are </s>
funcom_train/24569768
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(ValidationMessage validationMessage) { checkModifiable(); checkNotNull(validationMessage, "The validation message must not be null."); checkArgument(validationMessage.severity() != Severity.OK, "You must not add a validation message with severity OK."); messageList.add(validationMessage); } COM: <s> adds a new validation message to the list of messages </s>
funcom_train/12561786
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void clearPopups() { synchronized (super.layers) { for (CLayerElement le = super.layers.getTop(); le != null; le = le.getLower()) { CLayer l = le.getLayer(); if (l instanceof PopupLayer) { removeLayer(l); } } } } COM: <s> internal method to clear all current popups </s>
funcom_train/17539792
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean loadConfiguration(String fileName){ boolean result = false; try { InputStream propertiesFile = new FileInputStream(fileName); properties.load(propertiesFile); result = parseConfiguration(); } catch (Exception ex){ logger.debug("Could not load properties from " + fileName + ". Exception: " + ex); return false; } return result; } COM: <s> loads a properties file and ignores commented lines and empty lines </s>
funcom_train/34527721
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private InputStream toInputStream(Object obj) throws EvaluationException { InputStream in = null; if (obj instanceof Blob) { try { in = ((Blob)obj).getBinaryStream(); } catch(Exception ex) { String msg = "Cannot convert retrieve the data from a Blob object."; throw new EvaluationException(msg, ex); } } else if (obj instanceof byte[]) { in = new ByteArrayInputStream((byte[])obj); } return in; } COM: <s> tries to convert a specified object an input stream </s>
funcom_train/51809138
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init() throws BusinessException, IntegrationException { try { DATA_SOURCE = getDataSourceName(); } catch (Exception ex) { new BusinessException(ex); } FeedList fl = getFeeds(); activeFeedList = getFeeds(); fl.loadFeeds(); feedList = fl; SearchEngine.getDefault().subscribe(this); new ItemSearch(); } COM: <s> rss feed init method </s>
funcom_train/24357053
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getWindingRule(int polyFillMode) { if (polyFillMode == EMFConstants.WINDING) { return GeneralPath.WIND_EVEN_ODD; } else if (polyFillMode == EMFConstants.ALTERNATE) { return GeneralPath.WIND_NON_ZERO; } else { return GeneralPath.WIND_EVEN_ODD; } } COM: <s> gets a winding rule for general path creation based on </s>
funcom_train/40695320
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void mapMouseMove(LatLng latlng) { currentLatLng = latlng; int mapAbsoluteLeft = mapWidget.getAbsoluteLeft(); int mapAbsoluteTop = mapWidget.getAbsoluteTop(); currentMouseDivPosition = mapWidget .convertLatLngToContainerPixel(currentLatLng); currentMousePosition = Point.newInstance(currentMouseDivPosition.getX() + mapAbsoluteLeft, currentMouseDivPosition.getY() + mapAbsoluteTop); } COM: <s> events handler for mouse move events </s>
funcom_train/26624740
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void ReceiveUpEvent(Event evt) { if(up_handler == null) { if(observer != null) { // call debugger hook (if installed) if(observer.Up(evt, up_queue.Size()) == false) { // false means discard event return; } } Up(evt); return; } try { up_queue.Add(evt); } catch(Exception e) { Trace.println("Protocol.ReceiveUpEvent()", Trace.WARN, "exception: " + e); } } COM: <s> internal method should not be called by clients </s>
funcom_train/31249149
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onNotice(String target, IRCUser user, String msg) { if (!qii.isIgnored(user)) { String username = user.getUsername(); int index = qii.getSelectedIndex(); String line = "* Notice: " + username + " to " + target + ": " + msg; qii.updateTab(index, line, Settings.getOtherColor()); } } COM: <s> fired when a notice is received </s>
funcom_train/26226960
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addPhiJoin(BasicBlock bb) { if (phis[bb.getIndex()] != null) return; //the type is not used, the rigth type of all operands, // will be defined when passing operands to SSA form. QVar variable = new QVar(var, Constants.TYP_REFERENCE); phis[bb.getIndex()] = new QPhiJoin(variable, bb); } COM: <s> add a phi join for a given basic block </s>
funcom_train/5322190
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setupWorld() { try { theStart = ACME.Entities.order(Config.WORLD_FACTORY); } catch (ACME.Failure e) { Log.error("World factory '"+Config.WORLD_FACTORY+"' failed."); if (e.isParam()) { Log.error("World factory parameter '"+e.getMessage()+ "' is invalid or missing"); } } } COM: <s> produces the world </s>
funcom_train/22679546
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setupTeletext() { int teletext = AnalogTV.BLACK_LEVEL; for (int y = 19; y < 22; y++) { for (int x = AnalogTV.PIC_START; x < AnalogTV.PIC_END; x++) { if ((x%8) == 0) { teletext = rng.nextBoolean() ? AnalogTV.WHITE_LEVEL : AnalogTV.BLACK_LEVEL; } signal[y][x] = teletext; } } } COM: <s> fake teletext and other signals in the vertical blacking part of the frame </s>
funcom_train/20516597
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean checkIfLegal(int x, int y){ if(x < 0 || x > Board.SIZE){ return false; } else if(y < 0 || y > Board.SIZE){ return false; } else{ int xDiff = Math.abs(super.getX() - x); int yDiff = Math.abs(super.getY() - y); if (xDiff == yDiff){ return true; } } return false; } COM: <s> checks if move of bishop is legal </s>
funcom_train/25924126
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void connect(String link) { try { url = new URL(link); conn = url.openConnection(); inputStream = conn.getInputStream(); isOnline = true; } catch (MalformedURLException e) { // TODO Auto-generated catch block e.printStackTrace(); }catch (IOException e) { //TODO - if server unavailable - returns "Unknown host exception" e.printStackTrace(); isOnline = false; } } COM: <s> opens a connection to the specified link </s>
funcom_train/1943533
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private FullTextQuery setupPagination(int pageNumber, int pageSize, FullTextQuery fullTextQuery) { // setup the pagination. if (pageSize >= 0) { fullTextQuery.setMaxResults(pageSize); if (pageNumber >= 0) { fullTextQuery.setFirstResult(pageNumber * pageSize); } } return fullTextQuery; } COM: <s> sets up the pagination parameters to the given query </s>
funcom_train/44823220
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JDBCDataSourceConnectionDef getConnDefByName (String connectionName) { for (int i=0; connDefs != null && i < connDefs.length; i++) { if (connectionName.equals(connDefs[i].getName())) return connDefs[i]; } return null; } COM: <s> get the jdbcdirect connection def for a given connection name </s>
funcom_train/19752298
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getMessage() { StringBuilder message=new StringBuilder(_specificMessage); if (_errorCode>0) { message.append("Error code "); message.append(_errorCode); } if (_command!=null) { message.append(" while executing '"); message.append(_command); message.append("'"); } if (_response!=null) { message.append(", server returned '"); message.append(_response); message.append("'."); } return message.toString(); } COM: <s> returns the standard exception message </s>
funcom_train/12557991
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void putID(int off, long l, int count) throws BoundException { if ((count <= 0) || (count > 8)) throw new BoundException(); int shift = (count - 1) * 8; for (int i = 0; i < count; i++) { putByte(off++, (int) ((l >>> shift) & 0xFF)); shift = shift - 8; } } COM: <s> stores an integer value short int long in the buffer </s>
funcom_train/21995261
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String validateFilter(String raw_filter, String order_by) throws RpcException { try { authorize(Playlists.VALIDATE_FILTER); return getBus().validateFilter(raw_filter, order_by); } catch (JRecSecurityException e) { throw new RpcException("security-problem validating filter", e); } catch (BusException e) { throw new RpcException("bus-problem validating filter", e); } } COM: <s> test a playlist filter </s>
funcom_train/4237271
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetIdPlatillo() { System.out.println("getIdPlatillo"); OrdenPlatilloPK instance = new OrdenPlatilloPK(); instance.setIdPlatillo(5); int expResult = 5; int result = instance.getIdPlatillo(); assertEquals(expResult, result); } COM: <s> test of get id platillo method of class data </s>
funcom_train/16533574
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void groupsEnableButtons(ListObject selectedNode) { if(selectedNode == null || selectedNode.isRoot()) { groupsAddButton.setEnabled(false); groupsRemoveButton.setEnabled(false); } else if (selectedNode.getIsInGroup()) { groupsAddButton.setEnabled(false); groupsRemoveButton.setEnabled(true); } else { groupsAddButton.setEnabled(true); groupsRemoveButton.setEnabled(false); } } COM: <s> enables and disables the buttons used to add an artifact to the group </s>
funcom_train/5343539
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeData(OutputStream out) throws IOException { for(Iterator i = TREE.getAllNodes().iterator(); i.hasNext(); ) { Iterator iter = ((List)i.next()).iterator(); while (iter.hasNext()) out.write((byte[])iter.next()); } writePadding(getDataLength(), out); } COM: <s> writes the trees data to the specified output stream </s>
funcom_train/8436704
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addCharArgument(String name, boolean necessary) { if(arguments.containsKey(name) || !name.matches("\\w+")) throw new IllegalArgumentException("Argument " + name + " already exists or is not valid"); arguments.put(name, new DirectArgument(DirectArgument.ARG_CHAR)); if(necessary) necessaryArguments.add(name); } COM: <s> register a single character argument specifiable by name ch </s>
funcom_train/22929173
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testHandleCommand_FileNotSet() throws Exception { try { commandHandler.handleCommand(new Command(CommandNames.RETR, EMPTY), session); fail("Expected AssertFailedException"); } catch (AssertFailedException expected) { LOG.info("Expected: " + expected); } } COM: <s> test the handle command method when the file property has not been set </s>
funcom_train/2888166
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void remove(PlatformSelectorType selector) throws DatabaseAccessException { try{ TupleOutput out = new TupleOutput(); out.writeString(selector.getOs()); out.writeString(selector.getPlatform()); out.writeString(selector.getArch()); DatabaseEntry key = new DatabaseEntry(out.toByteArray()); database.delete(null, key ); }catch(DatabaseException e){ throw new DatabaseAccessException(e); } } COM: <s> deletes the exact matching default profile its not a regex match </s>
funcom_train/26336186
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getName( GameItem item ) { String className = item.getClass().getName(); String name = (String) this.identNames.get( (Object) className ); if( name == null ) this.randomName( item, className ); return (String) this.identNames.get( (Object) className ); } COM: <s> get generic identification name for a game item </s>
funcom_train/32069367
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addAccountGroups(Collection<AccountGroup> accountGroups) { boolean addOk = getAccountGroups().addAll(accountGroups); if (addOk) { for(AccountGroup accountGroup : accountGroups) { accountGroup.setParentGroup((AccountGroup)this); } } else { if (logger.isWarnEnabled()) { logger.warn("add returned false"); } } return addOk; } COM: <s> add the passed account groups collection to the parent group collection </s>
funcom_train/22027184
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void draw(Graphics g) { int i=0; g.setColor(color); g.drawLine(x+width/2, y, x+width/2, y+height); if ( drawHandles ) { for (i=0; i<numHandles; i++) handle[i].draw(g); } } COM: <s> draws an ytool </s>
funcom_train/3114170
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateStyle() { //// 1. Calculate zoom factor. AffineTransform tx = super.getTransform(COORD_ABS); double curScale = AffineTransformLib.getScaleFactor(tx); //// 2. Calculate new values and set the style. Style s = super.getStyleRef(); s.setLineWidth((float) (stickyStyle.getLineWidth() / curScale)); } // of method COM: <s> called just before a style is retrieved so that the values can be </s>
funcom_train/51685009
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Properties loadProperties(String fileName) throws NotFoundException, IOException { properties = new Properties(); FileInputStream fileInputStream = null; try { fileInputStream = new FileInputStream(fileName); properties.loadFromXML(fileInputStream); return properties; } catch (FileNotFoundException e) { throw new NotFoundException("Configuration File ", e); } catch (IOException e) { throw e; } } COM: <s> reads the xml configuration file </s>
funcom_train/29598286
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void purgeNodeSemanticTypes() { if (!xmlConfig.isAllSemanticTypes()) { final Collection<Integer> validSemanticTypes = new LinkedList<Integer>(); final int[] semTypes = xmlConfig.getSemanticTypes(); for (int i = 0; i < semTypes.length; i++) { validSemanticTypes.add(semTypes[i]); } synchronized (nodeSemanticTypes) { for (final Collection<Integer> values : nodeSemanticTypes.values()) { values.retainAll(validSemanticTypes); } } } } COM: <s> updates the collection of semantic types associated to each node </s>
funcom_train/21287383
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void connectCard() throws CardException, NoReadersFoundException { if (!fIsConnected) { // Connects with the first available smart card reader TerminalFactory factory = TerminalFactory.getDefault(); List<CardTerminal> terminals = factory.terminals().list(); if (terminals.size() > 0) { fTerminal = terminals.get(0); fCard = fTerminal.connect("*"); fATR = fCard.getATR(); fChannel = fCard.getBasicChannel(); fIsConnected = true; } else { throw new NoReadersFoundException(); } } } COM: <s> connects the system to the first compatible smart card reader to allow </s>
funcom_train/22335770
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadFile() throws XmlHttpException { try { setXslContent( new String(StreamHelper.getOutput( StreamHelper.getInputStreamForName(ivFileName) )) ); Log.logDebug("Got xslContent from file: " + getXslContent()); } catch (Exception ex) { throw new XmlHttpException("Could not load file=" + ivFileName, ex); } } COM: <s> loads file for specified filename at </s>
funcom_train/50248239
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void hookContextMenu() { MenuManager menuMgr = new MenuManager("#PopupMenu"); menuMgr.setRemoveAllWhenShown(true); menuMgr.addMenuListener(new IMenuListener() { public void menuAboutToShow(IMenuManager manager) { PackageExplorer.this.fillContextMenu(manager); } }); Menu menu = menuMgr.createContextMenu(viewer.getControl()); viewer.getControl().setMenu(menu); getSite().registerContextMenu(menuMgr, viewer); } COM: <s> create and install a context menu </s>
funcom_train/31890576
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void unSubscribeUser(BeeAddress observerAddress, String username) { if(username==null || username.equals("")) return; if(watchers.containsKey(username)){ Set observers = (Set) watchers.get(username); if(observers == null) return; observers.remove(observerAddress); } log.fine("Grouplet "+observerAddress+" has unsubscribed observing "+username+"."); } COM: <s> deletes an grouplet from the list of observers of certain user </s>
funcom_train/26509259
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void apply(Object[] locals, Stack stack) throws FunctionException { if (stack!=null) { if (stack.size()<consume) throw new FunctionException("stack too small for new"); for (int i=0; i<consume; i++) stack.pop(); for (int i=0; i<produce-1; i++) stack.push(CFPComponentLattice.UNKNOWNCOMPONENT); stack.push(CFPComponentLattice.NONNULLCOMPONENT); } } COM: <s> removes as many elements from the stack as necessary pushes as many </s>
funcom_train/13750019
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void removeRange(int fromIndex, int toIndex) { modCount++; int numMoved = elementCount - toIndex; System.arraycopy(elementData, toIndex, elementData, fromIndex, numMoved); // Let gc do its work int newElementCount = elementCount - (toIndex - fromIndex); while (elementCount != newElementCount) { elementData[--elementCount] = 0; } } COM: <s> removes from this list all of the elements whose index is between </s>
funcom_train/18032412
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getMenuEditImageHistogram() { if (m_menuEditImageHistogram == null) { m_menuEditImageHistogram = new JMenuItem(); m_menuEditImageHistogram.setText(Messages.getString("FBMenu.34")); //$NON-NLS-1$ m_menuEditImageHistogram.setMnemonic(Messages.getString("FBMenu.35").charAt(0)); //$NON-NLS-1$ } return m_menuEditImageHistogram; } COM: <s> returns the edit image histogram item </s>
funcom_train/50484425
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void copyLeftToRight() { // Clear the right side. getRight().clearComponentValues(); // Copy the data from left to right. int size = Math.min(getLeftSize(), getRightSize()); for (int i=0; i<size; i++) getRight(i).setComponentValue(getLeft(i).getComponentValue()); } COM: <s> copy the data from the left side into the </s>
funcom_train/198353
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int hashCode() { long bits = java.lang.Double.doubleToLongBits(x1); bits = bits * 29 + java.lang.Double.doubleToLongBits(y1); bits = bits * 29 + java.lang.Double.doubleToLongBits(x2); bits = bits * 29 + java.lang.Double.doubleToLongBits(y2); return (((int) bits) ^ ((int) (bits >> 32))); } COM: <s> returns the hashcode for this grid line </s>
funcom_train/5854231
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean doesMetadataMatch(MetadataItem[] md) { Object[] thisMD = metadata.values().toArray(); if (thisMD.length != md.length) return false; MetadataItem tmp; String value; for (int i=0; i<md.length; i++) { tmp = (MetadataItem) metadata.get(md[i].id); value = tmp.value; if (value == null) return false; if (!value.equals(md[i].value)) return false; } return true; } COM: <s> check if this events metadata exactly match the given </s>
funcom_train/38737227
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private DHashNode createNode(String name, OverlayNode overlayNode) { DHashNode dhashNode; DHashEnvironment dHashEnviroment; dhashNode = new DHashNode(overlayNode, EscapeChars.forHTML(name, false)); dHashEnviroment = new DHashEnvironment(dhashNode); communicationManager.addObserver(dHashEnviroment); logger.finest("DHash Node " + name + " Created"); return dhashNode; } COM: <s> creates dhash node by name and overlay node </s>
funcom_train/1677090
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Format createFormat(String clsName, Map<String,Format> newFormats) { Class type; try { type = SimpleCatalog.classForName(clsName); } catch (ClassNotFoundException e) { throw new IllegalStateException ("Class does not exist: " + clsName); } return createFormat(type, newFormats); } COM: <s> convenience method that gets the class for the given class name and </s>
funcom_train/42424272
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String resolveLibraryName(String name) { URL url = findResource("lib"+name+".so"); if(url==null) url = findResource(name+".dll"); if(url!=null) return new File(url.getPath()).getAbsolutePath(); throw new UnsatisfiedLinkError("Native library " + name + " could not be found in java_require() path."); } COM: <s> searches for a library name in our classpath </s>
funcom_train/18825683
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void selectOptions(String selectedQuery) { //XXX need to remove old optionFrame? List<ParamInfo> parameters = Controller.getOperationParameterMap().get(selectedQuery); //If there were no parameters to select values for, return if (parameters.isEmpty()) { //XXX use setReady method for this? runButton.setEnabled(true); } else { optionFrame = new OptionsFrame(this, parameters); } }//end method COM: <s> constructs and displays the option frame </s>
funcom_train/39534138
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void paintShape(SVGHandle handle){ //removing the ghost canvas painter if(ghostPainter.getClip()!=null) { handle.getCanvas().removePaintListener(ghostPainter, false); } //setting the new shapes to the ghost painter ghostPainter.reinitialize(); ghostPainter.setPathShape(wholePath); ghostPainter.setCurrentSegmentShape(drawnPath); ghostPainter.setControlPointsShape(controlPointsPath); handle.getCanvas().addLayerPaintListener( SVGCanvas.DRAW_LAYER, ghostPainter, true); } COM: <s> paints the drawing shape </s>
funcom_train/40000512
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean accept(File f) { if(f != null) { if(f.isDirectory()) { return true; } String extension = getExtension(f); if(extension != null && ("xml".equalsIgnoreCase(extension) || "jar".equalsIgnoreCase(extension))) { return true; } } // end outer if return false; } // end accept COM: <s> return true if this file should be shown in the directory pane </s>
funcom_train/45038673
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void outARelationalExpression(ARelationalExpression node) { Node primExpr = node.getCompareableExpression(); Instance value = annotatedValue(primExpr); AEquation eq = (AEquation) node.getEquation(); if (eq != null) { Node op = eq.getEquationOperator(); value = invokeOperator(value, op, eq.getCompareableExpression()); } annotate(node, value); } COM: <s> evaluates and annotates the value s of a relational expression </s>
funcom_train/50557002
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int draw(Output output, int x, int y, int barWidth, int barHeight) throws OutputException { int w = bars[0] * barWidth; output.drawBar((int) x, (int) y, (int) w, (int) barHeight, false); return w; } COM: <s> draws the module to the specified output </s>
funcom_train/18589958
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int indexOf(int gridletId, int userId) { ResGridlet gl = null; int i = 0; Iterator<ResGridlet> iter = super.iterator(); while (iter.hasNext()){ gl = iter.next(); if (gl.getGridletID()==gridletId && gl.getUserID()==userId) { return i; } i++; } return -1; } COM: <s> finds the index of a gridlet inside the list </s>
funcom_train/6442169
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createTxWrapper() { try { Transaction tx = transactionManager.getTransaction(); TransactionWrapper txW = new TransactionWrapper(tx); tx.registerSynchronization(txW); wrapperMap.put(tx,txW); } catch ( Exception re ) { // this should never happen since we register right after // the transaction started. logger.info("", re); } } COM: <s> to be called only from begin transaction to register a synchronization </s>
funcom_train/49031256
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AbsObject externalise(Object obj, ObjectSchema schema, Class javaClass, Ontology referenceOnto) throws OntologyException { try { AbsObject abs = schema.newInstance(); Introspectable intro = (Introspectable) obj; intro.externalise(abs, referenceOnto); return abs; } catch (OntologyException oe) { // Just forward the exception throw oe; } catch (ClassCastException cce) { throw new OntologyException("Object "+obj+" is not Introspectable"); } catch (Throwable t) { throw new OntologyException("Schema and Java class do not match", t); } } COM: <s> translate an object of a class representing an element in an </s>
funcom_train/35273561
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String trimName(String line) { line = trimLine(line); int idx = line.indexOf("("); if(idx == -1){ idx = line.indexOf(":"); } if (idx != -1) { line = line.substring(0, idx); } return line.trim(); } COM: <s> trims a line and removes everything behind colon </s>
funcom_train/35529876
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String save() { log.debug("save: {}", news); news = getNewsService().save(news); if (news != null && news.getId() != null) { addActionMessage(getText("news.message.create.success")); } else { addActionError(getText("news.error.news.not.created")); } return SUCCESS; } COM: <s> from parameters passed object inews without identifier create news </s>
funcom_train/29380901
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendDailyTransactionEmails() { List<Tx> txsForToday = getTransactionsForDay(new Date()); Set<Account> accountsTransactionedAboutToday = new HashSet<Account>(); // extract accounts and place into set (for uniqueness) for (Tx tx : txsForToday) { accountsTransactionedAboutToday.add(tx.getFromAcc()); } for (Account account : accountsTransactionedAboutToday) { } } COM: <s> sends a daily e mail to user who have been txed about </s>
funcom_train/31520440
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void isACLAlreadyExist(VCar vcar) throws CapDataBaseUidAlreadyExistException { CapAccessControlListSet acl = null; for (Enumeration e = ACLs.keys(); e.hasMoreElements(); ) { String aclid = (String) e.nextElement(); if (aclid.equals(vcar.getStringId())) { acl = (CapAccessControlListSet) ACLs.get(aclid); acl.isACLexist(vcar); return; } } } COM: <s> check if acl already exist </s>
funcom_train/51222848
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FileElement setLastOpenPath(File value) { if (value != null && value.exists() && value.isFile()) { setPropertyValue(LAST_OPEN_PATH, value.getParentFile() .getAbsolutePath()); } else if (value != null && value.exists() && value.isDirectory()) { setPropertyValue(LAST_OPEN_PATH, value.getAbsolutePath()); } return this; } COM: <s> sets the last open path to remember it for further open or save </s>
funcom_train/51339822
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Leaf seek(final byte[] key) { stack.clear(); AbstractNode<?> node = getRoot(); while(!node.isLeaf()) { final Node n = (Node)node; final int index = n.findChild(key); stack.push( n ); node = n.getChild( index ); } return leaf = (Leaf)node; } COM: <s> descend from the root node to the leaf spanning that key </s>
funcom_train/35195357
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LongArray without(final int i) { final long[] newArr = new long[longs.length - 1]; System.arraycopy(longs, 0, newArr, 0, i); System.arraycopy(longs, i + 1, newArr, i, newArr.length - i); return new LongArray(newArr); } COM: <s> return a new code long array code that contains the same elements </s>
funcom_train/12801373
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initializeConnection () { if (RCMain.getRCMain().connected()) { Client client = RCMain.getRCMain().getClient(); client.transactionStart(); client.getDownloadManager().update(true); client.getUserManager().update(); // Pull the remote info client.getRemoteInfo().load(); // pull the upload download settings client .sendGetAzParameter( RemoteConstants.CORE_PARAM_INT_MAX_UPLOAD_SPEED_KBYTES_PER_SEC, RemoteConstants.PARAMETER_INT); client .sendGetAzParameter( RemoteConstants.CORE_PARAM_INT_MAX_DOWNLOAD_SPEED_KBYTES_PER_SEC, RemoteConstants.PARAMETER_INT); client.sendGetPluginParameter("singleUserMode", RemoteConstants.PARAMETER_BOOLEAN); client.transactionCommit(); } } COM: <s> call when a successfull connection occurs </s>
funcom_train/3391603
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeStep(int indent) { print(spaces(4 * indent - 2)); print("<IMG SRC=\"" + relativepathNoSlash + "/resources/inherit.gif\" " + "ALT=\"" + configuration.getText("doclet.extended_by") + " \">"); } COM: <s> generate the indent and get the line image for the class tree </s>
funcom_train/15512803
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PatternFilter createPatternFilter() { try { return new PatternFilter( this.getBaseDirectory(), this.getFileNamePatternAsRegex() ); } catch(Exception x) { try { return new PatternFilter( null, Pattern.compile(".*") ); } catch(IOException iox) { throw new IllegalStateException("Can not instantiate fallback PatternFilter"); } } } COM: <s> returns a pattern filter for this find form </s>
funcom_train/5245928
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void classLoaded (JVM vm){ ClassInfo ci = vm.getLastClassInfo(); if (ci.getName().equals("ajpf.MCAPLSpec")){ miCreateAutomaton = ci.getMethod("createAutomaton()V", false); assert miCreateAutomaton != null; log.fine("found createAutomaton() method:" + miCreateAutomaton); } } COM: <s> setting up the method infos for storage </s>
funcom_train/3917378
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String findItemFromIndex(int index){ Enumeration keys = _itemSequences.keys(); while(keys.hasMoreElements()) { String scoID = (String)keys.nextElement(); ItemSequence anItem = (ItemSequence)_itemSequences.get(scoID); if (anItem.getSequence() == index){ return anItem.getItemId(); } } return null; } COM: <s> a method to find a sco id from the itemsequence hashtable based </s>
funcom_train/23411201
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTransitionIDPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Transition_transitionID_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Transition_transitionID_feature", "_UI_Transition_type"), OMPackage.Literals.TRANSITION__TRANSITION_ID, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the transition id feature </s>
funcom_train/35460946
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private VaryingType getVaryingType(final TreeAdaptor adaptor, final Object stringNode) { String varying = ASTUtils.getAttributeStringValue( adaptor, stringNode, PLIStructureParser.VARYING, null); return (varying == null) ? VaryingType.NONVARYING : VaryingType.valueOf(varying); } COM: <s> get the varying type </s>
funcom_train/2711671
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer sb = new StringBuffer(super.toString()); sb.append(" - {name: ").append(getName() ); sb.append(" type: " ).append(type ); sb.append(" uri: " ).append(getSourceURI()); sb.append("}" ); return sb.toString(); } COM: <s> a string representation of this object </s>
funcom_train/9579816
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getProperty(final String key, final String def) { try { return System.getProperty(key, def); } catch (final Throwable e) { // MS-Java throws com.ms.security.SecurityExceptionEx LOG.debug("Was not allowed to read system property \"" + key + "\"."); return def; } } COM: <s> very similar to code system </s>
funcom_train/10841965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCreateNodeWithInvalidExactName() throws IOException { String location = postUrl + SlingPostConstants.DEFAULT_CREATE_SUFFIX; List<NameValuePair> postParams = new ArrayList<NameValuePair>(); postParams.add(new NameValuePair(SlingPostConstants.RP_NODE_NAME, "exactNodeName*")); //expect a 500 status since the name is invalid assertPostStatus(location, HttpServletResponse.SC_INTERNAL_SERVER_ERROR, postParams, null); } COM: <s> sling 1091 test error reporting when attempting to create a node with an </s>
funcom_train/8877682
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean convertToBoolean(String value) { if (value == null) { return false; } if (Boolean.TRUE.toString().toLowerCase().equals(value.toLowerCase()) || YES.toLowerCase().equals(value.toLowerCase()) || ONE.equals(value.toLowerCase())) { return true; } return false; } COM: <s> convert to boolean </s>
funcom_train/28272721
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadAddressInfo(){ if (customer==null) { // user is ot lgged in } else if (primaryAddress==null) { Integer defaultAddress = customer.getCustomersDefaultAddressId(); Set<AddressBook> set = customer.getAddressBooks(); for(AddressBook book:set) { if (defaultAddress.equals(book.getAddressBookId())) { primaryAddress = book; break; } } refreshLocaleData(); } else { //addressbook already initialized } } COM: <s> load address info </s>
funcom_train/50858461
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Hashtable getParameters(Node subNode) { Hashtable result = new Hashtable(); for(int j = 0; j < subNode.getChildNodes().getLength(); j++) { Node subNodePar = subNode.getChildNodes().item(j); Parameter par = processParameter(subNodePar); if(par != null) { result.put(par.getName(), par); } } return result; } COM: <s> parses and return parameters within other configuration tags </s>
funcom_train/21105449
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private MJTextField getNumberOfDaysEdit() { if (numberOfDaysEdit == null) { numberOfDaysEdit = new MJTextField(); numberOfDaysEdit.setPreferredSize(new Dimension(50, 20)); numberOfDaysEdit.setContentType(MJTextField.ContentType.ctInteger); } return numberOfDaysEdit; } COM: <s> this method initializes number of days edit </s>
funcom_train/2380754
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void savePreferences() { IPreferenceStore store = PlexPlugin.getDefault().getPreferenceStore(); store.setValue(IPlexPreferenceConstants.PREFS_BROWSERVIEW_RESTORE_URL, _restoreLastUrl); store.setValue(IPlexPreferenceConstants.PREFS_BROWSERVIEW_URL, _storedUrl); } COM: <s> save local view preferences </s>
funcom_train/9086745
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(Apartments entity) { EntityManagerHelper.log("deleting Apartments instance", Level.INFO, null); try { entity = getEntityManager().getReference(Apartments.class, entity.getId()); getEntityManager().remove(entity); EntityManagerHelper.log("delete successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("delete failed", Level.SEVERE, re); throw re; } } COM: <s> delete a persistent apartments entity </s>
funcom_train/18337059
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void parseMethod(String method) throws HttpException { if (method.equals(HttpConstants.METHOD_GET)) { this.method = HttpConstants.METHOD_GET; } else if (method.equals(HttpConstants.METHOD_POST)) { this.method = HttpConstants.METHOD_POST; } else { throw new HttpException(HttpConstants.STATUS_NOT_IMPLEMENTED, method); } } COM: <s> parses the connection method </s>
funcom_train/22769329
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public XDimension getDimension() { PaloTreeNode node = (PaloTreeNode)getTreeModel().getRoot(); XObject object = node.getXObject(); object = XHelper.findBackByType(object, IXConsts.TYPE_DIMENSION); XDimension dimension = (XDimension)object; return dimension; } COM: <s> returns dimension of the element of the node </s>
funcom_train/45121633
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addVisibleListPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_AbstractField_visibleList_feature"), getString("_UI_PropertyDescriptor_description", "_UI_AbstractField_visibleList_feature", "_UI_AbstractField_type"), DictionaryPackage.Literals.ABSTRACT_FIELD__VISIBLE_LIST, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, getString("_UI_FormGridPropertyCategory"), null)); } COM: <s> this adds a property descriptor for the visible list feature </s>
funcom_train/10007589
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int onlinePlayers(int x, int y) { int onlineUsers = 0; for (int i = 0; i < players.length; i++) if (players[i] != null) if (players[i].absX <= x + 20 && players[i].absX >= x - 20 && players[i].absY <= y + 20 && players[i].absY >= y - 20) onlineUsers++; return onlineUsers; } COM: <s> tells how many players are in a 40x40 area aka local players </s>
funcom_train/34353003
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object other) { if (other == this) return true; if (other == null) return false; if (other.getClass() != OntologyTerm.class) return false; OntologyTerm term = (OntologyTerm) other; return url.equals(term.url) && type.equals(term.type); } COM: <s> returns whether or not another object is equivalent to this </s>
funcom_train/34838328
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ReasonerController createReasonerController(String language_type) throws GlueException { if ((language_type==null)||(language_type=="")) { throw new GlueException("You must specify a language type to create a new ReasonerController"); } if (language_type.equalsIgnoreCase("wsml")) return new WsmlReasonerController(config_dir); else return null; } COM: <s> create a new reasoner controller service component </s>