Program: 160985
Project: 160985
Buggy source:
/** 
 * Update multiple objects in the database. Rollback if any update fails.
 */
private WhoisResources performUpdates(final HttpServletRequest request,final List<ActionRequest> actionRequests,final List<String> passwords,final String crowdTokenKey,final String override){
  try {
    final Origin origin=updatePerformer.createOrigin(request);
    final UpdateContext updateContext=updatePerformer.initContext(origin,crowdTokenKey);
    updateContext.batchUpdate();
    auditlogRequest(request);
    final List<Update> updates=Lists.newArrayList();
    for (    ActionRequest actionRequest : actionRequests) {
      final String deleteReason=Action.DELETE.equals(actionRequest.getAction()) ? "String_Node_Str" : null;
      updates.add(updatePerformer.createUpdate(updateContext,actionRequest.getRpslObject(),passwords,deleteReason,override));
    }
    final WhoisResources whoisResources=updatePerformer.performUpdates(updateContext,origin,updates,Keyword.NONE,request);
    for (    Update update : updates) {
      final UpdateStatus status=updateContext.getStatus(update);
      if (status == UpdateStatus.SUCCESS) {
      }
 else       if (status == UpdateStatus.FAILED_AUTHENTICATION) {
        throw new ReferenceUpdateFailedException(Response.Status.UNAUTHORIZED,whoisResources);
      }
 else       if (status == UpdateStatus.EXCEPTION) {
        throw new ReferenceUpdateFailedException(Response.Status.INTERNAL_SERVER_ERROR,whoisResources);
      }
 else       if (updateContext.getMessages(update).contains(UpdateMessages.newKeywordAndObjectExists())) {
        throw new ReferenceUpdateFailedException(Response.Status.CONFLICT,whoisResources);
      }
 else {
        throw new ReferenceUpdateFailedException(Response.Status.BAD_REQUEST,whoisResources);
      }
    }
    return whoisResources;
  }
 catch (  ReferenceUpdateFailedException e) {
    throw e;
  }
catch (  Exception e) {
    updatePerformer.logError(e);
    throw e;
  }
 finally {
    updatePerformer.closeContext();
  }
}

Fixed version (ground truth):
/** 
 * Update multiple objects in the database. Rollback if any update fails.
 */
private WhoisResources performUpdates(final HttpServletRequest request,final List<ActionRequest> actionRequests,final List<String> passwords,final String crowdTokenKey,final String override,final SsoAuthForm ssoAuthForm){
  try {
    final Origin origin=updatePerformer.createOrigin(request);
    final UpdateContext updateContext=updatePerformer.initContext(origin,crowdTokenKey);
    updateContext.batchUpdate();
    auditlogRequest(request);
    final List<Update> updates=Lists.newArrayList();
    for (    ActionRequest actionRequest : actionRequests) {
      final String deleteReason=Action.DELETE.equals(actionRequest.getAction()) ? "String_Node_Str" : null;
      final RpslObject originalObject;
      if (ssoAuthForm == SsoAuthForm.UUID) {
        ssoTranslator.populateCacheAuthToUsername(updateContext,actionRequest.getRpslObject());
        originalObject=ssoTranslator.translateFromCacheAuthToUsername(updateContext,actionRequest.getRpslObject());
      }
 else {
        originalObject=actionRequest.getRpslObject();
      }
      updates.add(updatePerformer.createUpdate(updateContext,originalObject,passwords,deleteReason,override));
    }
    final WhoisResources whoisResources=updatePerformer.performUpdates(updateContext,origin,updates,Keyword.NONE,request);
    for (    Update update : updates) {
      final UpdateStatus status=updateContext.getStatus(update);
      if (status == UpdateStatus.SUCCESS) {
      }
 else       if (status == UpdateStatus.FAILED_AUTHENTICATION) {
        throw new ReferenceUpdateFailedException(Response.Status.UNAUTHORIZED,whoisResources);
      }
 else       if (status == UpdateStatus.EXCEPTION) {
        throw new ReferenceUpdateFailedException(Response.Status.INTERNAL_SERVER_ERROR,whoisResources);
      }
 else       if (updateContext.getMessages(update).contains(UpdateMessages.newKeywordAndObjectExists())) {
        throw new ReferenceUpdateFailedException(Response.Status.CONFLICT,whoisResources);
      }
 else {
        throw new ReferenceUpdateFailedException(Response.Status.BAD_REQUEST,whoisResources);
      }
    }
    return whoisResources;
  }
 catch (  ReferenceUpdateFailedException e) {
    throw e;
  }
catch (  Exception e) {
    updatePerformer.logError(e);
    throw e;
  }
 finally {
    updatePerformer.closeContext();
  }
}