code: public static int getSessionHash(final String sid, final Jid initiator) {
          final int PRIME = 31;
          int result = 1;
          result = PRIME * result + (initiator == null ? 0 : initiator.hashCode());
          result = PRIME * result + (sid == null ? 0 : sid.hashCode());
          return result;
      }
docs: Get a hash key for the session this stanza belongs to.
  
  @param sid       The session id
  @param initiator The initiator
  @return A hash key