Program: 49851
Project: 49851
Buggy source:
@Override public HazelcastHttpSession getSession(final boolean create){
  if (hazelcastSession != null && !hazelcastSession.isValid()) {
    log("String_Node_Str");
    destroySession(hazelcastSession);
    hazelcastSession=null;
  }
  if (hazelcastSession == null) {
    HttpSession originalSession=getOriginalSession(false);
    if (originalSession != null) {
      String hazelcastSessionId=mapOriginalSessions.get(originalSession.getId());
      if (hazelcastSessionId != null) {
        hazelcastSession=mapSessions.get(hazelcastSessionId);
      }
      if (hazelcastSession == null) {
        mapOriginalSessions.remove(originalSession.getId());
        originalSession.invalidate();
      }
    }
  }
  if (hazelcastSession != null)   return hazelcastSession;
  final String requestedSessionId=fetchHazelcastSessionId();
  if (requestedSessionId != null) {
    hazelcastSession=getSessionWithId(requestedSessionId);
    if (hazelcastSession == null) {
      final Map mapSession=(Map)getClusterMap().get(requestedSessionId);
      if (mapSession != null) {
        hazelcastSession=createNewSession(RequestWrapper.this,requestedSessionId);
        overrideSession(hazelcastSession,mapSession);
      }
    }
  }
  if (hazelcastSession == null && create) {
    hazelcastSession=createNewSession(RequestWrapper.this,null);
  }
 else   if (hazelcastSession != null && !stickySession && requestedSessionId != null && hazelcastSession.isDirty()) {
    log(requestedSessionId + "String_Node_Str");
    final Map mapSession=(Map)getClusterMap().get(requestedSessionId);
    overrideSession(hazelcastSession,mapSession);
  }
  return hazelcastSession;
}

Fixed version (ground truth):
@Override public HazelcastHttpSession getSession(final boolean create){
  if (hazelcastSession != null && !hazelcastSession.isValid()) {
    log("String_Node_Str");
    destroySession(hazelcastSession);
    hazelcastSession=null;
  }
  if (hazelcastSession == null) {
    HttpSession originalSession=getOriginalSession(false);
    if (originalSession != null) {
      String hazelcastSessionId=mapOriginalSessions.get(originalSession.getId());
      if (hazelcastSessionId != null) {
        hazelcastSession=mapSessions.get(hazelcastSessionId);
      }
      if (hazelcastSession == null) {
        mapOriginalSessions.remove(originalSession.getId());
        originalSession.invalidate();
      }
 else       if (hazelcastSession.isDirty()) {
        hazelcastSession=null;
      }
    }
  }
  if (hazelcastSession != null)   return hazelcastSession;
  final String requestedSessionId=fetchHazelcastSessionId();
  if (requestedSessionId != null) {
    hazelcastSession=getSessionWithId(requestedSessionId);
    if (hazelcastSession == null) {
      final Map mapSession=(Map)getClusterMap().get(requestedSessionId);
      if (mapSession != null) {
        hazelcastSession=createNewSession(RequestWrapper.this,requestedSessionId);
        overrideSession(hazelcastSession,mapSession);
      }
    }
  }
  if (hazelcastSession == null && create) {
    hazelcastSession=createNewSession(RequestWrapper.this,null);
  }
 else   if (hazelcastSession != null && !stickySession && requestedSessionId != null && hazelcastSession.isDirty()) {
    log(requestedSessionId + "String_Node_Str");
    final Map mapSession=(Map)getClusterMap().get(requestedSessionId);
    overrideSession(hazelcastSession,mapSession);
  }
  return hazelcastSession;
}