FindBugs is a static analysis tool that examines a class or jar file to compare bytecode with a set of defect patterns to identify possible problems. FindBugs self-contained detectors, of which there are more than 60 kinds of bad practice,80 correctness,1 species internationalization,12 species malicious code vulnerability, 27 species of multithreadedcorrectness,23 performance,43 species dodgy.
Installation Address:
1. Online Installation
Installation Address: Http://findbugs.cs.umd.edu/eclipse
2,jar Package installation
http://download.csdn.net/detail/lhc2207221755/9332415
Configuration:
Open the FindBugs view:
Open Project properties, set to run automatically when compiling files
Bug Type Description:
Minimum Priority toreport: reports a bug based on the severity of the bug.
Malicious codevulnerability: Malicious code.
Dodgycode: High-risk code. The FindBugs team considers the problem code under this type to be highly likely to cause a bug.
Badpractice: Best Practices Counter-examples. Code in this category violates recognized best practice standards, such as a class that implements the Equals method but does not implement the Hashcode method.
Correctness: correctness. Problems under this classification can lead to bugs in some cases, such as the wrong coercion type conversions.
Internationalization: Internationalization.
Performance: Performance. Potential performance issues
Security: Secure.
Mutithreadedcorrectness: Multithreading is correct. Focus on syncing and multithreading issues.
Bug Settings
Find and improve bugs
On the project, right-click, select Fing bugs:
After that, you can view the bug in our Bug Explorer:
After finding the corresponding bug, right-click:
1, positioning to produce bug class
2, Show bug information
Here we choose Show Bug Info:
To get the bug pattern or type here, we can go back to bug filter in the previous Bug explorer, which feels like a previously used log cat, which makes it easy to find a certain type of information:
Group View Bugs:
With this little thing, we can save ourselves from checking the code, or the big part of the code that the boss checks, and can help us find some potential problems ahead of time. Roar ~ Good industrialization!
Bug Check tool--findbugs