Here, I will present you briefly the “FindBugs” plugin of Eclipse (Eclipse 3.7 Indigo).
FindBugs is an open source static analysis of Java bytecode. Its goal is to find bugs in Java programs by identifying patterns recognized as bugs. To do this, it analyzes the bytecode looking for certain patterns known. It is not limited to searching by regular expressions, try to understand what the program wants to do.
To install the FindBugs plugin, follow these steps:
In Eclipse, click on click on Help -> Eclipse MarketPlace… (or Help -> Software Update -> Find and Install for the previous Eclispe versions). Find and intall this plugin (and if it is necessary, restart Eclipse IDE):
Using the plugin
- Click on Window -> Open Perspective -> Other -> FindBugs
- The FindBugs perspective with the “Bug Explorer” “Bug Reviews” and “Bug Explorer” views should appear:
- Or click on Window -> Show View -> Other -> Bug Explorer
- The “Bug Explorer” “Bug Reviews” and “Bug Explorer” views should appear in your perspective:
- Select projects, packages, or classes, you want to check, right click and choose Find Bugs:
- The “bugs” detected by FindBugs appear in the Bug Explorer:
Notes concerning the integration of FindBugs with other programs:
– Plugins for Eclipse, NetBeans and IntelliJ IDEA
– plugins for Apache Maven and Apache Ant