return mships;
g.setSession(s); Set resetMships = new LinkedHashSet();  Iterator iter = mships.iterator(); while (iter.hasNext()) { Membership ms = (Membership) iter.next(); ms.setSession(s); resetMships.add(ms); }  GrouperLog.debug(LOG, s, "memberOf total" + msg + resetMships.size()); return resetMships;
  protected static Set doMemberOf(GrouperSession s, Group g, Member m)     throws GroupNotFoundException  {    Set mships    = new LinkedHashSet();    // Find where g is a member    Set isMember  = g.toMember().getMemberships();    // Add m to where g is a member    mships.addAll(      _findMembershipsWhereGroupIsMember(s, g, m, isMember)    );    // Add members of m to g    // Add members of m to where g is a member    mships.addAll(      _findGroupAsMember(s, g.getUuid(), m, isMember)    );    return mships;  } // protected static Set doMemberOf(s, m)