Buggy code:
@ Controller public class BiCycleTransferController { @ Autowired private TransferRequestService transferRequestService ; @ Autowired private TransferResponseService transferResponseService ; @ Autowired private TransferService transferService ; @ Autowired private PickUpPointManagerService pickUpPointManagerService ; @ Autowired private BiCycleService bicycleService ; @ Autowired private BiCycleTransferService biCycleTransferService ; @ RequestMapping ( value = "manager//transferRequest" , method = RequestMethod . GET ) public ModelAndView transferRequest ( ) { } @ RequestMapping ( value = "manager//sendRequest" , method = RequestMethod . POST ) public ModelAndView sendRequest ( @ Valid @ ModelAttribute ( "transferData" ) TransferRequestDTO transferRequestDTO , BindingResult result , RedirectAttributes redirectAttributes , Authentication authentication ) { if ( result . hasErrors ( ) ) { redirectAttributes . addFlashAttribute ( "transferErrorMessage" , "Inavlid<seq2seq4repair_space>Request.<seq2seq4repair_space>Please<seq2seq4repair_space>enter<seq2seq4repair_space>valid<seq2seq4repair_space>quantity" ) ; return new ModelAndView ( "redirect:transferRequest" ) ; } if ( ( transferRequestService . addNewTransferRequest ( authentication , transferRequestDTO ) ) == null ) { <START_BUG> redirectAttributes . addFlashAttribute ( "errorMessage" , "Transfer<seq2seq4repair_space>request<seq2seq4repair_space>filed!" ) ; <END_BUG> } else { redirectAttributes . addFlashAttribute ( "successMessage" , ( ( "Transfer<seq2seq4repair_space>request<seq2seq4repair_space>for<seq2seq4repair_space>" + ( transferRequestDTO . getQuantity ( ) ) ) + "<seq2seq4repair_space>bicycles<seq2seq4repair_space>sent<seq2seq4repair_space>successfully" ) ) ; } return new ModelAndView ( "redirect:transferRequest" ) ; } @ RequestMapping ( value = "admin//requests" , method = RequestMethod . GET ) public ModelAndView viewRequests ( Model model ) { } @ RequestMapping ( value = "manager//requests" , method = RequestMethod . GET ) public ModelAndView viewOthersRequests ( Model model , Authentication authentication ) { } @ PostAuthorize ( "@currentUserService.canAccessManagerResponse(principal,<seq2seq4repair_space>#requestId)" ) @ RequestMapping ( value = "//manager//respond//{id}" , method = RequestMethod . GET ) public ModelAndView managerResponse ( @ PathVariable ( "id" ) Long requestId , Model model , Authentication authentication ) { } @ RequestMapping ( value = "manager//sendResponse" , method = RequestMethod . POST ) public ModelAndView sendResponse ( @ ModelAttribute ( "responseData" ) TransferRensponseDTO transferResponseDTO , Authentication authentication ) { } @ RequestMapping ( value = "admin//respond//{id}" , method = RequestMethod . GET ) public ModelAndView adminResponse ( @ PathVariable ( "id" ) Long requestId , Model model ) { } @ RequestMapping ( value = "admin//approveResponse//{id}" , method = RequestMethod . GET ) public ModelAndView approveResponse ( @ PathVariable ( "id" ) Long responseId ) { } @ RequestMapping ( value = "manager//transfers" , method = RequestMethod . GET ) public ModelAndView viewTransfers ( Model model , Authentication authentication ) { } @ PostAuthorize ( "@currentUserService.canAccessManagerSender(principal,<seq2seq4repair_space>#transferId)" ) @ RequestMapping ( value = "manager//sendShipment//{id}" , method = RequestMethod . GET ) public ModelAndView sendShipment ( @ PathVariable ( "id" ) Long transferId , Model model , HttpSession session ) { } @ RequestMapping ( value = "manager//confirmShipment" , method = RequestMethod . POST ) public ModelAndView confirmShipment ( @ ModelAttribute ( "transferData" ) TransferDataDTO transferDataDTO , HttpSession session ) { } @ PostAuthorize ( "@currentUserService.canAccessManagerReceiver(principal,<seq2seq4repair_space>#transferId)" ) @ RequestMapping ( value = "manager//receiveShipment//{id}" , method = RequestMethod . GET ) public ModelAndView receiveShipment ( @ PathVariable ( "id" ) Long transferId , HttpSession session ) { } @ PostAuthorize ( "@currentUserService.canAccessManagerReceiver(principal,<seq2seq4repair_space>#transferId)" ) @ RequestMapping ( value = "manager//confirmShipmentReceive//{id}" , method = RequestMethod . GET ) public ModelAndView confirmShipmentReceive ( @ PathVariable ( "id" ) Long transferId , HttpSession session , Model model ) { } }

Fix:
redirectAttributes . addFlashAttribute ( "errorMessage" , "Request<seq2seq4repair_space>Failed..!!<seq2seq4repair_space>Request<seq2seq4repair_space>cannot<seq2seq4repair_space>exceed<seq2seq4repair_space>maximum<seq2seq4repair_space>capacity." ) ;