try { Transaction t = session.beginTransaction();
GrouperBackend._listAddVal(session, g, m, list, null);
  protected static boolean listAddVal(GrouperSession s, GrouperGroup g, GrouperMember m, String list) {    Session session = GrouperBackend._init();    boolean rv      = false;    // FIXME Better validation efforts, please.    // TODO  Refactor to a method    // TODO  Refactor commonality with listDelVal    if (        g.getClass().getName().equals("edu.internet2.middleware.grouper.GrouperGroup")   &&        s.getClass().getName().equals("edu.internet2.middleware.grouper.GrouperSession") &&        m.getClass().getName().equals("edu.internet2.middleware.grouper.GrouperMember")  &&        Grouper.groupField(g.type(), list)       )     {      // TODO Verify that the subject has privilege to add this list data      // TODO Verify that this data does not already exist      try {        Transaction t = session.beginTransaction();        // Update immediate list data        GrouperBackend._listAddVal(session, g, m, list, null);        GrouperGroup memberOfBase = g;        // Is this member a group?        if (m.typeID().equals("group")) {          memberOfBase = GrouperBackend._groupLoadByID( m.subjectID() );        }        // Grab immediate list data to update        List imms = GrouperBackend._listVals(                                             session, memberOfBase, null,                                             list, Grouper.MEM_IMM                                            );        // Update effective list data        Iterator effIter = GrouperBackend._memberOf(                            session, memberOfBase, list                           ).iterator();        while (effIter.hasNext()) {          GrouperVia via = (GrouperVia) effIter.next();          GrouperBackend._listAddVal(                                     session, via.group(),                                     via.member(), list, via.via()                                    );          Iterator immsIter = imms.iterator();          while(immsIter.hasNext()) {            GrouperList   gl  = (GrouperList) immsIter.next();            GrouperMember mem = (GrouperMember) gl.member();            if (mem != null) {              GrouperBackend._listAddVal(                                         session, via.group(),                                         mem, list, memberOfBase                                        );            } // TODO else...          }        }        // Update modify information        session.update(g);        // Commit it        t.commit();                rv = true;      } catch (Exception e) {        // TODO We probably need a rollback in here in case of failure        //      above.        System.err.println(e);        System.exit(1);      }    }     GrouperBackend._hibernateSessionClose(session);    return rv;  }