code: public static synchronized Roster getInstanceFor(XMPPConnection connection) {
          Roster roster = INSTANCES.get(connection);
          if (roster == null) {
              roster = new Roster(connection);
              INSTANCES.put(connection, roster);
          }
          return roster;
      }
docs: Returns the roster for the user.
  <p>
  This method will never return <code>null</code>, instead if the user has not yet logged into
  the server all modifying methods of the returned roster object
  like {@link Roster#createEntry(BareJid, String, String[])},
  {@link Roster#removeEntry(RosterEntry)} , etc. except adding or removing
  {@link RosterListener}s will throw an IllegalStateException.
  </p>
  
  @param connection the connection the roster should be retrieved for.
  @return the user's roster.