Program: 4468
Project: 4468
Buggy source:
public void testSet() throws Exception {
  final int MAX_SIZE=8;
  final long EXPIRE_TIME=10 * 1000;
  FixedSizeExpiringSet set=new FixedSizeExpiringSet(MAX_SIZE,EXPIRE_TIME);
  String[] obj=new String[10];
  for (int i=0; i < 10; i++) {
    obj[i]="String_Node_Str" + i;
  }
  long[] timeExpiring=new long[10];
  for (int i=0; i < 10; i++) {
    timeExpiring[i]=System.currentTimeMillis() + EXPIRE_TIME;
    set.add(obj[i]);
    Thread.sleep(150L);
  }
  assertEquals(set.size(),MAX_SIZE);
  assertFalse(set.contains(obj[0]));
  assertFalse(set.contains(obj[1]));
  assertTrue(set.contains(obj[2]));
  set.remove(obj[2]);
  assertFalse(set.contains(obj[1]));
  set.add(obj[0]);
  assertTrue(set.contains(obj[8]));
  assertTrue(set.contains(obj[3]));
  set.remove(obj[3]);
  assertFalse(set.contains(obj[3]));
  set.add(obj[1]);
  assertTrue(set.contains(obj[1]));
  while (set.size() > 0) {
    for (int i=4; i < 10; i++) {
      if (set.contains(obj[i])) {
        assertGreaterThanOrEquals(System.currentTimeMillis(),timeExpiring[i]);
      }
 else {
        assertGreaterThan(timeExpiring[i],System.currentTimeMillis());
      }
    }
    Thread.sleep(100L);
  }
  Collection col=new ArrayList();
  for (int i=0; i < 10; i++)   col.add(obj[i]);
  set.addAll(col);
  assertEquals(set.size(),MAX_SIZE);
  assertFalse(set.contains(obj[8]));
  assertFalse(set.contains(obj[9]));
  assertTrue(set.contains(obj[0]));
  assertTrue(set.contains(obj[1]));
  col.clear();
  for (int i=6; i < 10; i++)   col.add(obj[i]);
  set.removeAll(col);
  for (int i=0; i < 6; i++)   assertTrue(set.contains(obj[i]));
  for (int i=6; i < 10; i++)   assertFalse(set.contains(obj[i]));
  set.clear();
  assertEquals(set.size(),0);
  for (int i=0; i < 10; i++)   set.add(obj[i]);
  set.retainAll(col);
  System.out.println("String_Node_Str" + set.size());
  for (int i=0; i < 6; i++)   assertFalse(set.contains(obj[i]));
  for (int i=6; i < 9; i++)   assertTrue(set.contains(obj[i]));
}

Fixed version (ground truth):
public void testSet() throws Exception {
  empty1.add(nullObj);
  assertTrue(empty1.isEmpty());
  try {
    empty1.addAll(nullColl);
    fail("String_Node_Str");
  }
 catch (  NullPointerException e) {
  }
  empty1.addAll(empty2);
  assertTrue(empty1.isEmpty());
  fastSet.add(empty1);
  Thread.sleep(60);
  assertFalse(fastSet.contains(empty1));
  String[] obj=new String[10];
  for (int i=0; i < 10; i++) {
    obj[i]="String_Node_Str" + i;
  }
  long[] timeExpiring=new long[10];
  for (int i=0; i < 10; i++) {
    timeExpiring[i]=System.currentTimeMillis() + EXPIRE_TIME;
    set.add(obj[i]);
    Thread.sleep(150L);
  }
  assertEquals(set.size(),MAX_SIZE);
  assertFalse(set.contains(obj[0]));
  assertFalse(set.contains(obj[1]));
  assertTrue(set.contains(obj[2]));
  set.remove(obj[2]);
  assertFalse(set.contains(obj[1]));
  set.add(obj[0]);
  assertTrue(set.contains(obj[8]));
  assertTrue(set.contains(obj[3]));
  set.remove(obj[3]);
  assertFalse(set.contains(obj[3]));
  set.add(obj[1]);
  assertTrue(set.contains(obj[1]));
  while (set.size() > 0) {
    for (int i=4; i < 10; i++) {
      if (set.contains(obj[i])) {
        assertGreaterThanOrEquals(System.currentTimeMillis(),timeExpiring[i]);
      }
 else {
        assertGreaterThan(timeExpiring[i],System.currentTimeMillis());
      }
    }
    Thread.sleep(100L);
  }
  Collection col=new ArrayList();
  for (int i=0; i < 10; i++)   col.add(obj[i]);
  set.addAll(col);
  assertEquals(set.size(),MAX_SIZE);
  assertFalse(set.contains(obj[8]));
  assertFalse(set.contains(obj[9]));
  assertTrue(set.contains(obj[0]));
  assertTrue(set.contains(obj[1]));
  col.clear();
  for (int i=6; i < 10; i++)   col.add(obj[i]);
  set.removeAll(col);
  for (int i=0; i < 6; i++)   assertTrue(set.contains(obj[i]));
  for (int i=6; i < 10; i++)   assertFalse(set.contains(obj[i]));
  set.clear();
  assertEquals(set.size(),0);
  for (int i=0; i < 10; i++) {
    set.add(obj[i]);
    Thread.sleep(20);
  }
  for (int i=2; i < 10; i++)   assertTrue(set.contains(obj[i]));
  set.retainAll(col);
  for (int i=0; i < 6; i++)   assertFalse(set.contains(obj[i]));
  for (int i=6; i < 9; i++)   assertTrue(set.contains(obj[i]));
  assertEquals(set.size(),col.size());
  assertTrue(set.containsAll(col));
  set.removeAll(empty1);
  assertEquals(set.size(),col.size());
  set.removeAll(col);
  assertTrue(set.isEmpty());
  Object[] array1=set.toArray();
  assertEquals(array1.length,set.size());
  Object[] array2=set.toArray(array1);
  assertEquals(array1.length,array2.length);
}