Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the actual meaning of priority/confidence in findbugs ?

Tags:

findbugs

When I use fingbugs-eclipse plugin or findbugs-ant plugin, there is a confidence option to be set.

enter image description here

But according to findbugs document, bugs are given a rank 1-20, and grouped into the categories scariest (rank 1-4), scary (rank 5-9), troubling (rank 10-14), and of concern (rank 15-20). So what is the actual meaning of priority/confidence ? Does it have a relationship for Bug Rank? If so, how to understand? It not, why does findbug define a confidence for every bug ?

like image 262
爱国者 Avatar asked Feb 27 '13 02:02

爱国者


People also ask

What are FindBugs for?

FindBugs is an open-source static code analyser created by Bill Pugh and David Hovemeyer which detects possible bugs in Java programs. Potential errors are classified in four ranks: (i) scariest, (ii) scary, (iii) troubling and (iv) of concern. This is a hint to the developer about their possible impact or severity.


1 Answers

A rule's confidence measures the likelihood that it has flagged a real bug. Simple rules that use evidence from a single instruction or two or that detect a well-known source of bugs are more likely to find a real bug than those using inference, inspecting instructions from multiple methods, or flagging code that in many cases is perfectly reasonable.

Prior to version 2 confidence was known as priority, but this caused confusion due to most developers' understanding of the word priority:

[M]any people were confused by the priority reported by FindBugs, and considered all HIGH priority issues to be important. To reflect the actually [sic] meaning of this attribute of issues, it has been renamed confidence. Issues of different bug patterns should be compared by there rank, not their confidence.

A rule's rank measures the severity of the problem. It varies from 20 (lowest) to 1 (highest), and the UI groups the values into four categories: scariest, scary, troubling, and of concern.

For example, worn break pads might receive a rank of 10 while a cut break line would get 1. Your mechanic might report high confidence that your break line is cut by simple inspection but low confidence that the knocking he hears in your engine indicates a damaged piston.

like image 92
David Harkness Avatar answered Nov 14 '22 04:11

David Harkness