Program: 160987
Project: 160987
Buggy source:
@POST @Consumes({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON}) @Produces({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON}) @Path("String_Node_Str") public Response create(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){
  if (resource == null) {
    return badRequest("String_Node_Str");
  }
  checkForMainSource(request,sourceParam);
  try {
    final List<ActionRequest> actionRequests=Lists.newArrayList();
    final RpslObject mntner=createMntnerWithDummyAdminC(resource);
    actionRequests.add(new ActionRequest(mntner,Action.CREATE));
    final RpslObject person=createPerson(resource);
    actionRequests.add(new ActionRequest(person,Action.CREATE));
    final RpslObject updatedMntner=replaceAdminC(mntner,"String_Node_Str");
    actionRequests.add(new ActionRequest(updatedMntner,Action.MODIFY));
    final WhoisResources whoisResources=performUpdates(request,actionRequests,passwords,crowdTokenKey,null);
    return createResponse(request,filterWhoisObjects(whoisResources),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):
@POST @Consumes({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON}) @Produces({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON}) @Path("String_Node_Str") public Response create(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){
  if (resource == null) {
    return badRequest("String_Node_Str");
  }
  checkForMainSource(request,sourceParam);
  try {
    final List<ActionRequest> actionRequests=Lists.newArrayList();
    final RpslObject mntner=createMntnerWithDummyAdminC(resource);
    actionRequests.add(new ActionRequest(mntner,Action.CREATE));
    final RpslObject person=createPerson(resource);
    actionRequests.add(new ActionRequest(person,Action.CREATE));
    final RpslObject updatedMntner=replaceAdminC(mntner,"String_Node_Str");
    actionRequests.add(new ActionRequest(updatedMntner,Action.MODIFY));
    final WhoisResources whoisResources=performUpdates(request,actionRequests,passwords,crowdTokenKey,null,SsoAuthForm.ACCOUNT);
    return createResponse(request,filterWhoisObjects(whoisResources),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);
}
}