Buggy code:
@ Path ( "//routers//{routerId}//index" ) @ Produces ( MediaType . APPLICATION_JSON ) public class IndexAPI { @ SuppressWarnings ( "unused" ) private static final Logger LOG = LoggerFactory . getLogger ( IndexAPI . class ) ; private static final double MAX_STOP_SEARCH_RADIUS = 5000 ; private static final String MSG_404 = "FOUR<seq2seq4repair_space>ZERO<seq2seq4repair_space>FOUR" ; private static final String MSG_400 = "FOUR<seq2seq4repair_space>HUNDRED" ; @ QueryParam ( "detail" ) private boolean detail = false ; @ QueryParam ( "refs" ) private boolean refs = false ; private final GraphIndex index ; private final StreetVertexIndexService streetIndex ; public IndexAPI ( @ Context OTPServer otpServer , @ PathParam ( "routerId" ) String routerId ) { } @ Context UriInfo uriInfo ; @ GET @ Path ( "//agencies" ) public Response getAgencies ( ) { } @ GET @ Path ( "//agencies//{agencyId}" ) public Response getAgency ( @ PathParam ( "agencyId" ) String agencyId ) { } @ GET @ Path ( "//agencies//{agencyId}//routes" ) public Response getAgencyRoutes ( @ PathParam ( "agencyId" ) String agencyId ) { } @ GET @ Path ( "//stops//{stopId}" ) public Response getStop ( @ PathParam ( "stopId" ) String stopIdString ) { } @ GET @ Path ( "//stops" ) public Response getStopsInRadius ( @ QueryParam ( "minLat" ) Double minLat , @ QueryParam ( "minLon" ) Double minLon , @ QueryParam ( "maxLat" ) Double maxLat , @ QueryParam ( "maxLon" ) Double maxLon , @ QueryParam ( "lat" ) Double lat , @ QueryParam ( "lon" ) Double lon , @ QueryParam ( "radius" ) Double radius ) { } @ GET @ Path ( "//stops//{stopId}//routes" ) public Response getRoutesForStop ( @ PathParam ( "stopId" ) String stopId ) { } @ GET @ Path ( "//stops//{stopId}//patterns" ) public Response getPatternsForStop ( @ PathParam ( "stopId" ) String stopIdString ) { } @ GET @ Path ( "//stops//{stopId}//stoptimes" ) public Response getStoptimesForStop ( @ PathParam ( "stopId" ) String stopIdString , @ QueryParam ( "startTime" ) long startTime , @ QueryParam ( "timeRange" ) @ DefaultValue ( "86400" ) int timeRange , @ QueryParam ( "numberOfDepartures" ) @ DefaultValue ( "2" ) int numberOfDepartures ) { Stop stop = index . stopForId . get ( GtfsLibrary . convertIdFromString ( stopIdString ) ) ; if ( stop == null ) return Response . status ( NOT_FOUND ) . entity ( IndexAPI . MSG_404 ) . build ( ) ; <START_BUG> return Response . status ( OK ) . entity ( index . stopTimesForStop ( stop , startTime , timeRange , numberOfDepartures , detail ) ) . build ( ) ; <END_BUG> } @ GET @ Path ( "//stops//{stopId}//stoptimes//{date}" ) public Response getStoptimesForStopAndDate ( @ PathParam ( "stopId" ) String stopIdString , @ PathParam ( "date" ) String date ) { } @ GET @ Path ( "//stops//{stopId}//transfers" ) public Response getTransfers ( @ PathParam ( "stopId" ) String stopIdString ) { } @ GET @ Path ( "//routes" ) public Response getRoutes ( @ QueryParam ( "hasStop" ) List < String > stopIds ) { } @ GET @ Path ( "//routes//{routeId}" ) public Response getRoute ( @ PathParam ( "routeId" ) String routeIdString ) { } @ GET @ Path ( "//routes//{routeId}//patterns" ) public Response getPatternsForRoute ( @ PathParam ( "routeId" ) String routeIdString ) { } @ GET @ Path ( "//routes//{routeId}//stops" ) public Response getStopsForRoute ( @ PathParam ( "routeId" ) String routeIdString ) { } @ GET @ Path ( "//routes//{routeId}//trips" ) public Response getTripsForRoute ( @ PathParam ( "routeId" ) String routeIdString ) { } @ GET @ Path ( "//trips//{tripId}" ) public Response getTrip ( @ PathParam ( "tripId" ) String tripIdString ) { } @ GET @ Path ( "//trips//{tripId}//stops" ) public Response getStopsForTrip ( @ PathParam ( "tripId" ) String tripIdString ) { } @ GET @ Path ( "//trips//{tripId}//semanticHash" ) public Response getSemanticHashForTrip ( @ PathParam ( "tripId" ) String tripIdString ) { } @ GET @ Path ( "//trips//{tripId}//stoptimes" ) public Response getStoptimesForTrip ( @ PathParam ( "tripId" ) String tripIdString ) { } @ GET @ Path ( "//trips//{tripId}//geometry" ) public Response getGeometryForTrip ( @ PathParam ( "tripId" ) String tripIdString ) { } @ GET @ Path ( "//patterns" ) public Response getPatterns ( ) { } @ GET @ Path ( "//patterns//{patternId}" ) public Response getPattern ( @ PathParam ( "patternId" ) String patternIdString ) { } @ GET @ Path ( "//patterns//{patternId}//trips" ) public Response getTripsForPattern ( @ PathParam ( "patternId" ) String patternIdString ) { } @ GET @ Path ( "//patterns//{patternId}//stops" ) public Response getStopsForPattern ( @ PathParam ( "patternId" ) String patternIdString ) { } @ GET @ Path ( "//patterns//{patternId}//semanticHash" ) public Response getSemanticHashForPattern ( @ PathParam ( "patternId" ) String patternIdString ) { } @ GET @ Path ( "//patterns//{patternId}//geometry" ) public Response getGeometryForPattern ( @ PathParam ( "patternId" ) String patternIdString ) { } @ GET @ Path ( "//services" ) public Response getServices ( ) { } @ GET @ Path ( "//services//{serviceId}" ) public Response getServices ( @ PathParam ( "serviceId" ) String serviceId ) { } @ GET @ Path ( "//clusters" ) public Response getAllStopClusters ( ) { } @ GET @ Path ( "//clusters//{clusterId}" ) public Response getStopCluster ( @ PathParam ( "clusterId" ) String clusterIdString ) { } private static class Transfer { public String toStopId ; public double distance ; public Transfer ( SimpleTransfer e ) { } } }

Fix:
return Response . status ( OK ) . entity ( index . getStopTimesForStop ( stop , startTime , timeRange , numberOfDepartures , detail ) ) . build ( ) ;