if (log.isDebugEnabled()) {
if (log.isInfoEnabled()) {
  private void publishTask(SingleCustomerTask task) {    if (log.isDebugEnabled()) {      log.debug("publishTask: " + this + " entered");    }    long pubTime;    // get at the time    long currentTime = currentTimeMillis();//      if (log.isApplicable(log.VERY_VERBOSE)) {//        log.log(this, log.VERY_VERBOSE, "publishTask:" + this + ": Current Time: " + currentTime);//      }    // Interpret task.getRate as avg number of requests per    // 10000 MSec or sim-cycles.    // Therefore, time between cycles is 10000/rate    // double rate = 10000 / ((task.getRate() == 0) ? .001 : task.getRate());    // Interpret task.getRate as avg number of requests over    // length of the simulation     double rate =        (stopSIMTime - startSIMTime) /        ((task.getRate() == 0) ? .001 : task.getRate());    // But time between events cant be less than 1    if (rate < 1) {      rate = 1;    }//      if (log.isApplicable(log.VERY_VERBOSE)) {//        log.log(this, log.VERY_VERBOSE, "publishTask: " + this + " about to get pubTime");//      }    pubTime = currentTime +      (long)nextNormalSample(rate, (double)task.getDeviation());    // Cannot publish things in the past or now    if (pubTime <= currentTime) {      pubTime = currentTime + 1;    }        pubTime += pubDelay;    if (log.isDebugEnabled()) {      log.debug("publishTask:" + this + ": Rate: " + rate +	      ": pubTime: " + pubTime + " at curr time: " + currentTimeMillis());    }    if (pubTime > stopSIMTime) {      if (log.isDebugEnabled()) {	log.info(		"publishTask: " + this + 		" not publishing task cause pubTime(" + pubTime + 		") > stopSimTime(" + stopSIMTime + ")");      }      return;    }        // Now create the new Task    NewTask nTask = theLDMF.newTask();    // the verb is task.getTaskType()    nTask.setVerb(Verb.getVerb(task.getTaskType()));    // Define the END_TIME Preference.    ScoringFunction scorefcn =      ScoringFunction.createStrictlyBetweenWithBestValues      (new AspectValue(AspectType.START_TIME, pubTime),       new AspectValue(AspectType.END_TIME, task.getDuration() + pubTime),       new AspectValue(AspectType.END_TIME, (task.getDuration() + pubTime)));    nTask.setPreference(theLDMF.newPreference(AspectType.END_TIME, scorefcn));    // Create an annotation.  This is used for identification later.    nTask.setAnnotation(new CustAnnot(getUID().toString()));    // then publishAfter it with Wake Time == pubTime    nTask.setPlan(theLDMF.getRealityPlan());    if (log.isDebugEnabled()) {      log.debug("publishTask: " + this + " about to publishAddAt new task: " + nTask);    }    publishAddAt(nTask, pubTime);  } // end of publishTask