ArrayList demand = new ArrayList(); if (bucket >= dueOutList.size()) { return demand;
ArrayList demand = new ArrayList(); if (bucket >= dueOutList.size()) { return demand; } Iterator dueOutIter = ((ArrayList) dueOutList.get(bucket)).iterator(); while (dueOutIter.hasNext()) { Task task = (Task) dueOutIter.next(); if (task.getVerb().equals(Constants.Verb.PROJECTWITHDRAW)) { long start = (long) PluginHelper.getPreferenceBestValue(task, AspectType.START_TIME); long end = (long) PluginHelper.getPreferenceBestValue(task, AspectType.END_TIME); start = getEffectiveProjectionStart(task, start); if (isValidProjectionTaskInBucket(start, end, bucket)) { demand.add(task); } } else { demand.add(task); } } return demand;
  public Collection getActualDemandTasks(int bucket) {    ArrayList demand = new ArrayList();    if (bucket >= dueOutList.size()) {      return demand;    }    Iterator dueOutIter = ((ArrayList)dueOutList.get(bucket)).iterator();    while (dueOutIter.hasNext()) {      Task task = (Task)dueOutIter.next();      if (task.getVerb().equals(Constants.Verb.PROJECTWITHDRAW)) {	long start = (long)PluginHelper.getPreferenceBestValue(task, AspectType.START_TIME);	long end = (long)PluginHelper.getPreferenceBestValue(task, AspectType.END_TIME);	start = getEffectiveProjectionStart(task, start);	if (isValidProjectionTaskInBucket(start, end, bucket)) {          demand.add(task);        }      } else {        demand.add(task);      }    }    return demand;  }