DuplicateScoringSupport { public static <T> double scoreElementOverlap(Collection<T> a, Collection<T> b) { return scoreElementOverlap(a, b, new HashSet<T>()); }  static double scoreElementOverlap(Collection<T> a, Collection<T> b); static double scoreElementOverlap(Collection<T> a,
      Collection<T> b, Set<T> common); static double scoreElementOverlap(SortedSet<T> a, SortedSet<T> b); static double scoreIntervalOverlap(int[] sourceInterval,
      int[] targetInterval);  }
@Test public void testScoreElementOverlap() { Set<String> a = new HashSet<String>(); Set<String> b = new HashSet<String>(); assertEquals(0.0, DuplicateScoringSupport.scoreElementOverlap(a, b), 0.0); a.add("1"); assertEquals(0.0, DuplicateScoringSupport.scoreElementOverlap(a, b), 0.0); b.add("1"); assertEquals(1.0, DuplicateScoringSupport.scoreElementOverlap(a, b), 0.0); a.add("2"); assertEquals(0.75, DuplicateScoringSupport.scoreElementOverlap(a, b), 0.0); b.add("3"); assertEquals(0.5, DuplicateScoringSupport.scoreElementOverlap(a, b), 0.0); a.remove("1"); assertEquals(0.0, DuplicateScoringSupport.scoreElementOverlap(a, b), 0.0); }