else {
if (!taskAdded) {
  public void addRefillRequisition(Task task) {    PlanElement pe = task.getPlanElement();    if (pe != null) {      AllocationResult ar = pe.getReportedResult();      if (ar == null) {        ar = pe.getEstimatedResult();      }      if (ar != null) {        if (!ar.isPhased()) {          long endTime = getEndTime(task);          addTaskToBucket(endTime, task);        }        else {          int[] ats = ar.getAspectTypes();          int endInd =  csvWriter.getIndexForType(ats, AspectType.END_TIME);          Enumeration phasedResults = ar.getPhasedResults();          while (phasedResults.hasMoreElements()) {            double[] results = (double[]) phasedResults.nextElement();            long phasedEndTime;            phasedEndTime = (long) results[endInd];            addTaskToBucket(phasedEndTime, task);          }        }      }      return;    }    else {      long endTime = getEndTime(task);      addTaskToBucket(endTime, task);    }  }