Returns the parses from {@code parses} whose scores are
equal to the highest score.

@param parses
@return
551573
private static List<CcgParse> filterToMaxScoring(List<CcgParse> parses) {
    List<CcgParse> maxParses = Lists.newArrayList();
    if (parses.size() > 0) {
      double bestScore = parses.get(0).getSubtreeProbability();
      for (CcgParse parse : parses) {
        if (parse.getSubtreeProbability() >= bestScore) {
          maxParses.add(parse);
        }
      }
    }
    return maxParses;
  }
1080195
public void calcScore()
  {

    if ((getPredicateCount() > 0) || (null != m_relativePathPattern))
    {
      m_score = SCORE_OTHER;
    }
    else
      super.calcScore();

    if (null == m_targetString)
      calcTargetString();
  }
1355430
public double[] getAllPairsScores() {
		double[] scores = new double[scorers.size()];
		int n = 0;
		for (PairwiseSequenceScorer<S, C> scorer : scorers) {
			scores[n++] = scorer.getScore();
		}
		return scores;
	}
354802
@SuppressWarnings({"unchecked", "rawtypes"})
  @Private static <T> Parser<T>[] toArray(Iterable<? extends Parser<? extends T>> parsers) {
    if (parsers instanceof Collection<?>) {
      return toArray((Collection) parsers);
    }
    return toArrayWithIteration(parsers);
  }
142093
private double maxScore(List<InetAddress> endpoints)
    {
        double maxScore = -1.0;
        for (InetAddress endpoint : endpoints)
        {
            Double score = scores.get(endpoint);
            if (score == null)
                continue;

            if (score > maxScore)
                maxScore = score;
        }
        return maxScore;
    }
1255217
public static StringBuilder under_score(final StringBuilder sb, final String... tokens) {
        return Strings.join(sb, "_", allToLower(tokens));
    }
378441
private double naiveQuerySparse(SparseNumberVector obj, WritableDoubleDataStore scores, HashSetModifiableDBIDs cands) {
    double len = 0.; // Length of query object, for final normalization
    for(int iter = obj.iter(); obj.iterValid(iter); iter = obj.iterAdvance(iter)) {
      final int dim = obj.iterDim(iter);
      final double val = obj.iterDoubleValue(iter);
      if(val == 0. || val != val) {
        continue;
      }
      len += val * val;
      // No matching documents in index:
      if(dim >= index.size()) {
        continue;
      }
      ModifiableDoubleDBIDList column = index.get(dim);
      for(DoubleDBIDListIter n = column.iter(); n.valid(); n.advance()) {
        scores.increment(n, n.doubleValue() * val);
        cands.add(n);
      }
    }
    return FastMath.sqrt(len);
  }
572753
public static List<AbstractWarningsParser> getParsers(final Collection<String> parserGroups) {
        List<AbstractWarningsParser> actualParsers = new ArrayList<AbstractWarningsParser>();
        for (String name : parserGroups) {
            for (AbstractWarningsParser warningsParser : getAllParsers()) {
                if (warningsParser.isInGroup(name)) {
                    actualParsers.add(warningsParser);
                }
            }
        }
        return actualParsers;
    }
75290
public static <T extends Comparable<T>> T max(T lhs, T rhs) {
        return BinaryOperator.maxBy(new ComparableComparator<T>()).apply(lhs, rhs);
    }
1300352
public static Collection<DisqueNode> parse(String nodes) {
        List<DisqueNode> result = new ArrayList<>();

        Iterator<String> iterator = TOKEN_PATTERN.splitAsStream(nodes).iterator();

        try {
            while (iterator.hasNext()) {
                String node = iterator.next();
                DisqueNode partition = parseNode(node);
                result.add(partition);
            }

        } catch (Exception e) {
            throw new RedisException("Cannot parse " + nodes, e);
        }

        return result;
    }
233146
private Set<String> parseInstanceIDs(final Map<String, String[]> queryParams) {
        Set<String> ret = new TreeSet<String>();

        Set<Map.Entry<String, String[]>> entries = queryParams.entrySet();
        for (Map.Entry<String, String[]> entry : entries) {
            if (null != entry && null != entry.getKey()
                    && entry.getKey().matches("InstanceId\\.(\\d)+")) {
                if (null != entry.getValue() && entry.getValue().length > 0) {
                    ret.add(entry.getValue()[0]);
                }
            }
        }
        return ret;
    }
500966
public static long max(final long[] values) {
		long max = Long.MIN_VALUE;
		if (values.length > 0) {
			max = values[0];

			for (int i = 0; i < values.length; ++i) {
				if (values[i] > max) {
					max = values[i];
				}
			}
		}

		return max;
	}
1118042
public Map<String, String> parseArgs(String[] args) {

        Map<String, String> result = new HashMap<String, String>();
        Set<String> allowedKeys = new HashSet<String>(
            Arrays.asList(PARAM_ADDITIONAL, PARAM_SCRIPT, PARAM_REGISTRY_PORT));
        for (String arg : args) {
            if (arg.startsWith("-")) {
                int eqPos = arg.indexOf("=");
                if (eqPos >= 0) {
                    String key = arg.substring(1, eqPos);
                    if (!allowedKeys.contains(key)) {
                        wrongUsage();
                    }
                    String val = arg.substring(eqPos + 1);
                    result.put(key, val);
                } else {
                    wrongUsage();
                }
            } else {
                wrongUsage();
            }
        }
        return result;
    }
52673
public static <T> ImmutableMap<T, Double> asMapKeepingHigestScore(
      final Iterable<Scored<T>> scoredItems) {
    final Map<T, Double> ret = Maps.newHashMap();

    for (final Scored<T> scoredItem : scoredItems) {
      final Double curScore = ret.get(scoredItem.item());
      if (curScore != null) {
        if (scoredItem.score() > curScore) {
          ret.put(scoredItem.item(), scoredItem.score());
        }
      } else {
        ret.put(scoredItem.item(), scoredItem.score());
      }
    }

    return ImmutableMap.copyOf(ret);
  }
1367742
private Map<String, Integer> parseMinDays(JsonObject root) {
    JsonObject node = resolve(root, "supplemental", "weekData", "minDays");
    Map<String, Integer> m = new HashMap<>();
    for (String key : objectKeys(node)) {
      m.put(key, Integer.valueOf(string(node, key)));
    }
    return m;
  }
1210155
private void parse(Annotation[] annotations) {
		Class<? extends Annotation> annotationType;
		for (Annotation annotation : annotations) {
			annotationType = annotation.annotationType();
			if (false == META_ANNOTATIONS.contains(annotationType)) {
				annotationMap.put(annotationType, annotation);
				parse(annotationType.getAnnotations());
			}
		}
	}
1282488
public double score(StringWrapper s, StringWrapper t) {
	String S = s.unwrap(),
	  T =t.unwrap();
    totalScore = 0.0;
    if (S.equals(T)) {
      matched = S.length();
      return 1.0;
    }
    else {
      sSize = S.length();
      tSize = T.length();
      // let S be the largest token
      if (sSize < tSize) {
        String tmp1 = S;
        S = T;
        T = tmp1;
        double tmp2 = sSize;
        sSize = tSize;
        tSize = tmp2;
        tokenT = T;
      }
      tokenT = S;
      ArrayList candidateList = algorithm1(S, T);
      sortList(candidateList);
      totalScore = getScore(candidateList);
      totalScore = (totalScore / ( (double) sSize) + totalScore / ( (double) tSize)) / 2.0;
      return winkler(totalScore, S, T);
    }
  }