Program: 92281
Project: 92281
Buggy source:
@Override public void run(){
  if (Tracer.isRequestTraced()) {
    Tracer.traceRequest(request,"String_Node_Str" + provider.getName());
  }
  request.start();
  final Integer[] CHUNK_SIZE=new Integer[1];
  CHUNK_SIZE[0]=Math.min(request.getNbRequested(),blockSize + ((indexing) ? 1 : 0));
  final Integer[] nbRead=new Integer[1];
  nbRead[0]=0;
  final Boolean[] isFinished=new Boolean[1];
  isFinished[0]=Boolean.FALSE;
  while (!isFinished[0]) {
    TmfDataRequest<T> subRequest=new TmfDataRequest<T>(request.getDataType(),request.getIndex() + nbRead[0],CHUNK_SIZE[0],blockSize,ExecutionType.BACKGROUND){
      @Override public void handleData(      T data){
        super.handleData(data);
        if (request.getDataType().isInstance(data)) {
          request.handleData(data);
        }
        if (getNbRead() > CHUNK_SIZE[0]) {
          System.out.println("String_Node_Str");
        }
      }
      @Override public void handleCompleted(){
        nbRead[0]+=getNbRead();
        if (nbRead[0] >= request.getNbRequested() || (getNbRead() < CHUNK_SIZE[0])) {
          if (this.isCancelled()) {
            request.cancel();
          }
 else           if (this.isFailed()) {
            request.fail();
          }
 else {
            request.done();
          }
          isFinished[0]=Boolean.TRUE;
        }
        super.handleCompleted();
      }
    }
;
    if (!isFinished[0]) {
      queueRequest(subRequest);
      try {
        subRequest.waitForCompletion();
      }
 catch (      InterruptedException e) {
        e.printStackTrace();
      }
      CHUNK_SIZE[0]=Math.min(request.getNbRequested() - nbRead[0],blockSize);
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
  if (Tracer.isRequestTraced()) {
    Tracer.traceRequest(request,"String_Node_Str" + provider.getName());
  }
  request.start();
  final Integer[] CHUNK_SIZE=new Integer[1];
  CHUNK_SIZE[0]=Math.min(request.getNbRequested(),blockSize + ((indexing) ? 1 : 0));
  final Integer[] nbRead=new Integer[1];
  nbRead[0]=0;
  final Boolean[] isFinished=new Boolean[1];
  isFinished[0]=Boolean.FALSE;
  while (!isFinished[0]) {
    TmfDataRequest<T> subRequest=new TmfDataRequest<T>(request.getDataType(),request.getIndex() + nbRead[0],CHUNK_SIZE[0],blockSize,ExecutionType.BACKGROUND){
      @Override public synchronized boolean isCompleted(){
        return super.isCompleted() || request.isCompleted();
      }
      @Override public void handleData(      T data){
        super.handleData(data);
        if (request.getDataType().isInstance(data)) {
          request.handleData(data);
        }
        if (getNbRead() > CHUNK_SIZE[0]) {
          System.out.println("String_Node_Str");
        }
      }
      @Override public void handleCompleted(){
        nbRead[0]+=getNbRead();
        if (nbRead[0] >= request.getNbRequested() || (getNbRead() < CHUNK_SIZE[0])) {
          if (this.isCancelled()) {
            request.cancel();
          }
 else           if (this.isFailed()) {
            request.fail();
          }
 else {
            request.done();
          }
          isFinished[0]=Boolean.TRUE;
        }
        super.handleCompleted();
      }
    }
;
    if (!isFinished[0]) {
      queueRequest(subRequest);
      try {
        subRequest.waitForCompletion();
        if (request.isCompleted()) {
          isFinished[0]=Boolean.TRUE;
        }
      }
 catch (      InterruptedException e) {
        e.printStackTrace();
      }
      CHUNK_SIZE[0]=Math.min(request.getNbRequested() - nbRead[0],blockSize);
    }
  }
}