I'm using FindBug and I want to understand the .XML report generated by it for documentation purpose.
Sample I got is below.
<BugInstance type="RANGE_ARRAY_INDEX" priority="2" rank="7" abbrev="RANGE" category="CORRECTNESS" first="1">
So as it seems type RANGE_ARRAY_INDEX
of category CORRECTNESS
is having rank 7
so it is a scary
one. So is it always true ? Is RANGE_ARRAY_INDEX
always a scary
one ?
I couldn't find any resource mentioning about a relationship among them.
I referred to FindBugs Bug Descriptions and FindBugs 2 site and this SO question which dose not have a clear answer
As it seems we have several Categories,
And
And we have many types as it's in the doc.
Can anyone help me on this ?
There is an answer by David Harkness which explains it pretty well, partly cited below. I also checked the SpotBugs code. SpotBugs is FindBugs' successor. In short:
RANGE_ARRAY_INDEX
will always fall in the CORRECTNESS
category (and it's reported by the DumbMethods detector).scariest
, scary
, troubling
, and of concern
. (Harkness) So, a certain NullPointerException might get a 1, and a potential performance improvement might just get a 12.priority
for compatibility reasons.