findbug中优先级/置信度的实际含义是什么? [英] What is the actual meaning of priority/confidence in findbugs ?

查看:140
本文介绍了findbug中优先级/置信度的实际含义是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用fingbugs-eclipse插件或findbugs-ant插件时,需要设置一个置信度选项.

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

但是,根据findbugs文档,错误的等级为1-20,分为最可怕的等级(1-4),可怕的等级(5-9),令人烦恼的等级(10-14)和值得关注的类别. (排名15-20).那么,优先级/信心的实际含义是什么?它与错误等级有关系吗?如果是这样,如何理解?不是的,为什么findbug为每个bug定义一个可信度?

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 ?

推荐答案

规则的confidence度量它标记了真实错误的可能性.与使用推理,检查多种方法的指令或标记代码在许多情况下完全合理的规则相比,使用单个或两个指令中的证据或检测到众所周知的错误源的简单规则更有可能找到真实的错误.

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.

版本2之前的版本 confidence被称为priority,但是由于大多数开发人员priority一词的理解:

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

[M]任何人都对FindBugs报告的优先级感到困惑,并认为所有高优先级"问题都很重要.为了反映问题的此属性的实际含义,已将其重命名为信心.应当按等级对不同错误模式的问题进行比较,而不是对它们的置信度进行比较.

[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.

规则的rank衡量问题的严重性.它的范围从20(最低)到1(最高),UI将值分为四个类别:scariestscarytroublingof concern.

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.

例如,破损的制动衬板的rank可能为10,而割断的断裂线将为1.您的机械师可能会报告:confidence高,表明您的断裂线通过简单的检查而被割断,而confidence则是,较低,confidence听到他在发动机中听到的敲门声表明活塞已损坏.

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.

这篇关于findbug中优先级/置信度的实际含义是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