if(log.isDebugEnabled()) {
if(log.isInfoEnabled()) {
  public void execute() {    // Publish Tasks as read in at prescribed intervals    // If one of my Tasks is changed, look at the AllocationResult    // Based on it being Success or Failure, publish a HappinessChangedEvent//      if (log.isApplicable(log.VERY_VERBOSE)) {//        log.log(this, log.VERY_VERBOSE, "execute:" + this);//      }    Enumeration changedPEs = peSub.getChangedList();    while(changedPEs.hasMoreElements()) {      if(log.isDebugEnabled()) {	log.debug("execute:" + this +		": got changed PlanElement from Subscription");      }      PlanElement pe = (PlanElement) changedPEs.nextElement();      AllocationResult estR = pe.getEstimatedResult();      if(estR != null && estR.getConfidenceRating() > 0.9) {//       if (PlugInHelper.checkChangeReports(peSub.getChangeReports(pe), // 		             PlanElement.EstimatedResultChangeReport.class)) {	// Make sure that this is the 	// Estimated Result changed.  Update Customer Happiness.	if(log.isDebugEnabled()) {	  log.debug("execute:" + this +		  ": got changed, high-conf EstimatedResult from PlanElement");	}		double currHappy = -1.0;	float changeval = 0.0F;	if (estR.isSuccess()) {	  changeval = 1.0F;	} else {	  String reason = estR.auxiliaryQuery(AuxiliaryQueryType.FAILURE_REASON);	  if (reason == null) 	    reason = "(no reason given)";	  if (log.isDebugEnabled()) {	    log.debug("execute: " + this + " got failed task for reason: " + reason);	  }	}	// Flag this as having been handled such that we dont	// end up	// a) process the EstR cause someone did publishChange(set the Reported)	// b) wake up immediately due to publishedChange(EstR is set)	CustAnnot annot = (CustAnnot)pe.getTask().getAnnotation();	if (! annot.getHandled()) {	  annot.setHandled();	  currHappy = updateHappiness(changeval, pe, currHappy);	}      } else {	if(log.isDebugEnabled()) {	  log.debug("execute:" + this + ": EstimatedResult not high-conf on PlanElement");	}      }    } // end of changedPEs while loop//      if (log.isApplicable(log.VERY_VERBOSE)) {//        log.log(this, log.VERY_VERBOSE, "execute: " + this + " done changedPEs while loop");//      }    // Must also look at new PlanElements - to handle Dispositions    Enumeration newPEs = peSub.getAddedList();    while(newPEs.hasMoreElements()) {      PlanElement pe = (PlanElement)newPEs.nextElement();      if (pe instanceof Disposition) {	if (log.isDebugEnabled()) {	  log.debug("execute: " + this + " got new Disposition");	}	// This is worth handling	AllocationResult estR = pe.getEstimatedResult();	if (estR != null && estR.getConfidenceRating() > 0.9) {	  //       if (PlugInHelper.checkChangeReports(peSub.getChangeReports(pe), 	  // 		             PlanElement.EstimatedResultChangeReport.class)) {	  	  // Estimated Result changed.  Update Customer Happiness.//   	  if(log.isApplicable(log.VERY_VERBOSE)) {//  	    log.log(this, log.VERY_VERBOSE, "execute:" + this +//  		    ": got set EstimatedResult from Disposition");//  	  }	  	  double currHappy = -1.0;	  float changeval = 0.0F;	  if (estR.isSuccess()) {	    changeval = 1.0F;	  } else {	    String reason = estR.auxiliaryQuery(AuxiliaryQueryType.FAILURE_REASON);	    if (reason == null) 	      reason = "(no reason given)";	    if (log.isDebugEnabled()) {	      log.debug("execute: " + this + " got failed task for reason: " + reason);	    }	  }	  CustAnnot annot = (CustAnnot)pe.getTask().getAnnotation();	  if (! annot.getHandled()) {	    annot.setHandled();	    currHappy = updateHappiness(changeval, pe, currHappy);	  }	} else {	  // estR didn't change	  if(log.isDebugEnabled()) {	    log.debug("execute:" + this + ": EstimatedResult not set on Disposition");	  }	}      } else {	// don't bother -- not a Disposition	continue;      }    } // end of newPEs while loop     // Also, publish the next task, once a previous one is added to my list of incoming tasks    Enumeration addedTasks = taskSub.getAddedList();    while(addedTasks.hasMoreElements()) {//        if(log.isApplicable(log.VERY_VERBOSE)) {//  	log.log(this, log.VERY_VERBOSE, "execute:" + this +//  		": got added Task from Subscription");//        }      Task t = (Task)addedTasks.nextElement();      if (log.isDebugEnabled()) {	log.debug("execute: " + this + " got added Task " + t.getUID() + " of Verb " + t.getVerb());      }      double now = (double)currentTimeMillis();      if(now < stopSIMTime) {//  	if(log.isApplicable(log.VERY_VERBOSE)) {//  	  log.log(this, log.VERY_VERBOSE, "execute:" + this + ":\n" +//  		  "[" + (long)now + " < " + (long)stopSIMTime + "]");//  	}	publishTask((SingleCustomerTask)tasks.get(t.getVerb().toString()));      } else {	if(log.isDebugEnabled()) {	  log.info("execute: " + this + " not pubbing new Task cause " +		  "[" + (long)now + " >= " + (long)stopSIMTime + "]");	}      }    } // end of while loop over added Tasks  } // end of execute()