eclipse: Findbugs Plugin Configuration on eclipse


Introduction


FindBugs is an open source project for a static analysis of the Java bytecode to identify potential software bugs. Findbugs provides early feedback about potential errors in the code. This helps the developer to access these problems early in the development phase.

The analysis of Findbugs can be integrated into existing IDEs like the Eclipse IDE of IntelliJ.

The FindBugs Eclipse plugin allows FindBugs to be used within the Eclipse IDE. The FindBugs Eclipse plugin was generously contributed by Peter Friese. Phil Crosby and Andrey Loskutov contributed major improvements to the plugin.

To use the FindBugs Plugin for Eclipse, you need Eclipse 3.3 or later, and JRE/JDK 1.5 or later.

 


Installation Steps


 

Please follow below steps to Install and execute FindBugs in your eclipse –

Step 1: Use the HelpInstall New Software… menu entry to install all the FindBugs components from the following URL. Restart your Eclipse IDE afterwards.  (As above we did for CheckStyle)

Reference: Help >  Install New Software

Add http://findbugs.cs.umd.edu/eclipse URL and install Plugin.

eclipse_fb1

Step 2: Clicking on Next and Complete the installation. Once FindBugs Plugin Installed in your eclipse then you can verify it using Window -> Preferences menu item from the top of the eclipse. Just Type FindBugs in the text Box then it shows FindBugs option in the search window, please find screenshot below –

eclipse_fb2

User can configure it as per their requirement.

Step 3: We can execute FindBugs by Right Click on the project and using FindBugs otpion, please find screenshot below –

eclipse_fb3

Clicking on Find Bugs option it will start preparing FindBugs Reports for that particular project(Ex. KnowledgeWalaLibrary). It show confirmation page.

eclipse_fb4

Step 4: We  enable FindBugs View using Window -> Show View -> Bug Explorer as below screenhot.

eclipse_fb5

Step 5: Once View enabled on eclipse then it start showing FindBugs Reports, please find screenshot below –

eclipse_fb6

User can download FindBugs Report using option available there and also clean previous run before running next time.

Troubleshooting

This section lists common problems with the plugin and (if known) how to resolve them.

  • If you see OutOfMemory error dialogs after starting FindBugs analysis in Eclipse, please increase JVM available memory: change eclipse.ini and add the lines below to the end of the file:
        -vmargs
        -Xmx1000m

Leave a Reply

Your email address will not be published. Required fields are marked *