private static <T>void findUniqueGoals(Map<TestCase,Set<T>> testToGoals){
  Map<TestCase,Set<T>> goalMapCopy=new LinkedHashMap<>();
  for (  Map.Entry<TestCase,Set<T>> entry : testToGoals.entrySet()) {
    Set<T> goalSet=new LinkedHashSet<T>(entry.getValue());
    for (    Map.Entry<TestCase,Set<T>> otherEntry : testToGoals.entrySet()) {
      if (entry == otherEntry)       continue;
      goalSet.removeAll(otherEntry.getValue());
    }
    goalMapCopy.put(entry.getKey(),goalSet);
  }
  testToGoals.clear();
  testToGoals.putAll(goalMapCopy);
}

private static < T > void findUniqueGoals ( Map < TestCase , Set < T > > testToGoals ) { Map < TestCase , Set < T > > goalMapCopy = new LinkedHashMap < > ( ) ; for ( Map . Entry < TestCase , Set < T > > entry : testToGoals . entrySet ( ) ) { Set < T > goalSet = new LinkedHashSet < T > ( entry . getValue ( ) ) ; for ( Map . Entry < TestCase , Set < T > > otherEntry : testToGoals . entrySet ( ) ) { if ( entry == otherEntry ) continue ; goalSet . removeAll ( otherEntry . getValue ( ) ) ; } goalMapCopy . put ( entry . getKey ( ) , goalSet ) ; } testToGoals . clear ( ) ; testToGoals . putAll ( goalMapCopy ) ; }
determine for each test the set of coverage goals uniquely covered by this test
