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

五迷三道 提交于 2019-12-05 05:47:07

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.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!