The algorithm for searching for session ids does not take into account that the Fqn for buddies whose name ends with :DEAD (i.e. buddies that JBC knows are no longer in the group) include an extra element. Effect is getSessionIds() does not return ids for sessions stored under such trees.
Effect of this is when a session manager starts, it gets an incomplete listing of session ids. Affects of this are:
1) Some incorrect session count statistics through the JMX interface.
2) The sessions that are missed will not be passivated or expired by the background cleanup task.
Such sessions will still be available if accessed by a user request.
Fix is to properly search the dead buddy backup trees.