<CONTEXT>}public DateTime lastExecution(DateTime date){</BUG>Validate.notNull(date);try {<extra_id_0>Validate.notNull(date);try {<BUG>DateTime previousMatch = previousClosestMatch(date);</BUG>if(previousMatch.equals(date)){previousMatch = previousClosestMatch(date.minusSeconds(1));}</CONTEXT>
public java.time.Duration timeToNextExecution(ZonedDateTime date){return java.time.Duration.between(date, nextExecution(date));public ZonedDateTime lastExecution(ZonedDateTime date){ZonedDateTime previousMatch = previousClosestMatch(date);