if (GrouperGroup.exists(s, stem, extn, Grouper.NS_TYPE)) {
if (!GrouperStem.exists(s, stem)) { throw new RuntimeException("Parent stem does not exist"); } if (GrouperStem.exists(s, Group.groupName(stem, extn))) {
  public static GrouperStem create(                              GrouperSession s, String stem, String extn                            )  {    GrouperStem ns;    s.dbSess().txStart();    Group.subjectCanCreateAtRoot(s, stem);    Group.subjectCanCreateStem(s, stem);    if (GrouperGroup.exists(s, stem, extn, Grouper.NS_TYPE)) {      throw new RuntimeException("Stem already exists");    }    try {      ns = new GrouperStem(s, stem, extn);      s.dbSess().session().save(ns);      ns.grantStemUponCreate();       ns.initialized = true;      s.dbSess().txCommit();      Grouper.log().stemAdd(s, ns, Group.groupName(stem, extn), ns.type());    } catch (HibernateException e) {      s.dbSess().txRollback();      throw new RuntimeException("Error saving stem: " + e);    }     return ns;  }