Skip to content

Lombok-generated Logger property incorrectly indexed #789

Open
@stevev-neosec

Description

@stevev-neosec

Hi Folks,

Using Docker image retrieved with docker pull --platform=linux/arm64 sourcegraph/scip-java:0.10.4.

Indexing project - https://github.com/apitable/apitable/
project hash: e7a0954

Generated index and protoc text doc of above is attached: Archive.zip

In the ClientController class, the SLF4J logger is generated by Lombok via @Slf4j. The problem is that the defining occurrence (symbol_roles: 1) of the ClientController#log. symbol has an incorrect range, that identifies a USE of ClientController#log. as its DEFINITION.

  occurrences {
    range: 86
    range: 16
    range: 19
    symbol: "semanticdb maven . . com/apitable/client/controller/ClientController#log."
    symbol_roles: 1
  }
  occurrences {
    range: 86
    range: 16
    range: 19
    symbol: "semanticdb maven . . com/apitable/client/controller/ClientController#log."
  }
  ...
  occurrences {
    range: 106
    range: 12
    range: 15
    symbol: "semanticdb maven . . com/apitable/client/controller/ClientController#log."
  }
  ...
  occurrences {
    range: 127
    range: 12
    range: 15
    symbol: "semanticdb maven . . com/apitable/client/controller/ClientController#log."
  }
  ...
  symbols {
    symbol: "semanticdb maven . . com/apitable/client/controller/ClientController#log."
    kind: StaticField
    display_name: "log"
    signature_documentation {
      relative_path: "application/src/main/java/com/apitable/client/controller/ClientController.java"
      language: "java"
      text: "@SuppressWarnings(\"all\")\nprivate static final Logger log"
    }
  }

I believe this same issue also occurs elsewhere in the project, but hopefully this one example will suffice.

This may be related to issue #788 that was reported yesterday, but is different enough that it appears to be a separate issue, because there doesn't seem to be any conflation of ClientController#log. with a Lombok-generated getter method that has the same getter method name (getAddress()) in a different third-party library (see details of that issue for further info).

Thank you for looking into this.
Steve

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions