So once you write a bug detector, try running it on a few projects and sample the reports to see if they are actual bugs or false alarms.
所以在编写bug检测器后,应该试着在新的项目和示例上运行它,以查看它们是真实的bug,还是假警报。
Creating bug pattern detectors can have very high leverage; once you've created a detector, you can run it on any code you want, now or in the future, and you might be surprised what turns up.
创建bug模式检测器可以提高使用价值;创建检测器之后,无论是现在还是将来,您都可以在您需要的任何代码上运行它,并且您可能对发现的问题感到惊讶。
So for a bug pattern detector to be effective, it must minimize false alarms, preferably no more than 50 percent.
所以对于一个有效的bug模式检测器,它必须最小化假警报数量,最好使假情报不超过 50%。
All that is needed for a bug pattern detector to be effective is that it turn up a high enough percentage of questionable code to make it worth the effort of using it.
一个有效bug模式检测器的主要功能是发现更高百分比的可疑代码,使该模式具有更大的使用价值。
Writing a detector to find calls to a particular static method isn't that hard, but most bug detectors involve a fair bit more analysis and implementation effort.
编写检测器可以查找对特定静态方法的调用,这并不困难,但是大多数的bug检测器都包含相当多的分析和实现。
So if FindBugs is a bug pattern detector, it stands to reason that it can also serve as an auditing tool to measure the degree of compliance with a set of design principles.
因此如果FindBugs是bug模式检测器,那么它理所当然可以用作审核工具,衡量代码与一组设计原理的符合程度。
As you learned last month, the first step in writing a bug pattern detector is clearly identifying the bug pattern.
正如您在 上一期 中所学的,编写bug模式的第一个步骤是清楚地标识 bug 模式。
Tuning a detector often involves the use of "scoring" algorithms to determine whether a match should be reported as a bug.
优化检测器通常包括 “得分”算法的使用,以确定是否将匹配报告为 bug。
The process of tuning a detector involves looking at the false alarms and refining the bug pattern so as to eliminate some false alarms without excluding too many actual bugs.
优化检测器的过程包括查找假警报和细化bug模式,以消除某些假警报,同时不要将太多的真实bug排除在外。
In this installment, you'll develop a detector for a less trivial bug pattern, called RuntimeException capture. (this bug detector is now included in the FindBugs distribution.)
在这一期的文章中,您将开发一个称为RuntimeExceptioncapture的更小bug模式的检测器(目前,FindBugs发行版中已包含此bug检测器。)
In this installment, you'll develop a detector for a less trivial bug pattern, called RuntimeException capture. (this bug detector is now included in the FindBugs distribution.)
在这一期的文章中,您将开发一个称为RuntimeExceptioncapture的更小bug模式的检测器(目前,FindBugs发行版中已包含此bug检测器。)
应用推荐