if(logger.isDebugEnabled() && projWdraw.getVerb().equals(Constants.Verb.WITHDRAW)) {
if(logger.isWarnEnabled() && projWdraw.getVerb().equals(Constants.Verb.WITHDRAW)) {
  private void determineProjectionAllocations(int startBucket, int endBucket, 					      Inventory inv, 					      LogisticsInventoryPG thePG) {    //calculate levels by adding in all refill projection results    // go through each projectwithdraw - allocate to the inventory    int currentBucket = startBucket;    double qty = 0;    double runningQty = 0;    double todayLevel, yesterdayLevel, todayRefill, testLevel, testQty;    long start, end;    // loop through the bucket in the inventory    while (currentBucket <= endBucket) {      yesterdayLevel = thePG.getLevel(currentBucket - 1);      Task refill = thePG.getRefillProjection(currentBucket);      //!!!NOTE getRefillProjection can return a null for a bucket check to make sure      // you have a real task and not a null.      if (refill != null) {	start = (long)PluginHelper.getPreferenceBestValue(refill, AspectType.START_TIME);	end = (long)PluginHelper.getPreferenceBestValue(refill, AspectType.END_TIME);	todayRefill = thePG.getProjectionTaskDemand(refill, currentBucket, start, end);      } else {	todayRefill = 0;      }      runningQty = 0;      if (! trailingPointersHash.isEmpty()) {  	runningQty = processLateWithdraws(currentBucket, yesterdayLevel+todayRefill, 					  inv, thePG);      }      Collection wdTasks = thePG.getActualDemandTasks(currentBucket);      Iterator wdIter = wdTasks.iterator();      while (wdIter.hasNext()) {	Task projWdraw = (Task)wdIter.next();	start = (long)PluginHelper.getPreferenceBestValue(projWdraw, AspectType.START_TIME);	end = (long)PluginHelper.getPreferenceBestValue(projWdraw, AspectType.END_TIME);	if(logger.isDebugEnabled() && projWdraw.getVerb().equals(Constants.Verb.WITHDRAW)) {	  logger.debug("\n AA.determineProjectionAllocations got a WITHDRAW task... start is: " +		       start + " end is: " + end + "current bucket time is: " +		       thePG.convertBucketToTime(currentBucket));	}	qty = thePG.getProjectionTaskDemand(projWdraw, currentBucket, start, end);	testQty = runningQty + qty;	testLevel = yesterdayLevel - testQty + todayRefill;	if (testLevel >= 0.0) {	  // if its ok give it a pe and update the quantity  	  runningQty = runningQty + qty;	  if (projWdraw.getPlanElement() == null) {	    TaskDeficit taskdeficit = (TaskDeficit)trailingPointersHash.get(projWdraw);	    if (taskdeficit == null) {	      allocatedProjections.add(projWdraw);	    } else {	      taskdeficit.addBucket(qty, 0);	    }	  }	} else {	  allocatedProjections.remove(projWdraw);	  TaskDeficit taskdeficit = (TaskDeficit)trailingPointersHash.get(projWdraw);	  if (taskdeficit == null) {	    trailingPointersHash.put(projWdraw, new TaskDeficit(currentBucket, 0, qty));	  } else {	    taskdeficit.addBucket(0, qty);	  }	}      }      todayLevel = yesterdayLevel - runningQty + todayRefill;      thePG.setLevel(currentBucket, todayLevel);      currentBucket = currentBucket + 1;    }  }