Buggy code:
@ Service public final class GDESessionFacade { private GDESessionFacade ( ) { } public static Integer getHttpSessionTimeOut ( final HttpServletRequest request ) { } public static void setHttpSessionTimeOut ( final HttpServletRequest request ) { } public static Object getAttribute ( final HttpServletRequest request , final String name ) { } public static void setAttribute ( final HttpServletRequest request , final String name , final Object value ) { } public static void removeAttribute ( final HttpServletRequest request , final String name ) { } public static String getRemoteAddress ( final HttpServletRequest request ) { } public static GdeUser getUser ( final HttpServletRequest request ) { } public static void setUser ( final HttpServletRequest request , final GdeUser user ) { } public static Locale getUserLocale ( final HttpServletRequest request ) { } @ SuppressWarnings ( "unchecked" ) public static Map < DocCategoryEnum , DocumentDto > getDocumentMapInCaseOfError ( final HttpServletRequest request ) { } public static void setDocumentMapInCaseOfError ( final HttpServletRequest request , final Map < DocCategoryEnum , DocumentDto > documentMap ) { } public static boolean isSessionInvalidated ( final HttpServletRequest request ) { } public static void invalidate ( final HttpServletRequest request ) { } public static String findHomePageViewName ( final GdeUser user ) { } public static String findHomePageViewName ( final GdeUser user , final String fromWhere ) { String viewName = null ; if ( ( user . isWithdrawApplication ( ) ) && ( ! ( "withdraw" . equals ( fromWhere ) ) ) ) { viewName = GDEViewNameConstants . WITHDRAWAL_USER_VIEW ; } else { switch ( user . getLastLoginRole ( ) ) { case ADMINISTRATOR : if ( user . getIsChangePassword ( ) ) { viewName = GDEViewNameConstants . CHAGNE_PASSWORD_VIEW_WITH_SLASH ; } else { viewName = GDEViewNameConstants . ADMINISTRATOR_VIEW ; } break ; case SUPPORT : if ( user . getIsChangePassword ( ) ) { viewName = GDEViewNameConstants . CHAGNE_PASSWORD_VIEW_WITH_SLASH ; } else { viewName = GDEViewNameConstants . SUPPORT_VIEW ; } break ; case SUPERVISOR : if ( user . getIsChangePassword ( ) ) { viewName = GDEViewNameConstants . CHAGNE_PASSWORD_VIEW_WITH_SLASH ; } else { viewName = GDEViewNameConstants . SUPERVISOR_VIEW ; } break ; case PRE_EVALUATOR : if ( user . getIsChangePassword ( ) ) { viewName = GDEViewNameConstants . CHAGNE_PASSWORD_VIEW_WITH_SLASH ; } else { viewName = GDEViewNameConstants . APPLICATION_VIEW_PRE_EVALUATOR ; } break ; case EXPERT : if ( user . getIsChangePassword ( ) ) { viewName = GDEViewNameConstants . CHAGNE_PASSWORD_VIEW_WITH_SLASH ; } else { viewName = INTERNAL . concat ( EXPERT_VIEW_WITH_SLASH ) ; } break ; case UNCONFIRMED_USER : viewName = GDEStringUtils . concat ( LOGIN_VIEW_WITH_SLASH , "?" , RESULT , "=unconfirmedUser" ) ; break ; case CONFIRMED_USER : viewName = GDEViewNameConstants . REGISTRATION_VIEW_WITH_SLASH ; break ; case CANDIDATE : viewName = GDEViewNameConstants . CANDIDATE_VIEW_WITH_SLASH ; break ; case AC_CANDIDATE : viewName = GDEViewNameConstants . AC_CANDIDATE_VIEW_WITH_SLASH ; break ; case APPLICANT : <START_BUG> if ( ( user . getTestToken ( ) ) != null ) { <END_BUG> viewName = GDEViewNameConstants . ONLINE_TEST_VIEW_WITH_SLASH ; } else { viewName = GDEViewNameConstants . APPLICANT_VIEW_WITH_SLASH ; } break ; case PARTICIPANT : viewName = GDEViewNameConstants . APPLICANT_VIEW_WITH_SLASH ; break ; default : break ; } } return viewName ; } }

Fix:
if ( ! ( GDEStringUtils . isNullOrEmpty ( user . getTestToken ( ) ) ) ) {