Program: 161257
Project: 161257
Buggy source:
@Override @Transactional(isolation=Isolation.READ_COMMITTED,propagation=Propagation.REQUIRES_NEW) public void handle(final Origin origin,final Keyword keyword,final Update update,final UpdateContext updateContext){
  updateLockDao.setUpdateLock();
  ipTreeUpdater.updateCurrent();
  final OverrideOptions overrideOptions=OverrideOptions.parse(update,updateContext);
  final RpslObject updatedObject=getUpdatedObject(update,updateContext,keyword);
  final RpslObject originalObject=getOriginalObject(updatedObject,update,updateContext,overrideOptions);
  final Action action=getAction(originalObject,updatedObject,update,updateContext,keyword);
  updateContext.setAction(update,action);
  checkForUnexpectedModification(update);
  PreparedUpdate preparedUpdate=new PreparedUpdate(update,originalObject,updatedObject,action,overrideOptions);
  updateContext.setPreparedUpdate(preparedUpdate);
  if (updateContext.hasErrors(preparedUpdate)) {
    throw new UpdateFailedException();
  }
  if (Action.DELETE.equals(preparedUpdate.getAction()) && !preparedUpdate.hasOriginalObject()) {
    updateContext.addMessage(preparedUpdate,UpdateMessages.objectNotFound(preparedUpdate.getKey()));
    throw new UpdateFailedException();
  }
  final RpslObject objectWithResolvedKeys=autoKeyResolver.resolveAutoKeys(updatedObject,update,updateContext,action);
  preparedUpdate=new PreparedUpdate(update,originalObject,objectWithResolvedKeys,action,overrideOptions);
  loggerContext.logPreparedUpdate(preparedUpdate);
  authenticator.authenticate(origin,preparedUpdate,updateContext);
  final boolean businessRulesOk=updateObjectHandler.validateBusinessRules(preparedUpdate,updateContext);
  final boolean pendingAuthentication=UpdateStatus.PENDING_AUTHENTICATION.equals(updateContext.getStatus(preparedUpdate));
  if (businessRulesOk && pendingAuthentication) {
    pendingUpdateHandler.handle(preparedUpdate,updateContext);
  }
 else   if (updateContext.hasErrors(update)) {
    throw new UpdateFailedException();
  }
 else {
    updateObjectHandler.execute(preparedUpdate,updateContext);
  }
  updateContext.setPreparedUpdate(preparedUpdate);
}

Fixed version (ground truth):
@Override @Transactional(isolation=Isolation.READ_COMMITTED,propagation=Propagation.REQUIRES_NEW) public void handle(final Origin origin,final Keyword keyword,final Update update,final UpdateContext updateContext){
  updateLockDao.setUpdateLock();
  ipTreeUpdater.updateCurrent();
  final OverrideOptions overrideOptions=OverrideOptions.parse(update,updateContext);
  final RpslObject updatedObject=getUpdatedObject(update,updateContext,keyword);
  final RpslObject originalObject=getOriginalObject(updatedObject,update,updateContext,overrideOptions);
  final Action action=getAction(originalObject,updatedObject,update,updateContext,keyword);
  updateContext.setAction(update,action);
  checkForUnexpectedModification(update);
  PreparedUpdate preparedUpdate=new PreparedUpdate(update,originalObject,updatedObject,action,overrideOptions);
  updateContext.setPreparedUpdate(preparedUpdate);
  if (updateContext.hasErrors(preparedUpdate)) {
    throw new UpdateFailedException();
  }
  if (Action.DELETE.equals(preparedUpdate.getAction()) && !preparedUpdate.hasOriginalObject()) {
    updateContext.addMessage(preparedUpdate,UpdateMessages.objectNotFound(preparedUpdate.getKey()));
    throw new UpdateFailedException();
  }
  final RpslObject objectWithResolvedKeys=autoKeyResolver.resolveAutoKeys(updatedObject,update,updateContext,action);
  preparedUpdate=new PreparedUpdate(update,originalObject,objectWithResolvedKeys,action,overrideOptions);
  loggerContext.logPreparedUpdate(preparedUpdate);
  authenticator.authenticate(origin,preparedUpdate,updateContext);
  final boolean businessRulesOk=updateObjectHandler.validateBusinessRules(preparedUpdate,updateContext);
  final boolean pendingAuthentication=UpdateStatus.PENDING_AUTHENTICATION.equals(updateContext.getStatus(preparedUpdate));
  if (pendingAuthentication) {
    if (businessRulesOk) {
      pendingUpdateHandler.handle(preparedUpdate,updateContext);
    }
 else {
      updateContext.status(preparedUpdate,UpdateStatus.FAILED);
    }
  }
  if (updateContext.hasErrors(update)) {
    throw new UpdateFailedException();
  }
 else {
    updateObjectHandler.execute(preparedUpdate,updateContext);
  }
  updateContext.setPreparedUpdate(preparedUpdate);
}