Set toSubtract = new HashSet();
  public void processRemovedTasks(Enumeration removedTasks) {    boolean anyRemoved = false;    while (removedTasks.hasMoreElements()) {      anyRemoved = true;      Task task = (Task) removedTasks.nextElement();      if (getLoggingService().isInfoEnabled()) {        getLoggingService().info("Packer: Got a removed task - " +                                 task.getUID() +                                 " from " + task.getSource());      }      REMOVE_TASKS++;      REMOVE_TONS += task.getPreferredValue(AspectType.QUANTITY);      if (getLoggingService().isInfoEnabled()) {        getLoggingService().info("Packer - number of removed SUPPLY tasks: " +                                 REMOVE_TASKS +                                 ", aggregated quantity from removed SUPPLY tasks: " +                                 REMOVE_TONS + " tons.");      }    }    if (anyRemoved) {      Collection unplannedInternal = getBlackboardService().query(new UnaryPredicate() {        public boolean execute(Object obj) {          if (obj instanceof Task) {            Task task = (Task) obj;            return ((task.getPrepositionalPhrase(GenericPlugin.INTERNAL) != null) &&                task.getPlanElement() == null);          }          return false;        }      }      );      handleUnplanned(unplannedInternal);    }  }