class IssueAggregation {

  @Nonnull
  @VisibleForTesting
  static Map<ParseWarningTriplet, Multimap<String, Integer>> aggregateDuplicateParseWarnings(
      Map<String, Warnings> fileWarnings) {
    Map<ParseWarningTriplet, Multimap<String, Integer>> map = new HashMap<>();
    fileWarnings.forEach(
        (filename, warnings) -> {
          for (ParseWarning w : warnings.getParseWarnings()) {
            ParseWarningTriplet triplet = new ParseWarningTriplet(w);
            map.computeIfAbsent(triplet, k -> HashMultimap.create()).put(filename, w.getLine());
          }
        });
    return map;
  }

}