FindBugs

from Wikipedia, the free encyclopedia
FindBugs

logo
Basic data

Maintainer Bill Pugh
developer William Pugh
Current  version 3.0.1
(March 6, 2015)
operating system Cross-platform
programming language Java
category Bytecode analysis
License LGPL
findbugs.sf.net

FindBugs is free software that searches for error patterns in Java programs. Such error patterns often indicate actual errors. The program was initiated from the University of Maryland and originally developed by Bill Pugh and David Hovemeyer.

functionality

The program can be started via the command line, an independent GUI , or via plugins for development environments such as Eclipse . FindBugs analyzes Java bytecode using static code analysis in search of known error patterns. Static here means that the search for errors takes place exclusively by examining the bytecode, without having to execute the program to be analyzed. Since compiled code is searched, there is no source code.

Error patterns, or collections of such, usually result from complicated functions of the programming language, misunderstood interfaces , misunderstood program sequences in the case of revisions and typing errors.

FindBugs categorizes the bugs it finds in order to better distinguish false reports from actual bugs. This is further supported by an additional prioritization (e.g. high priority ).

The project is used by GlassFish and JavaServer Faces , among others , and financially supported by the University of Maryland, Google and Sun Microsystems .

With version 2.0, FindBugs finds a number of new error patterns. In addition, FindBugs from version 2.0 supports plugins for cloud computing and improves the connection to error management systems such as Jira or Google Code .

example

In the following program section, FindBugs would report an error of the type " Value is null and guaranteed to be dereferenced on exception path ".

    // ...
    Object einObjekt = new Object();
    // ...
    if (einObjekt == null)
        System.out.println("Hash-Code= " + einObjekt.hashCode());

During this check of the property null, a small carelessness occurred: the correct protection should read. if (einObjekt != null)

successor

After the maintainer Bill Pugh was unavailable for a long time, Andrey Loskutov and other participants created the SpotBugs project as a successor. The first version 3.1.0 was released in October 2017.

Individual evidence

  1. FindBugs: Facts
  2. FindBugs: Users and Backers
  3. ^ Project status Nov 2016
  4. Announcing SpotBugs as FindBugs successor
  5. SpotBugs 3.1.0 released

Web links