Program: 35299
Project: 35299
Buggy source:
public DuplicateDetectionResult detectDuplicates(List<SearchResultItem> results){
  Stopwatch stopwatch=Stopwatch.createStarted();
  Map<String,List<SearchResultItem>> groupedByTitle=results.stream().collect(Collectors.groupingBy(x -> x.getTitle().replaceFirst("String_Node_Str","String_Node_Str")));
  Multiset<Indexer> countUniqueResultsPerIndexer=HashMultiset.create();
  List<TreeSet<SearchResultItem>> duplicateGroups=new ArrayList<>();
  int countDetectedDuplicates=0;
  int duplicateIdentifier=1;
  for (  List<SearchResultItem> titleGroup : groupedByTitle.values()) {
    titleGroup=titleGroup.stream().sorted(Comparator.comparing(SearchResultItem::getPubDate).reversed()).collect(Collectors.toList());
    List<TreeSet<SearchResultItem>> listOfBuckets=new ArrayList<>();
    listOfBuckets.add(new TreeSet<>(newArrayList(titleGroup.get(0))));
    for (int i=1; i < titleGroup.size(); i++) {
      SearchResultItem searchResultItem=titleGroup.get(i);
      boolean foundBucket=false;
      for (      TreeSet<SearchResultItem> bucket : listOfBuckets) {
        for (        SearchResultItem other : bucket) {
          boolean same=testForSameness(searchResultItem,other);
          if (same) {
            foundBucket=true;
            searchResultItem.setDuplicateIdentifier(duplicateIdentifier);
            bucket.add(searchResultItem);
            countDetectedDuplicates++;
            break;
          }
        }
        if (foundBucket) {
          break;
        }
      }
      if (!foundBucket) {
        searchResultItem.setDuplicateIdentifier(duplicateIdentifier++);
        listOfBuckets.add(new TreeSet<>(newArrayList(searchResultItem)));
      }
    }
    TreeSet<SearchResultItem> lastBucket=Iterables.getLast(listOfBuckets);
    if (lastBucket.size() == 1) {
      countUniqueResultsPerIndexer.add(lastBucket.first().getIndexer());
    }
    duplicateGroups.addAll(listOfBuckets);
  }
  logger.info("String_Node_Str",results.size(),stopwatch.elapsed(TimeUnit.MILLISECONDS),countDetectedDuplicates);
  return new DuplicateDetectionResult(duplicateGroups,countUniqueResultsPerIndexer);
}

Fixed version (ground truth):
public DuplicateDetectionResult detectDuplicates(List<SearchResultItem> results){
  Stopwatch stopwatch=Stopwatch.createStarted();
  Map<String,List<SearchResultItem>> groupedByTitle=results.stream().collect(Collectors.groupingBy(x -> x.getTitle().replaceFirst("String_Node_Str","String_Node_Str")));
  Multiset<Indexer> countUniqueResultsPerIndexer=HashMultiset.create();
  List<TreeSet<SearchResultItem>> duplicateGroups=new ArrayList<>();
  int countDetectedDuplicates=0;
  int duplicateIdentifier=1;
  for (  List<SearchResultItem> titleGroup : groupedByTitle.values()) {
    titleGroup=titleGroup.stream().sorted(Comparator.comparing(SearchResultItem::getPubDate).reversed()).collect(Collectors.toList());
    List<TreeSet<SearchResultItem>> listOfBuckets=new ArrayList<>();
    listOfBuckets.add(new TreeSet<>(newArrayList(titleGroup.get(0))));
    for (int i=1; i < titleGroup.size(); i++) {
      SearchResultItem searchResultItem=titleGroup.get(i);
      boolean foundBucket=false;
      for (      TreeSet<SearchResultItem> bucket : listOfBuckets) {
        for (        SearchResultItem other : bucket) {
          boolean same=testForSameness(searchResultItem,other);
          if (same) {
            foundBucket=true;
            searchResultItem.setDuplicateIdentifier(duplicateIdentifier);
            bucket.add(searchResultItem);
            countDetectedDuplicates++;
            break;
          }
        }
        if (foundBucket) {
          break;
        }
      }
      if (!foundBucket) {
        searchResultItem.setDuplicateIdentifier(duplicateIdentifier++);
        listOfBuckets.add(new TreeSet<>(newArrayList(searchResultItem)));
      }
    }
    TreeSet<SearchResultItem> lastBucket=Iterables.getLast(listOfBuckets);
    if (lastBucket.size() == 1) {
      countUniqueResultsPerIndexer.add(lastBucket.first().getIndexer());
    }
    duplicateGroups.addAll(listOfBuckets);
  }
  logger.debug(LoggingMarkers.PERFORMANCE,"String_Node_Str",results.size(),stopwatch.elapsed(TimeUnit.MILLISECONDS),countDetectedDuplicates);
  return new DuplicateDetectionResult(duplicateGroups,countUniqueResultsPerIndexer);
}