Buggy code:
@ Controller @ RequestMapping public class LoginController extends AbstractBaseController { @ Autowired private UserLoginValidator userValidator ; @ Autowired private UserRoleService userRoleService ; @ Autowired private ActivityLogService logService ; @ Autowired private ChangePasswordValidator changePasswordValidator ; @ Autowired private ResetPasswordValidator resetPasswordValidator ; @ Autowired private CookieUtils cookieUtil ; @ Autowired private CycleMasterDataService cycleMasterDataService ; @ RequestMapping ( LOGIN_VIEW_WITH_SLASH ) public ModelAndView userLogin ( final HttpServletRequest request , final HttpServletResponse response , @ ModelAttribute ( "userLoginForm" ) final UserLoginDto loginForm , final BindingResult result , final Model model , Locale locale ) { } @ RequestMapping ( FORGET_PASSWORD_VIEW_WITH_SLASH ) protected ModelAndView forgetPassword ( final HttpServletRequest httpServletRequest , final HttpServletResponse httpServletResponse , final Map < String , Object > model , @ ModelAttribute ( FORGET_PASSWORD_FORM ) final UserLoginDto passwordResetForm , Locale locale ) { } private MailMetaData getMailMetaDataForPasswordMail ( final UserLoginDto passwordResetFormDto , final Locale locale , final String contextpath ) { } @ RequestMapping ( RESET_PASSWORD_VIEW_WITH_SLASH ) protected ModelAndView resetPassword ( final HttpServletRequest httpServletRequest , final HttpServletResponse httpServletResponse , final Map < String , Object > model , @ ModelAttribute ( RESET_PASSWORD_FORM ) final UserLoginDto resetPasswordForm , @ RequestParam ( value = "token" , required = false ) final String token , final Locale locale , final BindingResult result ) { } @ RequestMapping ( ACCTIVATION_VIEW_WITH_SLASH ) public ModelAndView activateUser ( final HttpServletRequest httpServletRequest , final HttpServletResponse httpServletResponse , final Model model , final Locale locale , @ RequestParam ( "token" ) final String token ) throws UserRoleException { } @ RequestMapping ( ACTIVATE_USER_VIEW_WITH_SLASH ) public ModelAndView activate ( final HttpServletRequest httpServletRequest , final HttpServletResponse httpServletResponse , final Model model , final Locale locale , @ RequestParam ( "token" ) final String token ) { <START_BUG> String viewName = GDEStringUtils . prepend ( LOGIN_VIEW_WITH_SLASH , FORM_SET_ONE ) ; <END_BUG> if ( StringUtils . isEmpty ( token ) ) { model . addAttribute ( RESULT , "expiredToken" ) ; } else { GdeUser user = getUserService ( ) . findUserByRegistrationToken ( token ) ; if ( user != null ) { getUserService ( ) . activateUser ( user , null ) ; model . addAttribute ( RESULT , "confirm" ) ; } else { model . addAttribute ( RESULT , "expiredToken" ) ; } } return new ModelAndView ( GDEStringUtils . concat ( REDIRECT , viewName ) ) ; } @ RequestMapping ( value = CHAGNE_PASSWORD_VIEW_WITH_SLASH , method = { RequestMethod . POST , RequestMethod . GET } ) public ModelAndView changePasswordInit ( final HttpServletRequest request , final HttpServletResponse response , final Model model , @ ModelAttribute ( "changepassword" ) final ChangePasswordDto changePasswordForm , final String token , final Locale locale ) { } @ RequestMapping ( value = CHAGNE_PASSWORD_FORM_WITH_SLASH , method = { RequestMethod . POST } ) public ModelAndView changePassword ( final HttpServletRequest request , final HttpServletResponse httpServletResponse , final Model model , @ ModelAttribute ( "changepassword" ) final ChangePasswordDto changePasswordForm , @ RequestParam ( value = "token" , required = false ) final String token , final Locale locale , final BindingResult result ) { } }

Fix:
String viewName = LOGIN_VIEW_WITH_SLASH ;