Iterator iterator = this.getAssignmentsReceived(Status.ACTIVE, null) .iterator();
Iterator iterator = this.getAssignmentsReceived(Status.ACTIVE, null, null) .iterator();
  public Set getGrantableSubsystems() throws ObjectNotFoundException  {    Set grantableSubsystems = new HashSet();    try    {      // First, check to see if the we are the Signet superSubject.      // That Subject can grant any privilege in any subsystem to      // anyone, as long as that subsystem actually contains at      // least one function, and has a non-empty scope-tree      // associated with it.      if (this.equals(this.signet.getSuperPrivilegedSubject()))      {        Set allSubsystems = this.signet.getSubsystems();        Iterator allSubsystemsIterator = allSubsystems.iterator();        while (allSubsystemsIterator.hasNext())        {          Subsystem candidateSubsystem = (Subsystem) (allSubsystemsIterator              .next());          Tree tree = candidateSubsystem.getTree();          if (tree == null)          {            // This Subsystem has no Tree, and so none of its Functions            // can be granted.            continue;          }          if (tree.getRoots().size() == 0)          {            // This Tree contains no TreeNodes, and so none of the            // Functions in this Subsystem can actually be granted.            continue;          }          if (candidateSubsystem.getFunctions().size() == 0)          {            // This Subsystem contains no Functions, so there's            // no granting to be done nohow.            continue;          }          grantableSubsystems.add(candidateSubsystem);        }      }    }    catch (ObjectNotFoundException onfe)    {      throw new SignetRuntimeException(onfe);    }    Iterator iterator = this.getAssignmentsReceived(Status.ACTIVE, null)        .iterator();    while (iterator.hasNext())    {      Assignment assignment = (Assignment) (iterator.next());      Function candidateFunction = assignment.getFunction();      Subsystem candidateSubsystem = candidateFunction.getSubsystem();      if (assignment.isGrantable())      {        grantableSubsystems.add(candidateSubsystem);      }    }    return grantableSubsystems;  }