if (!stres.getAllocationResult().isSuccess ())
AllocationResult allocResult = stres.getAllocationResult(); if (allocResult != null && !allocResult.isSuccess ())
  protected int getNumFailedSubTasks (List subtaskResults) {    int n = 0;    for (Iterator iter = subtaskResults.iterator();	 iter.hasNext (); ) {      SubTaskResult stres = (SubTaskResult) iter.next ();      if (!stres.getAllocationResult().isSuccess ())	n++;    }    return n;  }