if (block != null) {
if ((block != null) && (! frozen)) {
  private Resource.Block makeAssignment2 (Task task, Resource resource,                                          Resource.Block block,                                          boolean doUpdates, boolean frozen) {    Resource.Block ret = null;    if (block != null) {      ret = new Resource.Block();      ret.preAssignment = block.preAssignment;      ret.postAssignment = block.postAssignment;      if (ret.preAssignment != null) {        ret.preWrapup = ret.preAssignment.getEndTime();        block.preAssignment.setEndTime (block.preWrapup);      }      if (ret.postAssignment != null) {        ret.postSetup = ret.postAssignment.getStartTime();        block.postAssignment.setStartTime (block.postSetup);      }    }    Assignment a = (ignoringTime ?                    new Assignment (task, resource, 0, 0, 0, 0,                                    frozen, timeOps) :                    new Assignment (task, resource, block.setup, block.start,                                    block.end, block.wrapup, frozen, timeOps));    task.setAssignment (a);    resource.addAssignment (a, ! (ignoringTime || multitask || grouped),                            grouped && (block.groupedAssignment == null));    if (doUpdates) {      if (multitask)        resource.addMultitaskContribs (a);      else if (grouped)        resource.addGroupedContrib (a, block.groupedAssignment);      else        resource.addCapacityContribs (task.getCapacityContribs());    }    return ret;  }