Program: 34410
Project: 34410
Buggy source:
public Iterator<Instance> getReachables(){
  return new TreeIterator<Instance,Instance>(root){
    @Override protected Iterator<Instance> getSameLevelIterator(    Instance popped){
      Collection<Instance> instances=new ArrayList<Instance>();
      for (      Object fv : popped.getFieldValues()) {
        if (fv instanceof ObjectFieldValue) {
          if (excludes == null || !excludes.isExcluded(getFQFieldName(((FieldValue)fv).getField()))) {
            Instance i=((ObjectFieldValue)fv).getInstance();
            if (i != null) {
              instances.add(i);
            }
          }
        }
      }
      if (popped instanceof ObjectArrayInstance) {
        instances.addAll(((ObjectArrayInstance)popped).getValues());
      }
      return instances.iterator();
    }
    @Override protected Iterator<Instance> getTraversingIterator(    Instance popped){
      Collection<Instance> instances=new ArrayList<Instance>();
      for (      Object fv : popped.getFieldValues()) {
        if (fv instanceof ObjectFieldValue) {
          if (excludes == null || !excludes.isExcluded(getFQFieldName(((FieldValue)fv).getField()))) {
            Instance i=((ObjectFieldValue)fv).getInstance();
            if (i != null) {
              instances.add(i);
            }
          }
        }
      }
      if (popped instanceof ObjectArrayInstance) {
        instances.addAll(((ObjectArrayInstance)popped).getValues());
      }
      return instances.iterator();
    }
  }
;
}

Fixed version (ground truth):
public Iterator<Instance> getReachables(){
  return new TreeIterator<Instance,Instance>(root){
    @Override protected Iterator<Instance> getSameLevelIterator(    Instance popped){
      Collection<Instance> instances=new ArrayList<Instance>();
      for (      Object fv : popped.getFieldValues()) {
        if (fv instanceof ObjectFieldValue) {
          if (excludes == null || !excludes.isExcluded(getFQFieldName(((FieldValue)fv).getField()))) {
            Instance i=((ObjectFieldValue)fv).getInstance();
            if (i != null && !alreadyReached.contains(i)) {
              instances.add(i);
              alreadyReached.add(i);
            }
          }
        }
      }
      if (popped instanceof ObjectArrayInstance) {
        for (        Object el : ((ObjectArrayInstance)popped).getValues()) {
          Instance i=(Instance)el;
          if (i != null && !alreadyReached.contains(i)) {
            instances.add(i);
            alreadyReached.add(i);
          }
        }
      }
      return instances.iterator();
    }
    @Override protected Iterator<Instance> getTraversingIterator(    Instance popped){
      Collection<Instance> instances=new ArrayList<Instance>();
      for (      Object fv : popped.getFieldValues()) {
        if (fv instanceof ObjectFieldValue) {
          if (excludes == null || !excludes.isExcluded(getFQFieldName(((FieldValue)fv).getField()))) {
            Instance i=((ObjectFieldValue)fv).getInstance();
            if (i != null) {
              instances.add(i);
            }
          }
        }
      }
      if (popped instanceof ObjectArrayInstance) {
        for (        Object el : ((ObjectArrayInstance)popped).getValues()) {
          if (el instanceof Instance) {
            instances.add((Instance)el);
          }
        }
      }
      return instances.iterator();
    }
  }
;
}