if (GrouperGroup._canCreate(s, stem)) {
if (GrouperGroup._canCreate(s, stem, type)) {
  private static GrouperGroup _create(                                      GrouperSession s, String stem,                                       String extn, String type                                     )  {    GrouperGroup g = null;    String name = GrouperBackend.groupName(stem, extn);    if (GrouperGroup._canCreate(s, stem)) {      // Check to see if the group already exists.      g = GrouperGroup._loadByStemExtn(s, stem, extn, type);      if (g != null) {        /*         * TODO Group already exists.  Ideally we'd throw an exception or         *      something, but, for now...         */        Grouper.log().groupAddCannot(s, name, type);        g = null;      } else {        if (name != null) {          // TODO Can I move all|most of this to GrouperBackend?          g = new GrouperGroup();          // Generate the UUIDs          g.setGroupKey( GrouperBackend.uuid() );          g.setGroupID(  GrouperBackend.uuid() );          // Set attributes          g._attrAdd("stem",      stem);          g._attrAdd("extension", extn);          g._attrAdd("name",      name);          /*           * TODO Add `displayName' support           *      Will I run into priv (for fetching of stem's           *      `displayName' when I add in support for this?           */          g.type = type;          // Set some of the operational attributes          /*           * TODO Most, if not all, of the operational attributes should be           *      handled by Hibernate interceptors.  A task for another day.           */          g.setCreateTime(    GrouperGroup._now() );          GrouperMember mem = GrouperMember.load( s.subject() );          g.setCreateSubject( mem.key() );          // Verify that we have everything we need to create a group          // and that this subject is privileged to create this group.          if (g._validateCreate()) {            // And now attempt to add the group to the store            if (GrouperBackend.groupAdd(s, g)) {              g.initialized = true; // FIXME UGLY HACK!            } else {              g = null;              }          }        } else {          // TODO Log          g = null;        }      }    } else {      Grouper.log().event(        "Subject does not have " + Grouper.PRIV_CREATE +         " privileges on this stem"      );    }    Grouper.log().groupAdd(s, g, name, type);    return g;  }