Converts a list of {@link BrowserUsageData} into a list of
{@link PointSeries} containing the data about the browsers.
491017
private PointSeries toBrowserSeries(final List<BrowserUsageData> browserUsage) {
    PointSeries browserSeries = new PointSeries();
    for (BrowserUsageData browserData : browserUsage) {
      browserSeries
          .addPoint(new Point(browserData
              .getBrowserName(), browserData
              .getMarketShare(), browserData
              .getColor()));
    }
    return browserSeries;
  }
330845
public void foreach(PixelFunction fn) {
        Arrays.stream(points()).forEach(p -> fn.apply(p.x, p.y, pixel(p)));
    }
1349121
public Point3d[] getVertices() {
        Point3d[] vtxs = new Point3d[numVertices];
        for (int i = 0; i < numVertices; i++) {
            vtxs[i] = pointBuffer[vertexPointIndices[i]].pnt;
        }
        return vtxs;
    }
52724
private List<BrowserUsageData> getBrowserData() {
    List<BrowserUsageData> browserData = new ArrayList<BrowserUsageData>();
    browserData
        .add(getMSIEUsageData());
    browserData
        .add(getFirefoxUsageData());
    browserData
        .add(getChromeUsageData());
    browserData
        .add(getSafariUsageData());
    browserData
        .add(getOperaUsageData());
    return browserData;
  }
190651
public static List<SupportedBrowser> toSupportedBrowsers(String[] browserNames) {
		List<SupportedBrowser> browsers = new ArrayList<>();
		for (String browserName : browserNames) {
			SupportedBrowser browser = SupportedBrowser.valueOf(browserName.toUpperCase());
			if(!browsers.contains(browser))
				browsers.add(browser);
		}
		return browsers;
	}
945427
@Pure
	public Iterable<Point2d> points() {
		return new Iterable<Point2d>() {
			@Override
			public Iterator<Point2d> iterator() {
				return MapComposedElement.this.pointIterator();
			}
		};
	}
1125130
public Collection<EndpointInfo> getEndpointInfos() {

        ArrayList<EndpointInfo> values = new ArrayList<EndpointInfo>();

        Iterator<String> it = getEndpointNames().iterator();
        // for each endpoint name, iterate over it's list of endpoints and add to values
        while (it.hasNext()) {
            List<EndpointInfo> list = endpointInfoMap.get(it.next());
            for (int i = 0; i < list.size(); i++) {
                values.add(list.get(i));
            }
        }
        return Collections.unmodifiableCollection(values);
        //return Collections.unmodifiableCollection(endpointInfoMap.values());
    }
195842
@Pure
	public Iterable<PointGroup> groups() {
		return new Iterable<PointGroup>() {
			@Override
			public Iterator<PointGroup> iterator() {
				return MapComposedElement.this.groupIterator();
			}
		};
	}
1132600
def get_data_as_points
         series_data = {}
         @x.each_pair do |(key, x_series)|
            #For each series of data
            y_series = @y[key]
            series_data[key] = []

            x_series.each_with_index do |x_line, index|
               #For each line
               series_data[key] << [] #Create an empty set
               y_line = y_series[index]
               x_line.each_with_index do |x_point, index|
                  y_point = y_line[index]
                  series_data[key].last << [x_point, y_point]
               end
            end
         end
         return series_data    
      end
1005774
private static String[] getSeriesDataFromCSVRows(File csvFile) {

    String[] xAndYData = new String[3];

    BufferedReader bufferedReader = null;
    try {
      int counter = 0;
      String line;
      bufferedReader = new BufferedReader(new FileReader(csvFile));
      while ((line = bufferedReader.readLine()) != null) {
        xAndYData[counter++] = line;
      }
    } catch (Exception e) {
      System.out.println("Exception while reading csv file: " + e);
    } finally {
      if (bufferedReader != null) {
        try {
          bufferedReader.close();
        } catch (IOException e) {
          e.printStackTrace();
        }
      }
    }
    return xAndYData;
  }
62425
private Set<String> getDataUsageNameList() {
        Set<String> result = new HashSet<>();
        String propertyValue = getProperty(ProcessContextProperty.ALL_DATA_USAGES);
        if (propertyValue == null) {
            return result;
        }
        StringTokenizer attributeTokens = StringUtils.splitArrayString(propertyValue, String.valueOf(ArrayUtils.VALUE_SEPARATION));
        while (attributeTokens.hasMoreTokens()) {
            String nextToken = attributeTokens.nextToken();
            result.add(nextToken);
        }
        return result;
    }
