Program: 160984
Project: 160984
Buggy source:
/** 
 * Update one or more objects together (in the same transaction). If any update fails, then all changes are cancelled (rolled back). If any update fails, the response will contain all (attempted) changes up to, and including, that update. Any error message will refer to the last attempted update.
 */
@PUT @Consumes({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON}) @Produces({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON}) @Path("String_Node_Str") public Response update(final WhoisResources resource,@PathParam("String_Node_Str") final String sourceParam,@Context final HttpServletRequest request,@QueryParam("String_Node_Str") final List<String> passwords,@CookieParam("String_Node_Str") final String crowdTokenKey,@QueryParam("String_Node_Str") final String override){
  if (resource == null) {
    return badRequest("String_Node_Str");
  }
  if (Strings.isNullOrEmpty(override)) {
    return badRequest("String_Node_Str");
  }
  checkForMainSource(request,sourceParam);
  try {
    final WhoisResources updatedResources=performUpdates(request,convertToActionRequests(resource),passwords,crowdTokenKey,override);
    return createResponse(request,updatedResources,Response.Status.OK);
  }
 catch (  WebApplicationException e) {
    final Response response=e.getResponse();
switch (response.getStatus()) {
case HttpStatus.UNAUTHORIZED_401:
      throw new NotAuthorizedException(createResponse(request,resource,Response.Status.UNAUTHORIZED));
case HttpStatus.INTERNAL_SERVER_ERROR_500:
    throw new InternalServerErrorException(createResponse(request,resource,Response.Status.INTERNAL_SERVER_ERROR));
default :
  throw new BadRequestException(createResponse(request,resource,Response.Status.BAD_REQUEST));
}
}
catch (ReferenceUpdateFailedException e) {
return createResponse(request,e.whoisResources,e.status);
}
catch (Exception e) {
LOGGER.error("String_Node_Str",e);
return createResponse(request,resource,Response.Status.INTERNAL_SERVER_ERROR);
}
}

Fixed version (ground truth):
@PUT @Consumes({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON}) @Produces({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON}) @Path("String_Node_Str") public Response update(final WhoisResources resource,@PathParam("String_Node_Str") final String sourceParam,@Context final HttpServletRequest request,@QueryParam("String_Node_Str") final String override){
  if (resource == null) {
    return badRequest("String_Node_Str");
  }
  if (Strings.isNullOrEmpty(override)) {
    return badRequest("String_Node_Str");
  }
  checkForMainSource(request,sourceParam);
  try {
    final WhoisResources updatedResources=performUpdates(request,convertToActionRequests(resource),Collections.<String>emptyList(),"String_Node_Str",override,SsoAuthForm.ACCOUNT);
    return createResponse(request,updatedResources,Response.Status.OK);
  }
 catch (  WebApplicationException e) {
    final Response response=e.getResponse();
switch (response.getStatus()) {
case HttpStatus.UNAUTHORIZED_401:
      throw new NotAuthorizedException(createResponse(request,resource,Response.Status.UNAUTHORIZED));
case HttpStatus.INTERNAL_SERVER_ERROR_500:
    throw new InternalServerErrorException(createResponse(request,resource,Response.Status.INTERNAL_SERVER_ERROR));
default :
  throw new BadRequestException(createResponse(request,resource,Response.Status.BAD_REQUEST));
}
}
catch (ReferenceUpdateFailedException e) {
return createResponse(request,e.whoisResources,e.status);
}
catch (Exception e) {
LOGGER.error("String_Node_Str",e);
return createResponse(request,resource,Response.Status.INTERNAL_SERVER_ERROR);
}
}