Buggy code:
@ Controller @ RequestMapping ( "//api//request" ) public class RequestController extends ApiController { private static Logger log = LoggerFactory . getLogger ( RequestController . class ) ; private RequestManager requestManager ; private DeviceManager deviceManager ; private DeviceNotifier deviceNotifier ; public RequestController ( ) { } @ RequestMapping ( value = "//{id}" , method = RequestMethod . GET , produces = { MediaType . APPLICATION_JSON_VALUE } ) @ ResponseBody public Request getRequestById ( @ PathVariable long id ) { } @ RequestMapping ( value = "//all" , method = RequestMethod . GET , produces = { MediaType . APPLICATION_JSON_VALUE } ) @ ResponseBody public List < Request > getAllRequests ( ) { } @ RequestMapping ( value = "//mine" , method = RequestMethod . GET , produces = { MediaType . APPLICATION_JSON_VALUE } ) @ ResponseBody public List < Request > getAllMyRequests ( ) { } @ RequestMapping ( value = "//mine-by-status" , method = RequestMethod . GET , produces = { MediaType . APPLICATION_JSON_VALUE } ) @ ResponseBody public List < Request > getAllMyRequestsByStatus ( @ RequestParam ( "status" ) RequestStatus [ ] statuses ) { <START_BUG> return requestManager . getAllRequestsByUserAndStatus ( userId , statuses ) ; <END_BUG> } @ RequestMapping ( value = "//all//{deviceUid}" , method = RequestMethod . GET , produces = { MediaType . APPLICATION_JSON_VALUE } ) @ ResponseBody public List < Request > getRequestsForDevice ( @ PathVariable String deviceUid ) { } @ RequestMapping ( value = "//new//{deviceUid}" , method = RequestMethod . GET , produces = { MediaType . APPLICATION_JSON_VALUE } ) @ ResponseBody public List < Request > getNewRequestsForDevice ( @ PathVariable String deviceUid ) { } @ RequestMapping ( value = "//directories" , method = RequestMethod . GET , produces = { MediaType . APPLICATION_JSON_VALUE } ) @ ResponseBody public List < String > getRequestDirectories ( ) { } @ RequestMapping ( value = "//statuses" , method = RequestMethod . GET , produces = { MediaType . APPLICATION_JSON_VALUE } ) @ ResponseBody public List < RequestStatus > getRequestStatuses ( ) { } @ RequestMapping ( value = "//create" , method = RequestMethod . POST , consumes = { MediaType . APPLICATION_JSON_VALUE } ) @ ResponseBody public LongResponse createRequest ( @ RequestBody Request request ) throws EntityException { } @ RequestMapping ( value = "//update" , method = RequestMethod . PUT , consumes = { MediaType . APPLICATION_JSON_VALUE } ) @ ResponseBody public LongResponse updateRequest ( @ RequestBody Request request ) throws AuthorizationException , EntityException { } private void notifyDeviceOfRequest ( Request request ) { } protected boolean canUserModifyRequest ( long requestId , User user ) { } public DeviceNotifier getDeviceNotifier ( ) { } public void setDeviceNotifier ( DeviceNotifier deviceNotifier ) { } public RequestManager getRequestManager ( ) { } public void setRequestManager ( RequestManager requestManager ) { } public DeviceManager getDeviceManager ( ) { } public void setDeviceManager ( DeviceManager deviceManager ) { } }

Fix:
return requestManager . getAllRequestsByUserAndStatus ( getCurrentUser ( ) . getId ( ) , statuses ) ;