EL.groupAddFactor(this.s, this.getName(), f, sw);
EL.groupAddFactor(this.s, this.getName(), _f, sw);
  public void addFactor(Factor f)     throws  FactorAddException,            InsufficientPrivilegeException  {    StopWatch sw = new StopWatch();    sw.start();    Validator.validateFactor(this, f);    Factor _f = new Factor(this, f);  // TODO ugly, ugly hack    if (this.hasFactor()) {      throw new FactorAddException("already has factor membership");    }    if (this.getMembers().size() > 0) {      throw new FactorAddException("cannot add factor to group with members");    }    try {      PrivilegeResolver.getInstance().canWriteField(        this.s, this, this.s.getSubject(), getDefaultList(), FieldType.LIST      );    }    catch (SchemaException eS) {      // TODO Argh.  This try-catch should **not** really be necessary.        throw new FactorAddException(eS.getMessage());    }    try {      Set       saves     = new LinkedHashSet();      GroupType isFactor  = GroupTypeFinder.find("isFactor");      GroupType hasFactor = GroupTypeFinder.find("hasFactor");      Group     left      = (Group) _f.getLeft();      Group     right     = (Group) _f.getRight();      left._addType(  isFactor  );  // TODO Should I set modified?      right._addType( isFactor  );  // TODO Should I set modified?      this._addType(  hasFactor );      this.setModified();      saves.add(  _f                            );  // The factor      saves.add(  left                          );  // The left group      saves.add(  right                         );  // The right group      saves.add(  new TxFactorAdd(s, this, _f)  );  // The tx      saves.add(  this                          );  // This group      HibernateHelper.save(saves);      sw.stop();       EL.groupAddFactor(this.s, this.getName(), f, sw);    } catch (Exception e) {      // HibernateException      // SchemaException      throw new FactorAddException(e.getMessage());    }  } // public void addFactor(f)