Buggy code:
public class SessionDataContainer { private static class SessionInfo { private ConcurrentMap < String , Object > contentOfSession = new ConcurrentHashMap < > ( ) ; } private ConcurrentMap < String , SessionDataContainer . SessionInfo > sessionInfoMap = new ConcurrentHashMap < > ( ) ; private static final String USER_PARAMETER_NAME = "user" ; private static final String PASSWORD_PARAMETER_NAME = "password" ; private static final String AUTHN_PARAMETER_NAME = "authn" ; private static final String PROFILE_PARAMETER_NAME = "profile" ; private static final String HARD_LIMIT_PARAMETER_NAME = "hard_limit" ; private static final String SOFT_LIMIT_PARAMETER_NAME = "soft_limit" ; private static final String ENGINE_SESSION_SEQ_ID = "engine_session_seq_id" ; private static final String ENGINE_SESSION_ID = "engine_session_id" ; private static final String AUTH_RECORD_PARAMETER_NAME = "auth_record" ; private static final String PRINCIPAL_RECORD_PARAMETER_NAME = "principal_record" ; private static SessionDataContainer dataProviderInstance = new SessionDataContainer ( ) ; private DbFacade dbFacade ; private SessionDataContainer ( ) { } public static SessionDataContainer getInstance ( ) { } public final Object getData ( String sessionId , String key , boolean refresh ) { } public final void setData ( String sessionId , String key , Object value ) { } private SessionDataContainer . SessionInfo getSessionInfo ( String sessionId ) { } private void persistEngineSession ( String sessionId ) { } public long getEngineSessionSeqId ( String sessionId ) { } public String getSessionIdBySeqId ( long sessionSequenceId ) { String sessionId = null ; for ( SessionDataContainer . SessionInfo sessionInfo : sessionInfoMap . values ( ) ) { <START_BUG> if ( ( sessionInfo . contentOfSession . get ( SessionDataContainer . ENGINE_SESSION_SEQ_ID ) ) == sessionSequenceId ) { <END_BUG> sessionId = ( ( String ) ( sessionInfo . contentOfSession . get ( SessionDataContainer . ENGINE_SESSION_ID ) ) ) ; break ; } } return sessionId ; } public void cleanupEngineSessionsOnStartup ( ) { } public final void removeSessionOnLogout ( String sessionId ) { } @ OnTimerMethodAnnotation ( "cleanExpiredUsersSessions" ) public final void cleanExpiredUsersSessions ( ) { } public final void setUser ( String sessionId , DbUser user ) { } public final void setHardLimit ( String sessionId , Date hardLimit ) { } public final void setSoftLimit ( String sessionId , Date softLimit ) { } public DbUser getUser ( String sessionId , boolean refresh ) { } public void setPassword ( String sessionId , String password ) { } public String getPassword ( String sessionId ) { } public void refresh ( String sessionId ) { } public void setProfile ( String sessionId , AuthenticationProfile profile ) { } public AuthenticationProfile getProfile ( String sessionId ) { } public String getPrincipalName ( String sessionId ) { } public String getUserName ( String sessionId ) { } public void setAuthRecord ( String engineSessionId , ExtMap authRecord ) { } public ExtMap getAuthRecord ( String engineSessionId ) { } public void setPrincipalRecord ( String engineSessionId , ExtMap principalRecord ) { } public ExtMap getPrincipalRecord ( String engineSessionId ) { } private void refresh ( SessionDataContainer . SessionInfo sessionInfo ) { } public boolean isSessionExists ( String sessionId ) { } private void removeSessionImpl ( String sessionId , int reason , String message , Object ... msgArgs ) { } public void setDbFacade ( DbFacade dbFacade ) { } public DbFacade getDbFacade ( ) { } }

Fix:
if ( sessionInfo . contentOfSession . get ( SessionDataContainer . ENGINE_SESSION_SEQ_ID ) . equals ( sessionSequenceId ) ) {