long endTime = TaskUtils.getEndTime(task); long startTime = getStartTime(task, endTime, false); double quantity = TaskUtils.getDailyQuantity(task);
if (!ar.isPhased()) { long endTime = (long) TaskUtils.getEndTime(ar);   long startTime = endTime -1; double quantity = TaskUtils.getQuantity(ar);
  private Schedule getSuccessfulElements(Collection list) {    if (list == null)      return null;    ScheduleImpl schedule = new ScheduleImpl();    schedule.setScheduleElementType(QuantityScheduleElementImpl.class);    Iterator i = list.iterator();    while (i.hasNext()) {      Task task = (Task) i.next();      if (task == null)        continue;      PlanElement pe = task.getPlanElement();      if (pe == null)        continue;      AllocationResult ar = pe.getReportedResult();      if (ar != null && ar.isSuccess()) {        long endTime = TaskUtils.getEndTime(task);         long startTime = getStartTime(task, endTime, false);        double quantity = TaskUtils.getDailyQuantity(task);                NewQuantityScheduleElement qse = new QuantityScheduleElementImpl(startTime,                                                                         endTime,                                                                         quantity);        schedule.addScheduleElement(qse);      }    }    return schedule;  }