Code defect static Analysis tool FindBugs plug-in installation using plots

Source: Internet
Author: User

1. FindBugs Introduction

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. With the static analysis tool, you can analyze the software without actually running the program to discover many potential bugs in the middle of the code, such as referencing a null pointer (Nullpointer dereference), a specific resource (db Connection) is not closed, and so on. If you use manual checks, these bugs can be difficult to find, and may never be discovered until run-time seizures ... That's the value of FindBugs's existence.

2. FindBugs Plugin Download installation

Download the Eclipse plugin version of findbugs, copy the extracted directory to the Dropins folder under the MyEclipse installation path, and then restart the MyEclipse, as in click:


If you see the findbugs Red bug icon in perspective, the plug-in installation succeeds:


3. Start the plugin to find bugs

Switch to the package view, right-click on the project name, then select: Start the Find Bugs program, after the program runs, it will show the number of bugs found in this run after the project name.


4. Fix bugs

To open a findbugs Perspective view:

Method One: Through the menu Window--open perspective--other--findbugs

Method Two: Through the toolbar:, add, then open

As shown, double-click the hint to jump to code out for repair:


Finally: FindBugs is just a tool. As a developer, of course, the first thing to do is to try to avoid introducing bugs when programming , rather than relying on a tool to check for yourself. Each tool also has its limitations, the pre-set rules for finding bugs are not suitable for all programs, so not all bugs can be monitored by the tool, and not every bug identified needs to be resolved, whether it needs to be resolved and the programmer needs to make decisions based on the situation.

Code defect static Analysis tool FindBugs plug-in installation using plots

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.