Program: 108808
Project: 108808
Buggy source:
@Override public GroupStatistics[] getGroupStatistics(){
  double averageEquivalenceClassSize=0;
  int maximalEquivalenceClassSize=Integer.MIN_VALUE;
  int minimalEquivalenceClassSize=Integer.MAX_VALUE;
  int numberOfEquivalenceClasses=0;
  int numberOfOutlyingEquivalenceClasses=0;
  int numberOfOutlyingTuples=0;
  if (subset == null) {
    HashGroupifyEntry entry=firstEntry;
    while (entry != null) {
      final boolean anonymous=isAnonymous(entry);
      if (!anonymous) {
        numberOfOutlyingEquivalenceClasses++;
        numberOfOutlyingTuples+=entry.count;
      }
 else {
        numberOfEquivalenceClasses++;
        averageEquivalenceClassSize+=entry.count;
        maximalEquivalenceClassSize=Math.max(maximalEquivalenceClassSize,entry.count);
        minimalEquivalenceClassSize=Math.min(minimalEquivalenceClassSize,entry.count);
      }
      entry=entry.nextOrdered;
    }
    averageEquivalenceClassSize=averageEquivalenceClassSize / (double)(numberOfEquivalenceClasses);
    return new GroupStatistics[]{new GroupStatistics(averageEquivalenceClassSize,maximalEquivalenceClassSize,minimalEquivalenceClassSize,numberOfEquivalenceClasses,numberOfOutlyingEquivalenceClasses,numberOfOutlyingTuples),new GroupStatistics(averageEquivalenceClassSize,maximalEquivalenceClassSize,minimalEquivalenceClassSize,numberOfEquivalenceClasses,numberOfOutlyingEquivalenceClasses,numberOfOutlyingTuples)};
  }
 else {
    double pAverageEquivalenceClassSize=0;
    int pMaximalEquivalenceClassSize=Integer.MIN_VALUE;
    int pMinimalEquivalenceClassSize=Integer.MAX_VALUE;
    int pNumberOfEquivalenceClasses=this.size();
    int pNumberOfOutlyingEquivalenceClasses=0;
    int pNumberOfOutlyingTuples=0;
    HashGroupifyEntry entry=firstEntry;
    while (entry != null) {
      final boolean anonymous=isAnonymous(entry);
      if (!anonymous) {
        if (entry.pcount > 0) {
          numberOfOutlyingEquivalenceClasses++;
          numberOfOutlyingTuples+=entry.pcount;
        }
        if (entry.count > 0) {
          pNumberOfOutlyingEquivalenceClasses++;
          pNumberOfOutlyingTuples+=entry.count;
        }
      }
 else {
        if (entry.pcount > 0) {
          averageEquivalenceClassSize+=entry.pcount;
          maximalEquivalenceClassSize=Math.max(maximalEquivalenceClassSize,entry.pcount);
          minimalEquivalenceClassSize=Math.min(minimalEquivalenceClassSize,entry.pcount);
        }
        if (entry.count > 0) {
          numberOfEquivalenceClasses++;
          pAverageEquivalenceClassSize+=entry.count;
          pMaximalEquivalenceClassSize=Math.max(pMaximalEquivalenceClassSize,entry.count);
          pMinimalEquivalenceClassSize=Math.min(pMinimalEquivalenceClassSize,entry.count);
        }
      }
      entry=entry.nextOrdered;
    }
    averageEquivalenceClassSize=averageEquivalenceClassSize / (double)(numberOfEquivalenceClasses);
    pAverageEquivalenceClassSize=pAverageEquivalenceClassSize / (double)(pNumberOfEquivalenceClasses - pNumberOfOutlyingEquivalenceClasses);
    return new GroupStatistics[]{new GroupStatistics(averageEquivalenceClassSize,maximalEquivalenceClassSize,minimalEquivalenceClassSize,numberOfEquivalenceClasses,numberOfOutlyingEquivalenceClasses,numberOfOutlyingTuples),new GroupStatistics(pAverageEquivalenceClassSize,pMaximalEquivalenceClassSize,pMinimalEquivalenceClassSize,pNumberOfEquivalenceClasses,pNumberOfOutlyingEquivalenceClasses,pNumberOfOutlyingTuples)};
  }
}

Fixed version (ground truth):
@Override public GroupStatistics getGroupStatistics(){
  double averageEquivalenceClassSize=0;
  int averageEquivalenceClassSizeCounter=0;
  int maximalEquivalenceClassSize=Integer.MIN_VALUE;
  int minimalEquivalenceClassSize=Integer.MAX_VALUE;
  int numberOfEquivalenceClasses=0;
  int numberOfOutlyingEquivalenceClasses=0;
  int numberOfOutlyingTuples=0;
  HashGroupifyEntry entry=firstEntry;
  while (entry != null) {
    if (entry.count > 0) {
      final boolean anonymous=isAnonymous(entry);
      numberOfEquivalenceClasses++;
      if (!anonymous) {
        numberOfOutlyingEquivalenceClasses++;
        numberOfOutlyingTuples+=entry.count;
      }
 else {
        averageEquivalenceClassSizeCounter+=entry.count;
        maximalEquivalenceClassSize=Math.max(maximalEquivalenceClassSize,entry.count);
        minimalEquivalenceClassSize=Math.min(minimalEquivalenceClassSize,entry.count);
      }
    }
    entry=entry.nextOrdered;
  }
  averageEquivalenceClassSize=(double)averageEquivalenceClassSizeCounter / (double)(numberOfEquivalenceClasses - numberOfOutlyingEquivalenceClasses);
  double averageEquivalenceClassSizeAll=(double)(averageEquivalenceClassSizeCounter + numberOfOutlyingTuples) / (double)(numberOfEquivalenceClasses - numberOfOutlyingEquivalenceClasses + 1);
  int maximalEquivalenceClassSizeAll=Math.max(maximalEquivalenceClassSize,numberOfOutlyingTuples);
  int minimalEquivalenceClassSizeAll=Math.min(minimalEquivalenceClassSize,numberOfOutlyingTuples);
  return new GroupStatistics(averageEquivalenceClassSize,maximalEquivalenceClassSize,minimalEquivalenceClassSize,averageEquivalenceClassSizeAll,maximalEquivalenceClassSizeAll,minimalEquivalenceClassSizeAll,numberOfEquivalenceClasses,numberOfOutlyingEquivalenceClasses,numberOfOutlyingTuples);
}