Buggy code:
@ Controller @ RequestMapping ( "//userdata" ) public class CandidateDataController extends AbstractBaseController { @ Autowired private PersonalController personalController ; @ Autowired private UserOrdinaturDetailService userOrdinaturDetailService ; @ Autowired private ProfessionalExperienceService professionalExperienceService ; @ Autowired private UserTravelAbroadDetailsService userTravelAbroadDetailsService ; @ Autowired private UserITDetailService userITDetailService ; @ Autowired private UserTravelAbroadService userTravelAbroadService ; @ Autowired private UserSchoolDetailService userSchoolDetailService ; @ Autowired private UserInternaturDetailService userInternaturDetailService ; @ Autowired private AdditionalProfessionalDetailService additionalProfessionalDetailService ; @ Autowired private UserITDefaultDetailService userITDefaultDetailService ; @ Autowired private UserSchoolController schoolController ; @ Autowired private UserProffesionalEducationController profEduController ; @ Autowired private CandidateDataModelAndView candidateDataModelAndView ; @ Autowired private UserRegistrationInformationService userRegistrationInformationService ; @ Autowired private UserSchoolEducationService userSchoolEducationService ; @ Autowired private UserStudyDetailService userStudyDetailService ; @ Autowired private UserInternshipDetailService userInternshipDetailService ; @ Autowired private AdditionalInformationController additionalInfoController ; @ Autowired private ITKnowledgeController itKnowledgeController ; @ Autowired private UserAdditionalInformationService userAdditionalInformationService ; @ Autowired private ProfessionalExperienceController profExperienceController ; @ Autowired private UserProffesionalEducationController userProffesionalEducationController ; @ Autowired private InternaturController internaturController ; @ Autowired private OrdinaturController ordinaturController ; @ Autowired private AdditionlProfDetailController additionlProfDetailController ; @ Autowired private CandidateDataService candidateDataService ; @ Autowired private UserLanguageSkillsService userLanguageSkillsService ; @ Autowired private UserLanguageSkillsDetailsService userLanguageSkillsDetailsService ; @ Autowired private AdditionalQualificationController additionalQulaificationController ; @ Autowired private CookieUtils cookieUtil ; @ Autowired private PEEvaluationDetailsService peEvaluationDetailsService ; @ Autowired private DocumentInfoService documentInfoService ; @ Autowired private PEEvaluationDetailsValidator evaluationDetailsValidator ; @ RequestMapping ( "//" ) public ModelAndView getFirstView ( @ ModelAttribute ( "candidateDataForm" ) final CandidateDataDto candidateDataDto , final HttpServletRequest request , final HttpServletResponse response , final Model model , Locale locale , final BindingResult result , @ ModelAttribute ( PRE_EVALUATION_FORM ) PreEvaluationParentDto preEvaluationParentDto ) { <START_BUG> String id = request . getParameter ( "userid" ) ; <END_BUG> if ( ! ( StringUtils . isEmpty ( id ) ) ) { long userId = Long . valueOf ( id ) . longValue ( ) ; GdeUser appUser = getUserService ( ) . getUserDetails ( userId ) ; GDESessionFacade . setAttribute ( request , APP_USER , appUser ) ; } model . addAttribute ( "clickedTabId" , PERSONAL_DATA_FORM . getInternal ( ) ) ; model . addAttribute ( "openedTabId" , PERSONAL_DATA_FORM . getInternal ( ) ) ; GdeUser user = getApplicationUser ( request ) ; String backButtonViewName = ( ( request . getAttribute ( BACK_BTN_VIEW ) ) != null ) ? request . getAttribute ( BACK_BTN_VIEW ) . toString ( ) : null ; candidateDataDto . setBackButtonView ( backButtonViewName ) ; locale = cookieUtil . setLocaleLanguage ( request , response ) ; if ( CONFIRMED_USER . equals ( user . getLastLoginRole ( ) ) ) { return new ModelAndView ( ACCESS_DENIED_VIEW ) ; } if ( user != null ) { String preEvaluator = request . getParameter ( "preEvaluatorId" ) ; String appTrace = request . getParameter ( "appTraceId" ) ; if ( ( ! ( StringUtils . isEmpty ( preEvaluator ) ) ) && ( ! ( StringUtils . isEmpty ( appTrace ) ) ) ) { Long preEvaluatorId = Long . valueOf ( preEvaluator ) ; Long appTraceId = Long . valueOf ( appTrace ) ; preEvaluationParentDto = new PreEvaluationParentDto ( user . getId ( ) , preEvaluatorId , appTraceId ) ; List < PreEvaluationDto > preEvaluationDtoList = new ArrayList < PreEvaluationDto > ( ) ; ArrayList < DocumentInfo > documentList = ( ( ArrayList < DocumentInfo > ) ( documentInfoService . getListofDocumentInfo ( user ) ) ) ; preEvaluationDtoList = peEvaluationDetailsService . fetchPreEvaluationList ( documentList , preEvaluationParentDto ) ; preEvaluationParentDto . setPreEvaluationDtoList ( preEvaluationDtoList ) ; model . addAttribute ( "validationDropDown" , getBaseService ( ) . getValidationEnumMap ( locale ) ) ; model . addAttribute ( "preEvaluationForm" , preEvaluationParentDto ) ; candidateDataDto . setAppTraceId ( appTraceId ) ; candidateDataDto . setCandidateId ( user . getId ( ) ) ; candidateDataDto . setPreEvaluatorId ( preEvaluatorId ) ; } PersonalDataDto personalDataDto = userRegistrationInformationService . getPersonalData ( user . getId ( ) ) ; candidateDataDto . setPersonalDataDto ( personalDataDto ) ; if ( ( GDESessionFacade . getUser ( request ) . getLastLoginRole ( ) . getCategory ( ) . equals ( INTERNAL ) ) && ( null != ( GDESessionFacade . getAttribute ( request , READ_ONLY_APP_VIEW ) ) ) ) { if ( GDESessionFacade . getAttribute ( request , READ_ONLY_APP_VIEW ) . toString ( ) . equalsIgnoreCase ( "true" ) ) { candidateDataDto . setReadOnlyMode ( true ) ; GDESessionFacade . setAttribute ( request , READ_ONLY_APP_VIEW , true ) ; } else { candidateDataDto . setReadOnlyMode ( false ) ; GDESessionFacade . setAttribute ( request , READ_ONLY_APP_VIEW , false ) ; } } else if ( user . getLastLoginRole ( ) . equals ( CANDIDATE ) ) { candidateDataDto . setReadOnlyMode ( true ) ; GDESessionFacade . setAttribute ( request , READ_ONLY_APP_VIEW , true ) ; } else if ( GDESessionFacade . getUser ( request ) . getLastLoginRole ( ) . getCategory ( ) . equals ( EVALUATOR ) ) { candidateDataDto . setReadOnlyMode ( true ) ; GDESessionFacade . setAttribute ( request , READ_ONLY_APP_VIEW , true ) ; } else { candidateDataDto . setReadOnlyMode ( false ) ; GDESessionFacade . setAttribute ( request , READ_ONLY_APP_VIEW , false ) ; } } return candidateDataModelAndView . view ( "candidatedata" , model , request , response , locale ) ; } @ RequestMapping ( value = "//saveData" , method = { RequestMethod . POST , RequestMethod . GET } ) public ModelAndView saveCandidateData ( @ ModelAttribute ( "candidateDataForm" ) final CandidateDataDto candidateDataDto , final HttpServletRequest request , final HttpServletResponse response , final Model model , Locale locale , final BindingResult result , @ ModelAttribute ( PRE_EVALUATION_FORM ) PreEvaluationParentDto preEvaluationParentDto ) { } @ RequestMapping ( value = "//submitData" , method = RequestMethod . POST ) public ModelAndView submitCandidateDataTwo ( @ ModelAttribute ( "candidateDataForm" ) final CandidateDataDto candidateDataDto , final HttpServletRequest request , final HttpServletResponse response , final Model model , Locale locale , final BindingResult result ) { }

Fix:
String id = request . getParameter ( "appUserId" ) ;