Not sure how to tag this as I’m asking not to delete an old rule.
Rule java:S1697 checks for incorrect polarity in null checks (using && when you should use ||, or vice versa). This rule seems to have close to a 100% hit rate. But it’s deprecated; the rule description says use S2259 instead.
Rule S2259 is a generic null pointer check. At least for us, this rule has a very high percentage of false positives. This isn’t a knock on SQ; it’s an intractable problem in general, and SQ seems to be casting a very wide net. But the effect of this is that there is a lot of pushback from developers on examining issues that are most likely non-problems. Furthermore, S2259 doesn’t even catch some of the cases that S1697 identifies.
So the net effect of deprecating S1697 and steering users toward S2259 is that some legitimate errors get missed.