FindBugs是个相当有趣的小工具,可以分析出Java程序中常见的“坏代码”——这些代码可能是效率不彰(例如创建不必要的对象),也可能有安全性或稳定性方面的隐患(例如不恰当的同步、未关闭的文件句柄)。我用FindBugs检查了一下JUnit,发现了好几处小问题;而对J2SE 1.4.2 Runtime的检查更是发现问题一大堆。你自己的程序,是不是也该做做检查呢?
目前这个小玩意还只能检查.jar里的.class文件,不能不说是一点缺憾,使用起来也多少有点麻烦。你有没有兴趣给它做做加工完善呢?
——————————————
FindBugs is a program which looks for bugs in Java code. It can detect various coding "mistakes" including thread synchronization problems and misuse of API methods. It includes both Swing and command line interfaces.
The new version adds new bug detectors:
- Places where a null pointer might be dereferenced
- I/O streams that are opened, do not escape the method, and are not closed on all paths out of the method
- Methods that can return null instead of a zero-length array
- Using the == or != operators to compare String objects
Other changes in this version:
- Command line interface can save bugs as XML
- GUI can save bugs to and load bugs from XML
- An "Annotations" window in the GUI allows the user to add textual annotations to bug reports; these annotations are preserved when bugs are saved as XML
- In this release, the Japanese bug summary translations by Germano Leichsenring are really included (they were inadvertently omitted in the previous release)
- Completely rewrote the control flow graph builder, hopefully for the last time
- Simplified implementation of control flow graphs, which should reduce memory use and possibly improve performance
- Improvements to command line interface (list bug priorities, filter by priority, specify aux classpath, specify project to analyze)
- Various bug fixes and enhancements
Check out the open source
FindBugs
分享到:
相关推荐
将类引入项目,在不想用findbug检查的代码类或方法上,添加该注释
myeclipse插件java代码质量检测 findbug pmd可以发现代码中的问题,实现自动的检测和优化代码,sourcecounter可以统计代码量
静态代码分析工具,查找代码中的问题,代码优化的好工具
findbug3,代码检查工具,支持myeclipse2014,jdk1.7下通过
findbugs-1.3.9 java 代码检查工具 eclipse插件 这是一款java代码检查工具,可以提出相应的修改意见,大部分意见还是挺好的。
eclipse,findbug, 插件,找錯eclipse,findbug, 插件,找錯eclipse,findbug, 插件,找錯eclipse,findbug, 插件,找錯eclipse,findbug, 插件,找錯
findbug2,代码检查工具,myeclipse10下通过,2014的话换findbug3
让我们的代码更漂亮吧。 插件安装时,我们只需在eclipse根目录下新建一个【links】目录,然后在里面创建【.link】扩展名的文件,在里面写上类似于【path=F:\\IDE\\eclipsePlugin\\findbugs\\findbugs1.3.4】这样的...
findbug插件,自动排查简单的代码bug
eclipse findbug插件 便于项目代码的检查
此插件可以检查出代码中明显的bug,比如空指针等类似错误。
Malicious code vulnerability: 存在漏洞的有害代码 Multithreaded correctness: 多线程正确性 Performance:性能 Security:安全 Dodgy: 欺骗性代码 2、 常见Bug以及处理办法 a) 不需要处理 May expose internal ...
Findbug 是一个开源的 Eclipse 代码检查工具,能够简单高效全面地帮助我们发现程序代码中存在的 bug、bad smell 以及潜在隐患。它提供了简单的修改意见供我们重构时进行参考,通过使用它,可以一定程度上降低我们 ...
cc和CCRC的安装及使用文档、代码规范、findbug工具,比较全面cc和CCRC的安装及使用文档、代码规范、findbug工具,比较全面
FindBug检查问题指南.docx,findbug常见问题,包括大多数的常见问题
findbug的错误日志文档 如: Bug: Call to method of static java.text.DateFormat Pattern id: STCAL_INVOKE_ON_STATIC_DATE_FORMAT_INSTANCE, type: STCAL, category: MT_CORRECTNESS As the JavaDoc states, ...
NULL 博文链接:https://zxiang.iteye.com/blog/726978
发现程序中的bug,此html对此用stanford的软件进行介绍分析
【Find Bugs——eclipse之BUG检测插件】是一个用于检查类或者JAR文件,以发现可能存在的问题的静态分析工具,可检测出来大量隐含问题,可在编码或单元测试时使用。