Program: 75066
Project: 75066
Buggy source:
public Iterator iterator(){
  return new UnmodifiableIterator(c.iterator()){
    public Object next(){
      final Map.Entry e=(Map.Entry)super.next();
      return new Map.Entry(){
        protected Checkpoint $CHECKPOINT=new Checkpoint(this);
        public boolean equals(        Object o){
          return e.equals(o);
        }
        public Object getKey(){
          return e.getKey();
        }
        public Object getValue(){
          return e.getValue();
        }
        public int hashCode(){
          return e.hashCode();
        }
        public Object setValue(        Object value){
          throw new UnsupportedOperationException();
        }
        public String toString(){
          return e.toString();
        }
        public void $COMMIT(        long timestamp){
          FieldRecord.commit($RECORDS,timestamp,$RECORD$$CHECKPOINT.getTopTimestamp());
          $RECORD$$CHECKPOINT.commit(timestamp);
        }
        public void $RESTORE(        long timestamp,        boolean trim){
          if (timestamp <= $RECORD$$CHECKPOINT.getTopTimestamp()) {
            $CHECKPOINT=$RECORD$$CHECKPOINT.restore($CHECKPOINT,this,timestamp,trim);
            FieldRecord.popState($RECORDS);
          }
        }
        public final Checkpoint $GET$CHECKPOINT(){
          return $CHECKPOINT;
        }
        public final Object $SET$CHECKPOINT(        Checkpoint checkpoint){
          if ($CHECKPOINT != checkpoint) {
            Checkpoint oldCheckpoint=$CHECKPOINT;
            if (checkpoint != null) {
              $RECORD$$CHECKPOINT.add($CHECKPOINT,checkpoint.getTimestamp());
              FieldRecord.pushState($RECORDS);
            }
            $CHECKPOINT=checkpoint;
            oldCheckpoint.setCheckpoint(checkpoint);
            checkpoint.addObject(this);
          }
          return this;
        }
        protected CheckpointRecord $RECORD$$CHECKPOINT=new CheckpointRecord();
        private FieldRecord[] $RECORDS=new FieldRecord[]{};
      }
;
    }
final class _PROXY_ implements Rollbackable {
      public final void $COMMIT(      long timestamp){
        $COMMIT_ANONYMOUS(timestamp);
      }
      public final void $RESTORE(      long timestamp,      boolean trim){
        $RESTORE_ANONYMOUS(timestamp,trim);
      }
      public final Checkpoint $GET$CHECKPOINT(){
        return $GET$CHECKPOINT_ANONYMOUS();
      }
      public final Object $SET$CHECKPOINT(      Checkpoint checkpoint){
        $SET$CHECKPOINT_ANONYMOUS(checkpoint);
        return this;
      }
    }
    public void $COMMIT_ANONYMOUS(    long timestamp){
      FieldRecord.commit($RECORDS,timestamp,$RECORD$$CHECKPOINT.getTopTimestamp());
      super.$COMMIT(timestamp);
    }
    public void $RESTORE_ANONYMOUS(    long timestamp,    boolean trim){
      super.$RESTORE(timestamp,trim);
    }
    public final Checkpoint $GET$CHECKPOINT_ANONYMOUS(){
      return $CHECKPOINT;
    }
    public final Object $SET$CHECKPOINT_ANONYMOUS(    Checkpoint checkpoint){
      if ($CHECKPOINT != checkpoint) {
        Checkpoint oldCheckpoint=$CHECKPOINT;
        if (checkpoint != null) {
          $RECORD$$CHECKPOINT.add($CHECKPOINT,checkpoint.getTimestamp());
          FieldRecord.pushState($RECORDS);
        }
        $CHECKPOINT=checkpoint;
        oldCheckpoint.setCheckpoint(checkpoint);
        checkpoint.addObject(new _PROXY_());
      }
      return this;
    }
    private FieldRecord[] $RECORDS=new FieldRecord[]{};
{
      $CHECKPOINT.addObject(new _PROXY_());
    }
  }
;
}

