Brief introduction
FindBugs is a program that looks for bugs in a Java program, it looks for instances of bug patterns, that is, code instances that can go wrong, and note that findbugs is checking Java bytecode, or *.class files. In fact, it is to look for code defects, many of the bad places we write, can be optimized, it can be checked out. For example: Database connection not closed, missing necessary null check, extra null check, redundant if post condition, same conditional branch, duplicate code block, wrong use of "= =", use StringBuffer instead of string plus and so on. And we can also configure the check rules ourselves (what checks, do not check), you can also implement the unique validation rules (user-specific bug patterns need to inherit its interface, write their own check class, is an advanced technique).
FindBugs is a Java static Code analysis tool that differs from other static analysis tools such as Checkstyle and PMD, and FindBugs does not focus on style or format, it focuses on finding real flaws or potential performance problems, It can help Java engineers improve code quality and eliminate hidden flaws. With the static analysis tool, you can analyze the software without actually running the program.
Installation
Latest Version http://findbugs.sourceforge.net/downloads.html. Download the Eclipse plugin and then unzip it to Dropins in the Eclipse installation directory to restart Eclipse. (Baidu Network disk: Link: http://pan.baidu.com/s/1gdF4ghX password: FGSU).
Findbug website Address: http://findbugs.sourceforge.net/
For a detailed list of bug descriptions for findbugs see: http://findbugs.sourceforge.net/bugDescriptions.html
Use
You can right-click under Class FindBugs each time you commit the code:
Findbugs-eclipse Plug-in