private void allocateEarlyProjections(int countedBucket, Inventory inventory, LogisticsInventoryPG thePG) {
private void allocateEarlyProjections(Inventory inventory, LogisticsInventoryPG thePG) {
  private void allocateEarlyProjections(int countedBucket, Inventory inventory,                                         LogisticsInventoryPG thePG) {//      String myOrgName = inventoryPlugin.getMyOrganization().getItemIdentificationPG().getItemIdentification();//      String myItemId = thePG.getResource().getTypeIdentificationPG().getTypeIdentification();    int currentBucket = 0;    // loop through the buckets in the inventory    while (currentBucket < countedBucket) {      Collection wdprojs = thePG.getProjectedDemandTasks(currentBucket);      Iterator wdpIter = wdprojs.iterator();      while(wdpIter.hasNext()) {        Task withdrawProj = (Task)wdpIter.next();        double endTimePref = getTaskUtils().getPreference(withdrawProj, AspectType.END_TIME);        //make sure there is an end time pref AND that the        //bucket of the end time pref is not equal to or past the countedBucket	//Since endTime is not inclusive of the bucket it falls in decrement by 1        // countedBucket is the firstCountedProjection - if the projection spans both        //the uncounted and counted windows - dont blindly allocate it here ... it should        // be picked up by the counted projections allocation method.        if ((endTimePref != Double.NaN) &&	    ((thePG.convertTimeToBucket((long)endTimePref, true) -1) < countedBucket)) {            if (withdrawProj.getPlanElement() == null) {              createBestAllocation(withdrawProj, inventory, thePG);            }            // if it already has a pe we could check it - but for now we won't	}      }      //bump the bucket      currentBucket = currentBucket + 1;    }  }