Program: 11399
Project: 11399
Buggy source:
protected List<TimeStruct> createTimeStructsRelativeDays(Axis1D axis,TimeStamp referenceTime,List<TimeStamp> tickTimes,double labelAlign){
  List<TimeStruct> list=new ArrayList<>(tickTimes.size());
  TimeStamp minTime=epoch.toTimeStamp(axis.getMin());
  TimeStamp maxTime=epoch.toTimeStamp(axis.getMax());
  double referenceTime_su=referenceTime.toPosixSeconds();
  double maxViewDuration_SU=Double.NEGATIVE_INFINITY;
  Integer previous_DAYS=null;
  for (int n=0; n < tickTimes.size(); n++) {
    double elapsedTime_SU=tickTimes.get(n).toPosixSeconds() - referenceTime_su;
    double elapsedTime_DAYS=Time.toDays(elapsedTime_SU);
    int elapsedTime_DAYS_WHOLE=(int)Math.floor(elapsedTime_DAYS);
    if (previous_DAYS != null && elapsedTime_DAYS_WHOLE == previous_DAYS)     continue;
    previous_DAYS=elapsedTime_DAYS_WHOLE;
    TimeStruct timeStruct=new TimeStructRelative();
    timeStruct.start=TimeStamp.fromPosixSeconds(Time.fromDays(elapsedTime_DAYS_WHOLE) + referenceTime_su);
    timeStruct.end=timeStruct.start.add(Time.fromDays(1));
    timeStruct.viewStart=clamp(timeStruct.start,timeStruct.end,minTime);
    timeStruct.viewEnd=clamp(timeStruct.start,timeStruct.end,maxTime);
    timeStruct.text="String_Node_Str" + elapsedTime_DAYS_WHOLE;
    maxViewDuration_SU=Math.max(maxViewDuration_SU,timeStruct.viewEnd.durationAfter(timeStruct.viewStart));
    list.add(timeStruct);
  }
  setTimeStructTextCenter(list,labelAlign,maxViewDuration_SU);
  return list;
}

Fixed version (ground truth):
protected List<TimeStruct> createTimeStructsRelativeDays(Axis1D axis,TimeStamp referenceTime,List<TimeStamp> tickTimes,double labelAlign){
  List<TimeStruct> list=new ArrayList<>(tickTimes.size());
  TimeStamp minTime=epoch.toTimeStamp(axis.getMin());
  TimeStamp maxTime=epoch.toTimeStamp(axis.getMax());
  double referenceTime_su=referenceTime.toPosixSeconds();
  double maxViewDuration_SU=Double.NEGATIVE_INFINITY;
  Integer previous_DAYS=null;
  Boolean previous_SIGN=null;
  for (int n=0; n < tickTimes.size(); n++) {
    double elapsedTime_SU=tickTimes.get(n).toPosixSeconds() - referenceTime_su;
    boolean negative=(elapsedTime_SU < 0);
    String signString=negative ? "String_Node_Str" : "String_Node_Str";
    elapsedTime_SU=Math.abs(elapsedTime_SU);
    double elapsedTime_DAYS=Time.toDays(elapsedTime_SU);
    int elapsedTime_DAYS_WHOLE=(int)Math.floor(elapsedTime_DAYS);
    if (previous_DAYS != null && elapsedTime_DAYS_WHOLE == previous_DAYS && negative == previous_SIGN)     continue;
    previous_DAYS=elapsedTime_DAYS_WHOLE;
    previous_SIGN=negative;
    TimeStruct timeStruct=new TimeStructRelative();
    if (negative) {
      timeStruct.end=TimeStamp.fromPosixSeconds(Time.fromDays(-elapsedTime_DAYS_WHOLE) + referenceTime_su);
      timeStruct.start=timeStruct.end.subtract(Time.fromDays(1));
    }
 else {
      timeStruct.start=TimeStamp.fromPosixSeconds(Time.fromDays(elapsedTime_DAYS_WHOLE) + referenceTime_su);
      timeStruct.end=timeStruct.start.add(Time.fromDays(1));
    }
    timeStruct.viewStart=clamp(timeStruct.start,timeStruct.end,minTime);
    timeStruct.viewEnd=clamp(timeStruct.start,timeStruct.end,maxTime);
    timeStruct.text="String_Node_Str" + signString + elapsedTime_DAYS_WHOLE;
    maxViewDuration_SU=Math.max(maxViewDuration_SU,timeStruct.viewEnd.durationAfter(timeStruct.viewStart));
    list.add(timeStruct);
  }
  setTimeStructTextCenter(list,labelAlign,maxViewDuration_SU);
  return list;
}