Program: 105787
Project: 105787
Buggy source:
@Override public NicProfile addVmToNetwork(VirtualMachine vm,Network network,NicProfile requested) throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException {
  AsyncJobExecutionContext jobContext=AsyncJobExecutionContext.getCurrentExecutionContext();
  if (!VmJobEnabled.value() || jobContext.isJobDispatchedBy(VmWorkConstants.VM_WORK_JOB_DISPATCHER)) {
    VmWorkJobVO placeHolder=null;
    if (VmJobEnabled.value()) {
      placeHolder=createPlaceHolderWork(vm.getId());
    }
    try {
      return orchestrateAddVmToNetwork(vm,network,requested);
    }
  finally {
      if (VmJobEnabled.value())       _workJobDao.expunge(placeHolder.getId());
    }
  }
 else {
    Outcome<VirtualMachine> outcome=addVmToNetworkThroughJobQueue(vm,network,requested);
    try {
      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 jobException=_jobMgr.unmarshallResultObject(outcome.getJob());
    if (jobException != null) {
      if (jobException instanceof ResourceUnavailableException)       throw (ResourceUnavailableException)jobException;
 else       if (jobException instanceof ConcurrentOperationException)       throw (ConcurrentOperationException)jobException;
 else       if (jobException instanceof InsufficientCapacityException)       throw (InsufficientCapacityException)jobException;
 else       if (jobException instanceof RuntimeException)       throw (RuntimeException)jobException;
 else       if (jobException instanceof Throwable)       throw new RuntimeException("String_Node_Str",(Throwable)jobException);
 else       if (jobException instanceof NicProfile)       return (NicProfile)jobException;
    }
    throw new RuntimeException("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public NicProfile addVmToNetwork(VirtualMachine vm,Network network,NicProfile requested) throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException {
  AsyncJobExecutionContext jobContext=AsyncJobExecutionContext.getCurrentExecutionContext();
  if (!VmJobEnabled.value() || jobContext.isJobDispatchedBy(VmWorkConstants.VM_WORK_JOB_DISPATCHER)) {
    VmWorkJobVO placeHolder=null;
    if (VmJobEnabled.value()) {
      placeHolder=createPlaceHolderWork(vm.getId());
    }
    try {
      return orchestrateAddVmToNetwork(vm,network,requested);
    }
  finally {
      if (placeHolder != null) {
        _workJobDao.expunge(placeHolder.getId());
      }
    }
  }
 else {
    Outcome<VirtualMachine> outcome=addVmToNetworkThroughJobQueue(vm,network,requested);
    try {
      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 jobException=_jobMgr.unmarshallResultObject(outcome.getJob());
    if (jobException != null) {
      if (jobException instanceof ResourceUnavailableException)       throw (ResourceUnavailableException)jobException;
 else       if (jobException instanceof ConcurrentOperationException)       throw (ConcurrentOperationException)jobException;
 else       if (jobException instanceof InsufficientCapacityException)       throw (InsufficientCapacityException)jobException;
 else       if (jobException instanceof RuntimeException)       throw (RuntimeException)jobException;
 else       if (jobException instanceof Throwable)       throw new RuntimeException("String_Node_Str",(Throwable)jobException);
 else       if (jobException instanceof NicProfile)       return (NicProfile)jobException;
    }
    throw new RuntimeException("String_Node_Str");
  }
}