Program: 5129
Project: 5129
Buggy source:
@Beta @POST @Path("String_Node_Str" + "String_Node_Str") @AuditPolicy({AuditDetail.REQUEST_BODY,AuditDetail.RESPONSE_BODY}) public void callArtifactPluginMethod(HttpRequest request,HttpResponder responder,@PathParam("String_Node_Str") String namespaceId,@PathParam("String_Node_Str") String artifactName,@PathParam("String_Node_Str") String artifactVersion,@PathParam("String_Node_Str") String pluginName,@PathParam("String_Node_Str") String pluginType,@PathParam("String_Node_Str") String methodName,@QueryParam("String_Node_Str") @DefaultValue("String_Node_Str") String scope) throws Exception {
  String requestBody=request.getContent().toString(Charsets.UTF_8);
  NamespaceId namespace=Ids.namespace(namespaceId);
  NamespaceId artifactNamespace=validateAndGetScopedNamespace(namespace,scope);
  Id.Artifact artifactId=validateAndGetArtifactId(artifactNamespace,artifactName,artifactVersion);
  if (requestBody.isEmpty()) {
    throw new BadRequestException("String_Node_Str" + "String_Node_Str");
  }
  try {
    PluginEndpoint pluginEndpoint=pluginService.getPluginEndpoint(namespace,artifactId,pluginType,pluginName,methodName);
    Object response=pluginEndpoint.invoke(GSON.fromJson(requestBody,pluginEndpoint.getMethodParameterType()));
    responder.sendString(HttpResponseStatus.OK,GSON.toJson(response));
  }
 catch (  JsonSyntaxException e) {
    responder.sendString(HttpResponseStatus.BAD_REQUEST,"String_Node_Str");
  }
catch (  InvocationTargetException e) {
    if (e.getCause() instanceof javax.ws.rs.NotFoundException) {
      throw new NotFoundException(e.getCause());
    }
 else     if (e.getCause() instanceof javax.ws.rs.BadRequestException) {
      throw new BadRequestException(e.getCause());
    }
 else     if (e.getCause() instanceof IllegalArgumentException && e.getCause() != null) {
      responder.sendString(HttpResponseStatus.BAD_REQUEST,e.getCause().getMessage());
    }
 else {
      Throwable rootCause=Throwables.getRootCause(e);
      String message="String_Node_Str";
      if (rootCause != null && rootCause.getMessage() != null) {
        message=String.format("String_Node_Str",message,rootCause.getMessage());
      }
      responder.sendString(HttpResponseStatus.INTERNAL_SERVER_ERROR,message);
    }
  }
}

Fixed version (ground truth):
@Beta @POST @Path("String_Node_Str" + "String_Node_Str") @AuditPolicy({AuditDetail.REQUEST_BODY,AuditDetail.RESPONSE_BODY}) public void callArtifactPluginMethod(HttpRequest request,HttpResponder responder,@PathParam("String_Node_Str") String namespaceId,@PathParam("String_Node_Str") String artifactName,@PathParam("String_Node_Str") String artifactVersion,@PathParam("String_Node_Str") String pluginName,@PathParam("String_Node_Str") String pluginType,@PathParam("String_Node_Str") String methodName,@QueryParam("String_Node_Str") @DefaultValue("String_Node_Str") String scope) throws Exception {
  String requestBody=request.getContent().toString(Charsets.UTF_8);
  NamespaceId namespace=Ids.namespace(namespaceId);
  NamespaceId artifactNamespace=validateAndGetScopedNamespace(namespace,scope);
  Id.Artifact artifactId=validateAndGetArtifactId(artifactNamespace,artifactName,artifactVersion);
  if (requestBody.isEmpty()) {
    throw new BadRequestException("String_Node_Str" + "String_Node_Str");
  }
  try {
    PluginEndpoint pluginEndpoint=pluginService.getPluginEndpoint(namespace,artifactId,pluginType,pluginName,methodName);
    Object response=pluginEndpoint.invoke(GSON.fromJson(requestBody,pluginEndpoint.getMethodParameterType()));
    responder.sendString(HttpResponseStatus.OK,GSON.toJson(response));
  }
 catch (  JsonSyntaxException e) {
    responder.sendString(HttpResponseStatus.BAD_REQUEST,"String_Node_Str");
  }
catch (  InvocationTargetException e) {
    if (e.getCause() instanceof javax.ws.rs.NotFoundException) {
      throw new NotFoundException(e.getCause());
    }
 else     if (e.getCause() instanceof javax.ws.rs.BadRequestException) {
      throw new BadRequestException(e.getCause());
    }
 else     if (e.getCause() instanceof IllegalArgumentException && e.getCause() != null) {
      responder.sendString(HttpResponseStatus.BAD_REQUEST,e.getCause().getMessage());
    }
 else {
      Throwable rootCause=Throwables.getRootCause(e);
      String message=String.format("String_Node_Str",methodName);
      if (rootCause != null && rootCause.getMessage() != null) {
        message=String.format("String_Node_Str",message,rootCause.getMessage());
      }
      responder.sendString(HttpResponseStatus.INTERNAL_SERVER_ERROR,message);
    }
  }
}