784959
public SimpleFeatureCollection toFeatureCollection(
            List<MonitoringPoint> monitoringPointsList ) {

        // create the feature type
        SimpleFeatureTypeBuilder b = new SimpleFeatureTypeBuilder();
        // set the name
        b.setName("monitoringpoints");
        // add a geometry property
        b.add("the_geom", Point.class);
        // add some properties
        b.add("id", Integer.class);
        b.add("relatedid", Integer.class);
        b.add("pfaf", String.class);
        // build the type
        SimpleFeatureType type = b.buildFeatureType();
        // create the feature
        SimpleFeatureBuilder builder = new SimpleFeatureBuilder(type);

        GeometryFactory gF = new GeometryFactory();
        /*
         * insert them in inverse order to get them out of the collection in the same order as the
         * list
         */
        DefaultFeatureCollection newCollection = new DefaultFeatureCollection();
        for( int i = 0; i < monitoringPointsList.size(); i++ ) {
            MonitoringPoint mp = monitoringPointsList.get(monitoringPointsList.size() - i - 1);

            Object[] values = new Object[]{gF.createPoint(mp.getPosition()), mp.getID(),
                    mp.getRelatedID(), mp.getPfatstetterNumber().toString()};
            // add the values
            builder.addAll(values);
            // build the feature with provided ID
            SimpleFeature feature = builder.buildFeature(type.getTypeName() + "." + i);
            newCollection.add(feature);
        }

        return newCollection;
    }
741719
public Collection<Line> getPoints()
    {
        final Collection<Line> list = new ArrayList<>(npoints);
        for (int i = 0; i < npoints / 2; i++)
        {
            list.add(new Line(xpoints[i], ypoints[i], xpoints[i + npoints / 2], ypoints[i + npoints / 2]));
        }
        return list;
    }
1094476
def powSeries(requestContext, *seriesLists):
    
    if not seriesLists or not any(seriesLists):
        return []
    seriesList, start, end, step = normalize(seriesLists)
    name = "powSeries(%s)" % ','.join([s.name for s in seriesList])
    values = []
    for row in zip_longest(*seriesList):
        first = True
        tmpVal = None
        for element in row:
            # If it is a first iteration - tmpVal needs to be element
            if first:
                tmpVal = element
                first = False
            else:
                tmpVal = safePow(tmpVal, element)
        values.append(tmpVal)
    series = TimeSeries(name, start, end, step, values)
    series.pathExpression = name
    return [series]
370632
public static List<EventData> merge(List<EventData> eventDatas) {
        Map<RowKey, EventData> result = new LinkedHashMap<RowKey, EventData>();
        for (EventData eventData : eventDatas) {
            merge(eventData, result);
        }
        return new LinkedList<EventData>(result.values());
    }
768723
public List<LatLng> getPointsFromMarkers(List<Marker> markers) {
        List<LatLng> points = new ArrayList<LatLng>();
        for (Marker marker : markers) {
            points.add(marker.getPosition());
        }
        return points;
    }
1042316
private void mergeDataPoints() {
    // Merge sorted spans together
    final long merge_start = DateTime.nanoTime();
    for (final List<KeyValue> kvs : kv_map.values()) {
      if (kvs == null || kvs.isEmpty()) {
        LOG.warn("Found a key value list that was null or empty");
        continue;
      }
      
      for (final KeyValue kv : kvs) {
        if (kv == null) {
          LOG.warn("Found a key value item that was null");
          continue;
        }
        if (kv.key() == null) {
          LOG.warn("A key for a kv was null");
          continue;
        }

        Span datapoints = spans.get(kv.key());
        if (datapoints == null) {
          datapoints = RollupQuery.isValidQuery(rollup_query) ?
              new RollupSpan(tsdb, this.rollup_query) : new Span(tsdb);
          spans.put(kv.key(), datapoints);
        }

        if (annotation_map.containsKey(kv.key())) {
          for (final Annotation note: annotation_map.get(kv.key())) {
            datapoints.getAnnotations().add(note);
          }
          annotation_map.remove(kv.key());
        }
        try {  
          datapoints.addRow(kv);
        } catch (RuntimeException e) {
          LOG.error("Exception adding row to span", e);
          throw e;
        }
      }
    }
     
    kv_map.clear();

    for (final byte[] key : annotation_map.keySet()) {
      Span datapoints = spans.get(key);
      if (datapoints == null) {
        datapoints = new Span(tsdb);
        spans.put(key, datapoints);
      }

      for (final Annotation note: annotation_map.get(key)) {
        datapoints.getAnnotations().add(note);
      }
    }
    
    annotation_map.clear();
  }