code: public final GregorianCalendar getNextRunTime(Occurrence occurrence, boolean is_failed, int attempt_count, GregorianCalendar schedule_start, int run_count)
      {
          int failure_attempts = 0;
          if (is_failed && failure_schedule != null && attempt_count > 0)
          {
              GregorianCalendar next_run = failure_schedule.getNextRunTime(schedule_start, attempt_count - 1);
              if (next_run != null)
                  return next_run;
              failure_attempts = failure_schedule.getSchedules().length;
          }
  
          return getAdjustedNextRunTime(occurrence, schedule_start, run_count + (attempt_count - failure_attempts), new GregorianCalendar());
      }
docs: Get the next run time/date for this Resilience.