Edit: updating SonarQube (or the java analyzer version), also solved this problem for some users.
Hello,
Before starting, I just want to warn that my post targets recent versions of the plugin (>=6.0). It might or might not be related to the initial problem raised by this post.
Such unexpected behavior is typically due to missing bytecode of dependencies.
I discussed a similar issue in this post, it does not target the same rule nor the same method, but I believe the solutions proposed there could be relevant to you.
Feel free to get back to us if it does not.
Best,
Quentin.