Program: 92086
Project: 92086
Buggy source:
private void fillValues(Point pt,TimeGraphControl timeGraphControl,ITimeGraphEntry entry){
  if (entry == null) {
    return;
  }
  if (entry.hasTimeEvents()) {
    long currPixelTime=timeGraphControl.getTimeAtX(pt.x);
    long nextPixelTime=timeGraphControl.getTimeAtX(pt.x + 1);
    if (nextPixelTime == currPixelTime) {
      nextPixelTime++;
    }
    ITimeEvent currEvent=Utils.findEvent(entry,currPixelTime,0);
    ITimeEvent nextEvent=Utils.findEvent(entry,currPixelTime,1);
    if (currEvent == null || currEvent.getTime() < currPixelTime) {
      if (nextEvent != null && nextEvent.getTime() < nextPixelTime) {
        currEvent=nextEvent;
        currPixelTime=nextEvent.getTime();
      }
    }
    String stateTypeName=_utilImp.getStateTypeName(entry);
    String entryName=entry.getName();
    if (stateTypeName == null) {
      stateTypeName=_utilImp.getStateTypeName();
    }
    if (!entryName.isEmpty()) {
      addItem(stateTypeName,entry.getName());
    }
    if (currEvent == null) {
      return;
    }
    String state=_utilImp.getEventName(currEvent);
    if (state != null) {
      addItem(Messages.TmfTimeTipHandler_TRACE_STATE,state);
    }
    Map<String,String> eventAddOns=_utilImp.getEventHoverToolTipInfo(currEvent,currPixelTime);
    if (eventAddOns != null) {
      for (Iterator<String> iter=eventAddOns.keySet().iterator(); iter.hasNext(); ) {
        String message=iter.next();
        addItem(message,eventAddOns.get(message));
      }
    }
    long eventStartTime=-1;
    long eventDuration=-1;
    long eventEndTime=-1;
    eventStartTime=currEvent.getTime();
    eventDuration=currEvent.getDuration();
    if (eventDuration < 0 && nextEvent != null) {
      eventEndTime=nextEvent.getTime();
      eventDuration=eventEndTime - eventStartTime;
    }
 else {
      eventEndTime=eventStartTime + eventDuration;
    }
    Resolution res=Resolution.NANOSEC;
    TimeFormat tf=_timeDataProvider.getTimeFormat();
    if (tf == TimeFormat.CALENDAR) {
      addItem(Messages.TmfTimeTipHandler_TRACE_DATE,eventStartTime > -1 ? Utils.formatDate(eventStartTime) : "String_Node_Str");
    }
    if (eventDuration > 0) {
      addItem(Messages.TmfTimeTipHandler_TRACE_START_TIME,eventStartTime > -1 ? Utils.formatTime(eventStartTime,tf,res) : "String_Node_Str");
      addItem(Messages.TmfTimeTipHandler_TRACE_STOP_TIME,eventEndTime > -1 ? Utils.formatTime(eventEndTime,tf,res) : "String_Node_Str");
    }
 else {
      addItem(Messages.TmfTimeTipHandler_TRACE_EVENT_TIME,eventStartTime > -1 ? Utils.formatTime(eventStartTime,tf,res) : "String_Node_Str");
    }
    if (eventDuration > 0) {
      if (tf == TimeFormat.CALENDAR) {
        tf=TimeFormat.RELATIVE;
      }
      addItem(Messages.TmfTimeTipHandler_DURATION,eventDuration > -1 ? Utils.formatTime(eventDuration,tf,res) : "String_Node_Str");
    }
  }
}

Fixed version (ground truth):
private void fillValues(Point pt,TimeGraphControl timeGraphControl,ITimeGraphEntry entry){
  if (entry == null) {
    return;
  }
  if (entry.hasTimeEvents()) {
    long currPixelTime=timeGraphControl.getTimeAtX(pt.x);
    long nextPixelTime=timeGraphControl.getTimeAtX(pt.x + 1);
    if (nextPixelTime == currPixelTime) {
      nextPixelTime++;
    }
    ITimeEvent currEvent=Utils.findEvent(entry,currPixelTime,0);
    ITimeEvent nextEvent=Utils.findEvent(entry,currPixelTime,1);
    if (currEvent == null || currEvent.getTime() < currPixelTime) {
      if (nextEvent != null && nextEvent.getTime() < nextPixelTime) {
        currEvent=nextEvent;
        currPixelTime=nextEvent.getTime();
      }
    }
    String stateTypeName=_utilImp.getStateTypeName(entry);
    String entryName=entry.getName();
    if (stateTypeName == null) {
      stateTypeName=_utilImp.getStateTypeName();
    }
    if (!entryName.isEmpty()) {
      addItem(stateTypeName,entry.getName());
    }
    if (currEvent == null || currEvent instanceof NullTimeEvent) {
      return;
    }
    String state=_utilImp.getEventName(currEvent);
    if (state != null) {
      addItem(Messages.TmfTimeTipHandler_TRACE_STATE,state);
    }
    Map<String,String> eventAddOns=_utilImp.getEventHoverToolTipInfo(currEvent,currPixelTime);
    if (eventAddOns != null) {
      for (Iterator<String> iter=eventAddOns.keySet().iterator(); iter.hasNext(); ) {
        String message=iter.next();
        addItem(message,eventAddOns.get(message));
      }
    }
    long eventStartTime=-1;
    long eventDuration=-1;
    long eventEndTime=-1;
    eventStartTime=currEvent.getTime();
    eventDuration=currEvent.getDuration();
    if (eventDuration < 0 && nextEvent != null) {
      eventEndTime=nextEvent.getTime();
      eventDuration=eventEndTime - eventStartTime;
    }
 else {
      eventEndTime=eventStartTime + eventDuration;
    }
    Resolution res=Resolution.NANOSEC;
    TimeFormat tf=_timeDataProvider.getTimeFormat();
    if (tf == TimeFormat.CALENDAR) {
      addItem(Messages.TmfTimeTipHandler_TRACE_DATE,eventStartTime > -1 ? Utils.formatDate(eventStartTime) : "String_Node_Str");
    }
    if (eventDuration > 0) {
      addItem(Messages.TmfTimeTipHandler_TRACE_START_TIME,eventStartTime > -1 ? Utils.formatTime(eventStartTime,tf,res) : "String_Node_Str");
      addItem(Messages.TmfTimeTipHandler_TRACE_STOP_TIME,eventEndTime > -1 ? Utils.formatTime(eventEndTime,tf,res) : "String_Node_Str");
    }
 else {
      addItem(Messages.TmfTimeTipHandler_TRACE_EVENT_TIME,eventStartTime > -1 ? Utils.formatTime(eventStartTime,tf,res) : "String_Node_Str");
    }
    if (eventDuration > 0) {
      if (tf == TimeFormat.CALENDAR) {
        tf=TimeFormat.RELATIVE;
      }
      addItem(Messages.TmfTimeTipHandler_DURATION,eventDuration > -1 ? Utils.formatTime(eventDuration,tf,res) : "String_Node_Str");
    }
  }
}