Program: 92607
Project: 92607
Buggy source:
private synchronized void initializeStreamingMonitor(){
  if (fInitialized) {
    return;
  }
  fInitialized=true;
  if (getStreamingInterval() == 0) {
    TmfContext context=seekLocation(null);
    ITmfEvent event=getNext(context);
    if (event == null) {
      return;
    }
    TmfTimeRange timeRange=new TmfTimeRange(event.getTimestamp(),TmfTimestamp.BigCrunch);
    final TmfExperimentRangeUpdatedSignal signal=new TmfExperimentRangeUpdatedSignal(this,this,timeRange);
    new Thread(){
      @Override public void run(){
        broadcast(signal);
      }
    }
.start();
    return;
  }
  final Thread thread=new Thread("String_Node_Str" + getName()){
    ITmfTimestamp safeTimestamp=null;
    TmfTimeRange timeRange=null;
    @Override public void run(){
      while (!fExecutor.isShutdown()) {
        if (!isIndexingBusy()) {
          ITmfTimestamp startTimestamp=TmfTimestamp.BigCrunch;
          ITmfTimestamp endTimestamp=TmfTimestamp.BigBang;
          for (          ITmfTrace<T> trace : fTraces) {
            if (trace.getStartTime().compareTo(startTimestamp) < 0) {
              startTimestamp=trace.getStartTime();
            }
            if (trace.getStreamingInterval() != 0 && trace.getEndTime().compareTo(endTimestamp) > 0) {
              endTimestamp=trace.getEndTime();
            }
          }
          if (safeTimestamp != null && safeTimestamp.compareTo(getTimeRange().getEndTime(),false) > 0) {
            timeRange=new TmfTimeRange(startTimestamp,safeTimestamp);
          }
 else {
            timeRange=null;
          }
          safeTimestamp=endTimestamp;
          if (timeRange != null) {
            TmfExperimentRangeUpdatedSignal signal=new TmfExperimentRangeUpdatedSignal(TmfExperiment.this,TmfExperiment.this,timeRange);
            broadcast(signal);
          }
        }
        try {
          Thread.sleep(getStreamingInterval());
        }
 catch (        InterruptedException e) {
          e.printStackTrace();
        }
      }
    }
  }
;
  thread.start();
}

Fixed version (ground truth):
private synchronized void initializeStreamingMonitor(){
  if (fInitialized) {
    return;
  }
  fInitialized=true;
  if (getStreamingInterval() == 0) {
    TmfContext context=seekLocation(null);
    ITmfEvent event=getNext(context);
    if (event == null) {
      return;
    }
    TmfTimeRange timeRange=new TmfTimeRange(event.getTimestamp().clone(),TmfTimestamp.BigCrunch);
    final TmfExperimentRangeUpdatedSignal signal=new TmfExperimentRangeUpdatedSignal(this,this,timeRange);
    new Thread(){
      @Override public void run(){
        broadcast(signal);
      }
    }
.start();
    return;
  }
  final Thread thread=new Thread("String_Node_Str" + getName()){
    ITmfTimestamp safeTimestamp=null;
    TmfTimeRange timeRange=null;
    @Override public void run(){
      while (!fExecutor.isShutdown()) {
        if (!isIndexingBusy()) {
          ITmfTimestamp startTimestamp=TmfTimestamp.BigCrunch;
          ITmfTimestamp endTimestamp=TmfTimestamp.BigBang;
          for (          ITmfTrace<T> trace : fTraces) {
            if (trace.getStartTime().compareTo(startTimestamp) < 0) {
              startTimestamp=trace.getStartTime();
            }
            if (trace.getStreamingInterval() != 0 && trace.getEndTime().compareTo(endTimestamp) > 0) {
              endTimestamp=trace.getEndTime();
            }
          }
          if (safeTimestamp != null && safeTimestamp.compareTo(getTimeRange().getEndTime(),false) > 0) {
            timeRange=new TmfTimeRange(startTimestamp,safeTimestamp);
          }
 else {
            timeRange=null;
          }
          safeTimestamp=endTimestamp;
          if (timeRange != null) {
            TmfExperimentRangeUpdatedSignal signal=new TmfExperimentRangeUpdatedSignal(TmfExperiment.this,TmfExperiment.this,timeRange);
            broadcast(signal);
          }
        }
        try {
          Thread.sleep(getStreamingInterval());
        }
 catch (        InterruptedException e) {
          e.printStackTrace();
        }
      }
    }
  }
;
  thread.start();
}