logger.info("requested " + size + " != quantity pref " + provided);
if (logger.isInfoEnabled()) { logger.info("requested " + size + " != quantity pref " + provided); }
  private Task sizedTask(Task t, double size) {    PlanningFactory factory = _gp.getGPFactory();    NewTask nt = factory.newTask();    sizedMade++;    nt.setVerb(t.getVerb());    nt.setParentTask(t);    nt.setDirectObject(factory.createInstance(t.getDirectObject()));    // copy the PPs    ArrayList preps = new ArrayList();    Enumeration e = t.getPrepositionalPhrases();    NewPrepositionalPhrase npp;    while (e.hasMoreElements()) {      npp = factory.newPrepositionalPhrase();      PrepositionalPhrase pp = (PrepositionalPhrase) e.nextElement();      npp.setPreposition(pp.getPreposition());      npp.setIndirectObject(pp.getIndirectObject());      preps.add(npp);    }    npp = factory.newPrepositionalPhrase();    // Mark as INTERNAL so we recognize it as an expansion task.    npp.setPreposition(GenericPlugin.INTERNAL);    npp.setIndirectObject(TRUE);    preps.add(npp);    //BOZO    nt.setPrepositionalPhrases(new Vector(preps).elements());    // now copy the preferences, with the exception of quantity...    ArrayList prefs = new ArrayList();    e = t.getPreferences();    while (e.hasMoreElements()) {      Preference p = (Preference) e.nextElement();      if (p.getAspectType() != AspectType.QUANTITY) {        Preference np =            factory.newPreference(p.getAspectType(),                                  p.getScoringFunction(),                                  p.getWeight());        prefs.add(np);      }    }    AspectValue av = AspectValue.newAspectValue(AspectType.QUANTITY, size);    ScoringFunction sf = ScoringFunction.createNearOrBelow(av, 0.1);    Preference pref = factory.newPreference(AspectType.QUANTITY, sf);    prefs.add(0, pref);    //BOZO    nt.setPreferences(new Vector(prefs).elements());    // TODO delme    double provided = nt.getPreferredValue(AspectType.QUANTITY);    if (provided != size)      logger.info("requested " + size + " != quantity pref " + provided);    return nt;  }