}
}
}
// ACK all logic is identical to above.
// A sign that FrequencyEntries and TripTimes need a common interface.
FrequencyEntry bestFreq = null;
for (FrequencyEntry freq : frequencyEntries) {
TripTimes tt = freq.tripTimes;
if ( ! serviceDay.serviceRunning(tt.serviceCode)) continue; // TODO merge into call on next line
if ( ! tt.tripAcceptable(s0, stopIndex)) continue;
int adjustedTime = adjustTimeForTransfer(s0, currentStop, tt.trip, boarding, serviceDay, time);