Fixed version (ground truth):
public Iterator iterator(){
  return new UnmodifiableIterator(c.iterator()){
    public Object next(){
      final Map.Entry e=(Map.Entry)super.next();
      return new Map.Entry(){
        protected Checkpoint $CHECKPOINT=new Checkpoint(this);
        public boolean equals(        Object o){
          return e.equals(o);
        }
        public Object getKey(){
          return e.getKey();
        }
        public Object getValue(){
          return e.getValue();
        }
        public int hashCode(){
          return e.hashCode();
        }
        public Object setValue(        Object value){
          throw new UnsupportedOperationException();
        }
        public String toString(){
          return e.toString();
        }
        public void $COMMIT(        long timestamp){
          FieldRecord.commit($RECORDS,timestamp,$RECORD$$CHECKPOINT.getTopTimestamp());
          $RECORD$$CHECKPOINT.commit(timestamp);
        }
        public void $RESTORE(        long timestamp,        boolean trim){
          if (timestamp <= $RECORD$$CHECKPOINT.getTopTimestamp()) {
            $CHECKPOINT=$RECORD$$CHECKPOINT.restore($CHECKPOINT,this,timestamp,trim);
            FieldRecord.popState($RECORDS);
            $RESTORE(timestamp,trim);
          }
        }
        public final Checkpoint $GET$CHECKPOINT(){
          return $CHECKPOINT;
        }
        public final Object $SET$CHECKPOINT(        Checkpoint checkpoint){
          if ($CHECKPOINT != checkpoint) {
            Checkpoint oldCheckpoint=$CHECKPOINT;
            if (checkpoint != null) {
              $RECORD$$CHECKPOINT.add($CHECKPOINT,checkpoint.getTimestamp());
              FieldRecord.pushState($RECORDS);
            }
            $CHECKPOINT=checkpoint;
            oldCheckpoint.setCheckpoint(checkpoint);
            checkpoint.addObject(this);
          }
          return this;
        }
        protected CheckpointRecord $RECORD$$CHECKPOINT=new CheckpointRecord();
        private FieldRecord[] $RECORDS=new FieldRecord[]{};
      }
;
    }
final class _PROXY_ implements Rollbackable {
      public final void $COMMIT(      long timestamp){
        $COMMIT_ANONYMOUS(timestamp);
      }
      public final void $RESTORE(      long timestamp,      boolean trim){
        $RESTORE_ANONYMOUS(timestamp,trim);
      }
      public final Checkpoint $GET$CHECKPOINT(){
        return $GET$CHECKPOINT_ANONYMOUS();
      }
      public final Object $SET$CHECKPOINT(      Checkpoint checkpoint){
        $SET$CHECKPOINT_ANONYMOUS(checkpoint);
        return this;
      }
    }
    public void $COMMIT_ANONYMOUS(    long timestamp){
      FieldRecord.commit($RECORDS,timestamp,$RECORD$$CHECKPOINT.getTopTimestamp());
      super.$COMMIT(timestamp);
    }
    public void $RESTORE_ANONYMOUS(    long timestamp,    boolean trim){
      super.$RESTORE(timestamp,trim);
    }
    public final Checkpoint $GET$CHECKPOINT_ANONYMOUS(){
      return $CHECKPOINT;
    }
    public final Object $SET$CHECKPOINT_ANONYMOUS(    Checkpoint checkpoint){
      if ($CHECKPOINT != checkpoint) {
        Checkpoint oldCheckpoint=$CHECKPOINT;
        if (checkpoint != null) {
          $RECORD$$CHECKPOINT.add($CHECKPOINT,checkpoint.getTimestamp());
          FieldRecord.pushState($RECORDS);
        }
        $CHECKPOINT=checkpoint;
        oldCheckpoint.setCheckpoint(checkpoint);
        checkpoint.addObject(new _PROXY_());
      }
      return this;
    }
    private FieldRecord[] $RECORDS=new FieldRecord[]{};
{
      $CHECKPOINT.addObject(new _PROXY_());
    }
  }
;
}