long slack = (runningLateSlack + runningEarlySlack) * 1000;
for (Pair<FrequencyStopTripIndex> pair : indexPairs) {
FrequencyStopTripIndex sourceStopIndex = findDepartures ? pair.getFirst()
: pair.getSecond();
FrequencyStopTripIndex destStopIndex = findDepartures ? pair.getSecond()
: pair.getFirst();
List<FrequencyBlockStopTimeEntry> sourceStopTimes = sourceStopIndex.getFrequencyStopTimes();
List<FrequencyBlockStopTimeEntry> destStopTimes = destStopIndex.getFrequencyStopTimes();
List<Date> serviceDates = _calendarService.getServiceDatesForInterval(
sourceStopIndex.getServiceIds(),
sourceStopIndex.getServiceInterval(), slackAdjustedTime,
findDepartures);
for (Date serviceDate : serviceDates) {
ServiceInterval destServiceInterval = destStopIndex.getServiceInterval();
if (serviceDateIsBeyondRangeOfQueue(nBestQueue, serviceDate,
destServiceInterval, resultCount, findDepartures, slack)) {
/**