if (task.getPlanElement() == null) {
if (getTaskPlanElement(task, allocationsSub[subNum]) == null) {
  protected void allocate(AllocateCommandInfo commandInfo, Collection tasks) {    Organization capableOrg = null;    for (Iterator iterator = tasks.iterator();	 iterator.hasNext();) {      Task task = (Task) iterator.next();      if (task.getPlanElement() == null) {	if (capableOrg == null) {	  capableOrg = 	    findCapableOrganization(commandInfo);	  if (capableOrg == null) {	    // no capable org found!	    if (logger.isDebugEnabled()) {	      logger.debug("allocate: Unable to find provider for " + 			   commandInfo.allocateRoles);	    }	    break;	  }	}	doAllocation(capableOrg, task);      }		    }  }