Program: 92283
Project: 92283
Buggy source:
@Override protected void queueBackgroundRequest(final ITmfDataRequest<T> request,final int blockSize,final boolean indexing){
  if (!(request instanceof ITmfEventRequest)) {
    super.queueBackgroundRequest(request,blockSize,indexing);
    return;
  }
  final TmfDataProvider<T> provider=this;
  Thread thread=new Thread(){
    @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;
      long startIndex=request.getIndex();
      while (!isFinished[0]) {
        TmfEventRequest<T> subRequest=new TmfEventRequest<T>(request.getDataType(),((ITmfEventRequest<?>)request).getRange(),startIndex + 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 (this.getNbRead() > CHUNK_SIZE[0]) {
              System.out.println("String_Node_Str");
            }
          }
          @Override public void handleCompleted(){
            nbRead[0]+=this.getNbRead();
            if (nbRead[0] >= request.getNbRequested() || (this.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();
          }
          if (startIndex == 0 && nbRead[0].equals(CHUNK_SIZE[0])) {
            startIndex=subRequest.getIndex();
          }
          CHUNK_SIZE[0]=Math.min(request.getNbRequested() - nbRead[0],blockSize);
        }
      }
    }
  }
;
  thread.start();
}

Fixed version (ground truth):
@Override protected void queueBackgroundRequest(final ITmfDataRequest<T> request,final int blockSize,final boolean indexing){
  if (!(request instanceof ITmfEventRequest)) {
    super.queueBackgroundRequest(request,blockSize,indexing);
    return;
  }
  final TmfDataProvider<T> provider=this;
  Thread thread=new Thread(){
    @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;
      long startIndex=request.getIndex();
      while (!isFinished[0]) {
        TmfEventRequest<T> subRequest=new TmfEventRequest<T>(request.getDataType(),((ITmfEventRequest<?>)request).getRange(),startIndex + 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 (this.getNbRead() > CHUNK_SIZE[0]) {
              System.out.println("String_Node_Str");
            }
          }
          @Override public void handleCompleted(){
            nbRead[0]+=this.getNbRead();
            if (nbRead[0] >= request.getNbRequested() || (this.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();
          }
          if (startIndex == 0 && nbRead[0].equals(CHUNK_SIZE[0])) {
            startIndex=subRequest.getIndex();
          }
          CHUNK_SIZE[0]=Math.min(request.getNbRequested() - nbRead[0],blockSize);
        }
      }
    }
  }
;
  thread.start();
}