Program: 92214
Project: 92214
Buggy source:
/** 
 * Handler for the synch signal
 * @param signal The signal that's received
 */
@TmfSignalHandler public void synchToTime(final TmfTimeSynchSignal signal){
  if (signal.getSource() == this || fSelectedExperiment == null) {
    return;
  }
  final long time=signal.getCurrentTime().normalize(0,-9).getValue();
  int thread=-1;
  for (  ITmfTrace<?> trace : fSelectedExperiment.getTraces()) {
    if (thread > 0) {
      break;
    }
    if (trace instanceof CtfKernelTrace) {
      CtfKernelTrace ctfKernelTrace=(CtfKernelTrace)trace;
      IStateSystemQuerier ssq=ctfKernelTrace.getStateSystem();
      if (time >= ssq.getStartTime() && time <= ssq.getCurrentEndTime()) {
        List<Integer> currentThreadQuarks=ssq.getQuarks(Attributes.CPUS,"String_Node_Str",Attributes.CURRENT_THREAD);
        for (        int currentThreadQuark : currentThreadQuarks) {
          try {
            ITmfStateInterval currentThreadInterval=ssq.querySingleState(time,currentThreadQuark);
            int currentThread=currentThreadInterval.getStateValue().unboxInt();
            if (currentThread > 0) {
              int statusQuark=ssq.getQuarkAbsolute(Attributes.THREADS,Integer.toString(currentThread),Attributes.STATUS);
              ITmfStateInterval statusInterval=ssq.querySingleState(time,statusQuark);
              if (statusInterval.getStartTime() == time) {
                thread=currentThread;
                break;
              }
            }
          }
 catch (          AttributeNotFoundException e) {
            e.printStackTrace();
          }
catch (          TimeRangeException e) {
            e.printStackTrace();
          }
catch (          StateValueTypeException e) {
            e.printStackTrace();
          }
        }
      }
    }
  }
  final int selectedThread=thread;
  Display.getDefault().asyncExec(new Runnable(){
    @Override public void run(){
      if (fTimeGraphCombo.isDisposed()) {
        return;
      }
      fTimeGraphCombo.getTimeGraphViewer().setSelectedTime(time,true);
      startZoomThread(fTimeGraphCombo.getTimeGraphViewer().getTime0(),fTimeGraphCombo.getTimeGraphViewer().getTime1());
      if (selectedThread > 0) {
        for (        Object element : fTimeGraphCombo.getTimeGraphViewer().getExpandedElements()) {
          if (element instanceof ControlFlowEntry) {
            ControlFlowEntry entry=(ControlFlowEntry)element;
            if (entry.getThreadId() == selectedThread) {
              fTimeGraphCombo.setSelection(entry);
              break;
            }
          }
        }
      }
    }
  }
);
}

Fixed version (ground truth):
/** 
 * Handler for the synch signal
 * @param signal The signal that's received
 */
@TmfSignalHandler public void synchToTime(final TmfTimeSynchSignal signal){
  if (signal.getSource() == this || fSelectedExperiment == null || fSelectedExperiment.getTraces() == null) {
    return;
  }
  final long time=signal.getCurrentTime().normalize(0,-9).getValue();
  int thread=-1;
  for (  ITmfTrace<?> trace : fSelectedExperiment.getTraces()) {
    if (thread > 0) {
      break;
    }
    if (trace instanceof CtfKernelTrace) {
      CtfKernelTrace ctfKernelTrace=(CtfKernelTrace)trace;
      IStateSystemQuerier ssq=ctfKernelTrace.getStateSystem();
      if (time >= ssq.getStartTime() && time <= ssq.getCurrentEndTime()) {
        List<Integer> currentThreadQuarks=ssq.getQuarks(Attributes.CPUS,"String_Node_Str",Attributes.CURRENT_THREAD);
        for (        int currentThreadQuark : currentThreadQuarks) {
          try {
            ITmfStateInterval currentThreadInterval=ssq.querySingleState(time,currentThreadQuark);
            int currentThread=currentThreadInterval.getStateValue().unboxInt();
            if (currentThread > 0) {
              int statusQuark=ssq.getQuarkAbsolute(Attributes.THREADS,Integer.toString(currentThread),Attributes.STATUS);
              ITmfStateInterval statusInterval=ssq.querySingleState(time,statusQuark);
              if (statusInterval.getStartTime() == time) {
                thread=currentThread;
                break;
              }
            }
          }
 catch (          AttributeNotFoundException e) {
            e.printStackTrace();
          }
catch (          TimeRangeException e) {
            e.printStackTrace();
          }
catch (          StateValueTypeException e) {
            e.printStackTrace();
          }
        }
      }
    }
  }
  final int selectedThread=thread;
  Display.getDefault().asyncExec(new Runnable(){
    @Override public void run(){
      if (fTimeGraphCombo.isDisposed()) {
        return;
      }
      fTimeGraphCombo.getTimeGraphViewer().setSelectedTime(time,true);
      startZoomThread(fTimeGraphCombo.getTimeGraphViewer().getTime0(),fTimeGraphCombo.getTimeGraphViewer().getTime1());
      if (selectedThread > 0) {
        for (        Object element : fTimeGraphCombo.getTimeGraphViewer().getExpandedElements()) {
          if (element instanceof ControlFlowEntry) {
            ControlFlowEntry entry=(ControlFlowEntry)element;
            if (entry.getThreadId() == selectedThread) {
              fTimeGraphCombo.setSelection(entry);
              break;
            }
          }
        }
      }
    }
  }
);
}