Program: 105788
Project: 105788
Buggy source:
@Override public void advanceStart(String vmUuid,Map<VirtualMachineProfile.Param,Object> params,DeploymentPlan planToDeploy,DeploymentPlanner planner) throws InsufficientCapacityException, ConcurrentOperationException, ResourceUnavailableException {
  AsyncJobExecutionContext jobContext=AsyncJobExecutionContext.getCurrentExecutionContext();
  if (!VmJobEnabled.value() || jobContext.isJobDispatchedBy(VmWorkConstants.VM_WORK_JOB_DISPATCHER)) {
    VmWorkJobVO placeHolder=null;
    if (VmJobEnabled.value()) {
      VirtualMachine vm=_vmDao.findByUuid(vmUuid);
      placeHolder=createPlaceHolderWork(vm.getId());
    }
    try {
      orchestrateStart(vmUuid,params,planToDeploy,planner);
    }
  finally {
      if (VmJobEnabled.value())       _workJobDao.expunge(placeHolder.getId());
    }
  }
 else {
    Outcome<VirtualMachine> outcome=startVmThroughJobQueue(vmUuid,params,planToDeploy,planner);
    try {
      VirtualMachine vm=outcome.get();
    }
 catch (    InterruptedException e) {
      throw new RuntimeException("String_Node_Str",e);
    }
catch (    java.util.concurrent.ExecutionException e) {
      throw new RuntimeException("String_Node_Str",e);
    }
    Object jobResult=_jobMgr.unmarshallResultObject(outcome.getJob());
    if (jobResult != null) {
      if (jobResult instanceof ConcurrentOperationException)       throw (ConcurrentOperationException)jobResult;
 else       if (jobResult instanceof ResourceUnavailableException)       throw (ResourceUnavailableException)jobResult;
 else       if (jobResult instanceof InsufficientCapacityException)       throw (InsufficientCapacityException)jobResult;
 else       if (jobResult instanceof RuntimeException)       throw (RuntimeException)jobResult;
 else       if (jobResult instanceof Throwable)       throw new RuntimeException("String_Node_Str",(Throwable)jobResult);
    }
  }
}

Fixed version (ground truth):
@Override public void advanceStart(String vmUuid,Map<VirtualMachineProfile.Param,Object> params,DeploymentPlan planToDeploy,DeploymentPlanner planner) throws InsufficientCapacityException, ConcurrentOperationException, ResourceUnavailableException {
  AsyncJobExecutionContext jobContext=AsyncJobExecutionContext.getCurrentExecutionContext();
  if (!VmJobEnabled.value() || jobContext.isJobDispatchedBy(VmWorkConstants.VM_WORK_JOB_DISPATCHER)) {
    VmWorkJobVO placeHolder=null;
    if (VmJobEnabled.value()) {
      VirtualMachine vm=_vmDao.findByUuid(vmUuid);
      placeHolder=createPlaceHolderWork(vm.getId());
    }
    try {
      orchestrateStart(vmUuid,params,planToDeploy,planner);
    }
  finally {
      if (placeHolder != null) {
        _workJobDao.expunge(placeHolder.getId());
      }
    }
  }
 else {
    Outcome<VirtualMachine> outcome=startVmThroughJobQueue(vmUuid,params,planToDeploy,planner);
    try {
      VirtualMachine vm=outcome.get();
    }
 catch (    InterruptedException e) {
      throw new RuntimeException("String_Node_Str",e);
    }
catch (    java.util.concurrent.ExecutionException e) {
      throw new RuntimeException("String_Node_Str",e);
    }
    Object jobResult=_jobMgr.unmarshallResultObject(outcome.getJob());
    if (jobResult != null) {
      if (jobResult instanceof ConcurrentOperationException)       throw (ConcurrentOperationException)jobResult;
 else       if (jobResult instanceof ResourceUnavailableException)       throw (ResourceUnavailableException)jobResult;
 else       if (jobResult instanceof InsufficientCapacityException)       throw (InsufficientCapacityException)jobResult;
 else       if (jobResult instanceof RuntimeException)       throw (RuntimeException)jobResult;
 else       if (jobResult instanceof Throwable)       throw new RuntimeException("String_Node_Str",(Throwable)jobResult);
    }
  }
}