FindBugs Tool - dineshmadhup/Core-Java GitHub Wiki

#How to use FindBugs tool with NetBeans IDE to find the defects in Java Code

Author: Dinesh Madhup

December 12, 2016

Step by Step instructions:

FindBugs:

It is a pen source tool available to detect bugs in code and provide you suggestions for fix. Here is the official link. http://findbugs.sourceforge.net

Step:1 Open your pre-installed Netbeans IDE then go to SOURCE => INSPECT. Click INSPECT

Step:2 You will see this window with red text warning – “Additional plugins required for the selected configurations” followed by Install button. Just Click Install.

Step:3 Following window will appear. In this step, just click next.

Step:4 This window is about License agreement. Accept the license agreement and click Install.

Step:5 Wait until you see the following completion window and click the finish button. You are Done. Hurray…..

Testing the Code with FindBugs

Open any java code which you would like to test and detect the bugs. Again select source from top window and click inspect (same is in step-1). This time you will see following window. Click Inspect.

Result:

You will see output with little bug sign if there is any bugs in the code with all details. Follow your output screen to get more details about bugs.