Program: 92904
Project: 92904
Buggy source:
@SuppressWarnings("String_Node_Str") @Override public ITmfContext armRequest(final ITmfDataRequest<LttngSyntheticEvent> request){
  if (!(request instanceof ITmfEventRequest<?>)) {
    request.cancel();
    TraceDebug.debug("String_Node_Str");
    return null;
  }
  if (fExperiment == null) {
    TraceDebug.debug("String_Node_Str");
    request.cancel();
    return null;
  }
  reset(fExperiment);
  if (fEventProviderRequests.size() < 1) {
    request.cancel();
    TraceDebug.debug("String_Node_Str");
    return null;
  }
  fmainRequest=request;
  ITmfEventRequest<LttngSyntheticEvent> eventRequest=(ITmfEventRequest<LttngSyntheticEvent>)fmainRequest;
  TmfTimeRange reqWindow=eventRequest.getRange();
  TraceDebug.debug("String_Node_Str" + Thread.currentThread().getName());
  boolean subRequestQueued=false;
  TmfExperiment<LttngEvent> experiment=(TmfExperiment<LttngEvent>)fExperiment.getValue();
  experiment.startSynch(new TmfStartSynchSignal(0));
  for (  IStateTraceManager traceManager : fEventProviderRequests.keySet()) {
    TmfTimestamp checkPoint=traceManager.restoreCheckPointByTimestamp(reqWindow.getStartTime());
    TmfTimeRange traceRange=traceManager.getTrace().getTimeRange();
    if ((checkPoint != null) && !(checkPoint.getValue() >= traceRange.getStartTime().getValue() && checkPoint.getValue() <= traceRange.getEndTime().getValue() && checkPoint.getValue() < reqWindow.getEndTime().getValue())) {
      continue;
    }
    TmfTimeRange adjustedRange=reqWindow;
    if (checkPoint != null) {
      adjustedRange=new TmfTimeRange(checkPoint,reqWindow.getEndTime());
    }
    LttngTraceState traceModel=traceManager.getStateModel();
    ITmfTrace trace=traceManager.getTrace();
    final LttngBaseEventRequest subRequest=new LttngBaseEventRequest(adjustedRange,reqWindow.getStartTime(),0,TmfEventRequest.ALL_DATA,BLOCK_SIZE,traceModel,ITmfDataRequest.ExecutionType.SHORT,trace){
      private LttngSyntheticEvent syntheticEvent=null;
      private LttngSyntheticEvent syntheticAckIndicator=null;
      long subEventCount=0L;
      private final long fDispatchTime=getDispatchTime().getValue();
      private final LttngTraceState fTraceModel=getTraceModel();
      @Override public void handleData(){
        LttngEvent[] events=getData();
        if (events.length > 0) {
          for (          LttngEvent e : events) {
            handleIncomingData(e);
          }
        }
 else {
          TraceDebug.debug("String_Node_Str");
        }
      }
      @Override public void done(){
        super.done();
        handleProviderDone(getTraceModel());
      }
      /** 
 * Trigger the Analysis and sequential control of the events.
 * @param e
 */
      private void handleIncomingData(      LttngEvent e){
        long eventTime=e.getTimestamp().getValue();
        TmfTrace<LttngEvent> inTrace=e.getParentTrace();
        if (!(inTrace == getTrace())) {
          return;
        }
        updateSynEvent(e);
        try {
          if (eventTime >= fDispatchTime) {
            syntheticEvent.setSequenceInd(SequenceInd.BEFORE);
            queueResult(syntheticEvent);
            queueResult(syntheticAckIndicator);
            syntheticEvent.setSequenceInd(SequenceInd.UPDATE);
            fstateUpdateProcessor.process(syntheticEvent,fTraceModel);
            syntheticEvent.setSequenceInd(SequenceInd.AFTER);
            queueResult(syntheticEvent);
            queueResult(syntheticAckIndicator);
            incrementSynEvenCount();
            subEventCount++;
          }
 else {
            syntheticEvent.setSequenceInd(SequenceInd.UPDATE);
            fstateUpdateProcessor.process(syntheticEvent,fTraceModel);
          }
        }
 catch (        InterruptedException e1) {
          request.cancel();
        }
      }
      /** 
 * Create a synthetic event from the received new reference, if the reference is the same there is no need for a new instance if this is the first event for this request, call start handler
 * @param e
 * @return
 */
      private LttngSyntheticEvent updateSynEvent(      LttngEvent e){
        if (syntheticEvent == null || syntheticEvent.getBaseEvent() != e) {
          syntheticEvent=new LttngSyntheticEvent(e);
          syntheticAckIndicator=new LttngSyntheticEvent(e);
          syntheticAckIndicator.setSequenceInd(SequenceInd.ACK);
        }
        syntheticEvent.setTraceModel(fTraceModel);
        if (!startIndSent) {
          TraceDebug.debug("String_Node_Str" + Thread.currentThread().getName());
          handleProviderStarted(getTraceModel());
          startIndSent=true;
        }
        return syntheticEvent;
      }
    }
;
    fEventProviderRequests.put(traceManager,subRequest);
    TmfExperiment<LttngEvent> provider=(TmfExperiment<LttngEvent>)fExperiment.getValue();
    provider.sendRequest(subRequest);
    subRequestQueued=true;
  }
  experiment.endSynch(new TmfEndSynchSignal(0));
  return (subRequestQueued) ? new TmfContext() : null;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public ITmfContext armRequest(final ITmfDataRequest<LttngSyntheticEvent> request){
  if (!(request instanceof ITmfEventRequest<?>)) {
    request.cancel();
    TraceDebug.debug("String_Node_Str");
    return null;
  }
  if (fExperiment == null) {
    TraceDebug.debug("String_Node_Str");
    request.cancel();
    return null;
  }
  reset(fExperiment);
  if (fEventProviderRequests.size() < 1) {
    request.cancel();
    TraceDebug.debug("String_Node_Str");
    return null;
  }
  fmainRequest=request;
  ITmfEventRequest<LttngSyntheticEvent> eventRequest=(ITmfEventRequest<LttngSyntheticEvent>)fmainRequest;
  TmfTimeRange reqWindow=eventRequest.getRange();
  TraceDebug.debug("String_Node_Str" + Thread.currentThread().getName());
  boolean subRequestQueued=false;
  TmfExperiment<LttngEvent> experiment=(TmfExperiment<LttngEvent>)fExperiment.getValue();
  experiment.startSynch(new TmfStartSynchSignal(0));
  for (  IStateTraceManager traceManager : fEventProviderRequests.keySet()) {
    TmfTimestamp checkPoint=traceManager.restoreCheckPointByTimestamp(reqWindow.getStartTime());
    TmfTimeRange traceRange=traceManager.getTrace().getTimeRange();
    if ((checkPoint != null) && !(checkPoint.getValue() >= traceRange.getStartTime().getValue() && checkPoint.getValue() <= traceRange.getEndTime().getValue() && checkPoint.getValue() < reqWindow.getEndTime().getValue())) {
      continue;
    }
    TmfTimeRange adjustedRange=reqWindow;
    if (checkPoint != null) {
      adjustedRange=new TmfTimeRange(checkPoint,reqWindow.getEndTime());
    }
    LttngTraceState traceModel=traceManager.getStateModel();
    ITmfTrace trace=traceManager.getTrace();
    final LttngBaseEventRequest subRequest=new LttngBaseEventRequest(adjustedRange,reqWindow.getStartTime(),0,TmfEventRequest.ALL_DATA,BLOCK_SIZE,traceModel,ITmfDataRequest.ExecutionType.SHORT,trace){
      private LttngSyntheticEvent syntheticEvent=null;
      private LttngSyntheticEvent syntheticAckIndicator=null;
      long subEventCount=0L;
      private final long fDispatchTime=getDispatchTime().getValue();
      private final LttngTraceState fTraceModel=getTraceModel();
      @Override public void handleData(){
        LttngEvent[] events=getData();
        if (events.length > 0) {
          for (          LttngEvent e : events) {
            handleIncomingData(e);
          }
        }
 else {
          TraceDebug.debug("String_Node_Str");
        }
      }
      @Override public void done(){
        super.done();
        handleProviderDone(getTraceModel());
      }
      /** 
 * Trigger the Analysis and sequential control of the events.
 * @param e
 */
      private void handleIncomingData(      LttngEvent e){
        long eventTime=e.getTimestamp().getValue();
        TmfTrace<LttngEvent> inTrace=e.getParentTrace();
        if (!(inTrace == getTrace())) {
          return;
        }
        updateSynEvent(e);
        if (eventTime >= fDispatchTime) {
          syntheticEvent.setSequenceInd(SequenceInd.BEFORE);
          LttngSyntheticEvent[] result=new LttngSyntheticEvent[1];
          result[0]=syntheticEvent;
          fmainRequest.setData(result);
          fmainRequest.handleData();
          result[0]=syntheticAckIndicator;
          fmainRequest.setData(result);
          fmainRequest.handleData();
          syntheticEvent.setSequenceInd(SequenceInd.UPDATE);
          fstateUpdateProcessor.process(syntheticEvent,fTraceModel);
          syntheticEvent.setSequenceInd(SequenceInd.AFTER);
          result=new LttngSyntheticEvent[1];
          result[0]=syntheticEvent;
          fmainRequest.setData(result);
          fmainRequest.handleData();
          result[0]=syntheticAckIndicator;
          fmainRequest.setData(result);
          fmainRequest.handleData();
          incrementSynEvenCount();
          subEventCount++;
        }
 else {
          syntheticEvent.setSequenceInd(SequenceInd.UPDATE);
          fstateUpdateProcessor.process(syntheticEvent,fTraceModel);
        }
      }
      /** 
 * Create a synthetic event from the received new reference, if the reference is the same there is no need for a new instance if this is the first event for this request, call start handler
 * @param e
 * @return
 */
      private LttngSyntheticEvent updateSynEvent(      LttngEvent e){
        if (syntheticEvent == null || syntheticEvent.getBaseEvent() != e) {
          syntheticEvent=new LttngSyntheticEvent(e);
          syntheticAckIndicator=new LttngSyntheticEvent(e);
          syntheticAckIndicator.setSequenceInd(SequenceInd.ACK);
        }
        syntheticEvent.setTraceModel(fTraceModel);
        if (!startIndSent) {
          TraceDebug.debug("String_Node_Str" + Thread.currentThread().getName());
          handleProviderStarted(getTraceModel());
          startIndSent=true;
        }
        return syntheticEvent;
      }
    }
;
    fEventProviderRequests.put(traceManager,subRequest);
    TmfExperiment<LttngEvent> provider=(TmfExperiment<LttngEvent>)fExperiment.getValue();
    provider.sendRequest(subRequest);
    subRequestQueued=true;
  }
  experiment.endSynch(new TmfEndSynchSignal(0));
  return (subRequestQueued) ? new TmfContext() : null;
}