Use the FindBugs tool for the first time.
A FindBugs function:
FindBugs is a static analysis tool that examines a class or JAR file and compares bytecode with a set of bug patterns to identify possible problems. With the static analysis tool, the software can be analyzed without actually running the program to find out its potential problems. After you have selected the above items, you can start testing. The testing process may take several minutes, depending on the size of the project. After detection, you can generate a detailed report, which reveals a number of potential bugs in the middle of the code. Typically, such as referencing a null pointer (null pointer dereference), a specific resource (db connection) is not closed, and so on. If you use manual checking, these bugs may be difficult to find, and may never be discovered until the Run-time attack ... After removing these typical (classic) bugs, it is certain that our system stability will be on a new level.
More Baidu Introduction: Http://baike.baidu.com/view/2367937.htm?fr=aladdin
Two Install findbugs 1. Download URL: http://download.csdn.net/detail/u014077165/7651115 After decompression, is Edu.umd.cs.findbugs.plugin.eclipse_ 1.3.9.20090821 This folder, there are a lot of files inside.
2. Copy the edu.umd.cs.findbugs.plugin.eclipse_1.3.9.20090821 folder to the D:/plugins directory, or it can be another directory.
3. Enter the \configuration\org.eclipse.equinox.simpleconfigurator directory under the MyEclipse installation directory, modify the Bundles.info file, and add on the last line:
Edu.umd.cs.findbugs.plugin.eclipse,1.3.9.20090821,file:/d:/plugins/edu.umd.cs.findbugs.plugin.eclipse_ 1.3.9.20090821,4,false
Note:/d:/plugins/is your edu.umd.cs.findbugs.plugin.eclipse_1.3.9.20090821 directory, not the same to put under D:/plugins, in short, to ensure that the same can be.
4. Reboot MyEclipse, plug-in installation successful.
Three Using FindBugs in MyEclipse
After the installation is successful, the FindBugs option appears when you click the right button, as shown:
Experiment: The following code:
When I right-click a class in the workspace, I can find an error in the Bugexplore findbugs.
As shown above, errors can be found, such as String str = new string ("AA"), such as null pointer references, and so on.
Summary: The first use, understanding has yet to be in-depth, after more use after more profound experience to update. If there is a mistake, please point out. 3Q.