Iterator iterGisM = isMember.iterator(); while (iterGisM.hasNext()) { Membership gism = (Membership) iterGisM.next(); try { Membership msGisM = new Membership( s, gism.getOwner_id(), mofm.getMember(), Group.getDefaultList(), vid, depth + gism.getDepth() ); mships.add(msGisM); } catch (MemberNotFoundException eMNF1) {  GrouperLog.warn(LOG, orig, eMNF1.getMessage());
if (f.equals(Group.getDefaultList())) { Iterator iterGisM = isMember.iterator(); while (iterGisM.hasNext()) { Membership gism = (Membership) iterGisM.next(); try { Membership msGisM = new Membership( s, gism.getOwner_id(), mofm.getMember(), Group.getDefaultList(), vid, depth + gism.getDepth() ); GrouperLog.debug(LOG, orig, msg + " msGisM: " + msGisM); mships.add(msGisM); } catch (MemberNotFoundException eMNF1) {  GrouperLog.warn(LOG, orig, eMNF1.getMessage()); }
  private static Set _findMembershipsOfMember(    GrouperSession s, GrouperSession orig, String oid, String gmid, Field f,     Set isMember, Set hasMembers  )   {    // TODO Refactor into smaller components    Set     mships  = new LinkedHashSet();    String  msg     = "findMembershipsOfMember";    GrouperLog.debug(LOG, orig, "findMembershipsOfMember");    // Add members of m to where this group is a member    // For every member of m...    Iterator iterMofM = hasMembers.iterator();    while (iterMofM.hasNext()) {      Membership  mofm  = (Membership) iterMofM.next();      // ... add to this group      int         depth = mofm.getDepth() + 1;      String      vid   = mofm.getVia_id();      if (vid == null) {        vid = gmid;      }      try {        Membership msMofM = new Membership(          s, oid, mofm.getMember(), f, vid, depth        );        mships.add(msMofM);      }      catch (MemberNotFoundException eMNF0) {        // TODO        GrouperLog.warn(LOG, orig, eMNF0.getMessage());      }      // ... and add to wherever this group is a member      Iterator iterGisM = isMember.iterator();      while (iterGisM.hasNext()) {        Membership gism = (Membership) iterGisM.next();        try {          Membership msGisM = new Membership(            s, gism.getOwner_id(), mofm.getMember(), Group.getDefaultList(),             vid, depth + gism.getDepth()           );          mships.add(msGisM);        }        catch (MemberNotFoundException eMNF1) {          // TODO          GrouperLog.warn(LOG, orig, eMNF1.getMessage());        }      }    }    GrouperLog.debug(LOG, orig, msg + ": " + mships.size());    return mships;  } // private static Set _findMembershipsOfMember(s, orig, oid, gmid, f, isMember, hasMembers)