squid:S1319 not detecting all issues

In advance: This is not really a false-positive, rather a false-negative.

Comparing analysis results for the same projects in my old and new environment I’ve detected that the java rule squid:S1319 detect much less in the new environment without apparent reason.

  • Old environment: SonarQube 5.6.7 + sonar-java-plugin-
  • New environment: SonarQube 7.9.1 + sonar-java-plugin-

The source code of the project and the sonar-project.properties were exactly the same in both analysis.

This issues were correctly detected in old environment:
Sample A:
Sample B:

And, as you can see, in the new environment they were not detected anymore:
Sample A:
Sample B:

In fact, in some projects, the difference in the number of issues detected by the rule can be really significant.
Old environment:

New environment:

I could not find a pattern or an apparent reason for the lack of issues. ¿Some help or workaround about it?

Hello @irinacen,

First, please note that the two versions have around three years difference, a lot of happen between the two, while we have access to the history (tickets, github, …), taking into account the impact of everything is really hard.

From what I see, the current implementation of the rule should report an issue for the code in your sample, you could try to add a new piece of code (containing an issue), to see if it is correctly reported? If you manage to create a reproducer, can you share it here?
You can also have a closer look in the logs of the analysis, something may not be working as expected (maybe the fact that you keep exactly the same properties for the two analysis is the problem!)

Hope this can lead your research.