Program: 13333
Project: 13333
Buggy source:
/** 
 * Overrides the response to provide a JSON error structure in the entity if a  {@link ResourceException} is being thrown.
 */
@Override protected void doCatch(Throwable throwable){
  Throwable cause=throwable.getCause();
  if (throwable instanceof ResourceException && cause instanceof ObjectSetException) {
    Status status;
    if (cause instanceof NotFoundException) {
      status=Status.CLIENT_ERROR_NOT_FOUND;
    }
 else     if (cause instanceof PreconditionFailedException) {
      status=Status.CLIENT_ERROR_PRECONDITION_FAILED;
    }
 else     if (cause instanceof BadRequestException) {
      status=Status.CLIENT_ERROR_BAD_REQUEST;
    }
 else     if (cause instanceof ForbiddenException) {
      status=Status.CLIENT_ERROR_FORBIDDEN;
    }
 else     if (cause instanceof ConflictException) {
      status=Status.CLIENT_ERROR_CONFLICT;
    }
 else     if (cause instanceof MethodNotAllowedException) {
      status=Status.CLIENT_ERROR_METHOD_NOT_ALLOWED;
    }
 else     if (cause instanceof InternalServerErrorException) {
      status=Status.SERVER_ERROR_INTERNAL;
    }
 else     if (cause instanceof ServiceUnavailableException) {
      status=Status.SERVER_ERROR_SERVICE_UNAVAILABLE;
    }
 else {
      status=Status.SERVER_ERROR_INTERNAL;
    }
    String description=(cause != null ? cause.getMessage() : null);
    throwable=new ResourceException(status,description,cause);
  }
  if (throwable instanceof ResourceException) {
    ResourceException re=(ResourceException)throwable;
    Map<String,Object> entity=new HashMap<String,Object>();
    Status status=re.getStatus();
    entity.put("String_Node_Str",status != null ? status.getName() : "String_Node_Str");
    entity.put("String_Node_Str",status != null ? status.getDescription() : re.getMessage());
    getResponse().setEntity(jacksonRepresentation(entity));
  }
  super.doCatch(throwable);
}

Fixed version (ground truth):
/** 
 * Overrides the response to provide a JSON error structure in the entity if a  {@link ResourceException} is being thrown.
 */
@Override protected void doCatch(Throwable throwable){
  Throwable cause=throwable.getCause();
  if (throwable instanceof ResourceException && cause instanceof ObjectSetException) {
    Status status;
    if (cause instanceof NotFoundException) {
      status=Status.CLIENT_ERROR_NOT_FOUND;
    }
 else     if (cause instanceof PreconditionFailedException) {
      status=Status.CLIENT_ERROR_PRECONDITION_FAILED;
    }
 else     if (cause instanceof BadRequestException) {
      status=Status.CLIENT_ERROR_BAD_REQUEST;
    }
 else     if (cause instanceof ForbiddenException) {
      status=Status.CLIENT_ERROR_FORBIDDEN;
    }
 else     if (cause instanceof ConflictException) {
      status=Status.CLIENT_ERROR_CONFLICT;
    }
 else     if (cause instanceof MethodNotAllowedException) {
      status=Status.CLIENT_ERROR_METHOD_NOT_ALLOWED;
    }
 else     if (cause instanceof InternalServerErrorException) {
      status=Status.SERVER_ERROR_INTERNAL;
    }
 else     if (cause instanceof ServiceUnavailableException) {
      status=Status.SERVER_ERROR_SERVICE_UNAVAILABLE;
    }
 else {
      status=Status.SERVER_ERROR_INTERNAL;
    }
    String description=(cause != null ? cause.getMessage() : null);
    throwable=new ResourceException(status,description,cause);
  }
  if (throwable instanceof ResourceException) {
    ResourceException re=(ResourceException)throwable;
    Map<String,Object> entity=new HashMap<String,Object>();
    Status status=re.getStatus();
    entity.put("String_Node_Str",status != null ? status.getName() : "String_Node_Str");
    entity.put("String_Node_Str",status != null ? status.getDescription() : re.getMessage());
    setStatus(status);
    getResponse().setEntity(jacksonRepresentation(entity));
  }
}