Program: 32857
Project: 32857
Buggy source:
/** 
 * Tests a large set of random events.
 */
public void testLargeRandomSet(){
  source=new BasicEventList();
  IntArrayFilterList filterList=new IntArrayFilterList(source);
  unique=new UniqueList(filterList,new IntArrayComparator(0));
  SortedList sorted=new SortedList(filterList,new IntArrayComparator(0));
  for (int i=0; i < 20; i++) {
    int value=random.nextInt(10);
    int[] array=new int[]{value,random.nextInt(2),random.nextInt(2),random.nextInt(2)};
    source.add(array);
  }
  for (int i=0; i < 100; i++) {
    int filterColumn=random.nextInt(3);
    filterList.setFilter(filterColumn + 1,1);
    SortedSet controlSet=new TreeSet(new IntArrayComparator(0));
    controlSet.addAll(filterList);
    ArrayList controlList=new ArrayList();
    controlList.addAll(controlSet);
    Collections.sort(controlList,new IntArrayComparator(0));
    System.out.println("String_Node_Str" + unique.size() + "String_Node_Str"+ controlList.size());
    if (unique.size() != controlList.size())     System.out.print("String_Node_Str");
    for (int j=0; unique.size() != controlList.size() && j < unique.size(); j++) {
      System.out.print(((int[])unique.get(j))[0] + "String_Node_Str");
    }
    if (unique.size() != controlList.size())     System.out.println("String_Node_Str");
    if (unique.size() != controlList.size())     System.out.print("String_Node_Str");
    for (int j=0; unique.size() != controlList.size() && j < controlList.size(); j++) {
      System.out.print(((int[])controlList.get(j))[0] + "String_Node_Str");
    }
    if (unique.size() != controlList.size())     System.out.println("String_Node_Str");
    if (unique.size() != controlList.size())     System.out.print("String_Node_Str");
    for (int j=0; unique.size() != controlList.size() && j < filterList.size(); j++) {
      System.out.print(((int[])filterList.get(j))[0] + "String_Node_Str");
    }
    if (unique.size() != controlList.size())     System.out.println("String_Node_Str");
    if (unique.size() != controlList.size())     System.out.print("String_Node_Str");
    for (int j=0; unique.size() != controlList.size() && j < sorted.size(); j++) {
      System.out.print(((int[])sorted.get(j))[0] + "String_Node_Str");
    }
    if (unique.size() != controlList.size())     System.out.println("String_Node_Str");
    assertEquals(unique.size(),controlList.size());
    for (int j=0; j < unique.size(); j++) {
      assertEquals(((int[])unique.get(j))[0],((int[])controlList.get(j))[0]);
    }
  }
}

Fixed version (ground truth):
/** 
 * Tests a large set of random events.
 */
public void testLargeRandomSet(){
  source=new BasicEventList();
  IntArrayFilterList filterList=new IntArrayFilterList(source);
  unique=new UniqueList(filterList,new IntArrayComparator(0));
  SortedList sorted=new SortedList(filterList,new IntArrayComparator(0));
  for (int i=0; i < 1000; i++) {
    int value=random.nextInt(1000);
    int[] array=new int[]{value,random.nextInt(2),random.nextInt(2),random.nextInt(2)};
    source.add(array);
  }
  for (int i=0; i < 10; i++) {
    int filterColumn=random.nextInt(3);
    filterList.setFilter(filterColumn + 1,1);
    SortedSet controlSet=new TreeSet(new IntArrayComparator(0));
    controlSet.addAll(filterList);
    ArrayList controlList=new ArrayList();
    controlList.addAll(controlSet);
    Collections.sort(controlList,new IntArrayComparator(0));
    assertEquals(unique.size(),controlList.size());
    for (int j=0; j < unique.size(); j++) {
      assertEquals(((int[])unique.get(j))[0],((int[])controlList.get(j))[0]);
    }
  }
}