FindBugs
 
Docs and Info
Demo and data
Users and supporters
FindBugs blog
Fact sheet
Manual
Manual(ja/日本語)
FAQ
Bug descriptions
Mailing lists
Documents and Publications
Links
 
Downloads
 
FindBugs Swag
 
Development
Open bugs
Reporting bugs
Contributing
Dev team
API [no frames]
Change log
SF project page
Browse source
Latest code changes

FindBugs logo UMD logo SureLogic logo

FindBugs™ - Find Bugs in Java Programs

This is the web page for FindBugs, a program which uses static analysis to look for bugs in Java code.  It is free software, distributed under the terms of the Lesser GNU Public License. The name FindBugs™ and the FindBugs logo are trademarked by The University of Maryland. As of July, 2008, FindBugs has been downloaded more than 700,000 times.

FindBugs requires JRE (or JDK) 1.5.0 or later to run.  However, it can analyze programs compiled for any version of Java. The current version of FindBugs is 1.3.8, released on 13:06:06 EDT, 15 March, 2009. We are very interested in getting feedback on how to improve FindBugs.

We would like to better understand how FindBugs is used, and particularly how it is integrated into software development processes at different organizations. We have created a 10-20 minute survey to capture some of these trends. Participants can also choose to enter a drawing to win FindBugs Swag from Bill Pugh.

To take the survey, visit http://www.cs.umd.edu/projects/PL/surveys/findbugs

For more information, visit the Project Website.

More | Output | Try | Changes | Talks | Papers | Sponsors | Support

New

We created LinkedIn and Facebook groups for the FindBugs community. Join these to help meet up with other users and contributors to FindBugs.

Additional open source projects

The following software is being made available by the University of Maryland and the FindBugs project. The software is still preliminary, and needs volunteers to help mature it.

  • Multithreaded test case, a framework designed to make it easy to create test cases for concurrent software in which multiple threads must coordindate their activity to perform a test (e.g., testing a concurrent blocking queue, with one thread that blocks when it trys to add to a full queue, and another thread that unblocks the first by removing an element).
  • Checked uncontended lock, an implementation of the Java 5 Lock and ReadWriteLock interfaces that throw exceptions if they detect lock contention. These locks are designed to be used for debugging, and can be used in places where you don't believe you need to use a lock but want to verify that at runtime.

Sample output

As an example of the kind of issues FindBugs can identify, we provide our results on the Sun's JDK 7, Eclipse, Netbeans, Glassfish and JBoss. We present these results as a table showing the number of warnings we generate, an html report generated by FindBugs, and using a Java Webstart demo of FindBugs that loads the results of our analysis and the relevant source, so that you can view the source corresponding to each of our warnings and judge for yourself the accuracy of Findbugs.

Briefly, this table gives the number of warnings we found in various applications we use as benchmarks:

ApplicationDetailsCorrectness bugsBad PracticeDodgyKNCSS
HTMLWebStartNP bugsOther
Sun JDK 1.7.0-b12 All All Small 68180954654597
eclipse-SDK-3.3M7-solaris-gtk All All Small 1462591,0796431,447
netbeans-6_0-m8 All All Small 1893053,0101,1121,022
glassfish-v2-b43 All All Small 1461549641,2222,176
jboss-4.0.5 All All Small 3057263214178

KNCSS - Thousands of lines of non-commenting source statements

Try FindBugs now on your project!

Using Java Web Start you can try the GUI version of FindBugs now on your project. As long as you have a 1.5 or better JRE installed, you can run FindBugs now. If you are using Java 1.5 or later, you will see the new GUI that we wrote over the summer.

Change history

The current version of FindBugs is s 1.3.8.

Changes since version 1.3.7

  • Primarily another small bugfix release.
  • FindBugs base:
    • New Reports:
      • SF_SWITCH_NO_DEFAULT: missing default case in switch statement.
      • SF_DEAD_STORE_DUE_TO_SWITCH_FALLTHROUGH_TO_THROW: value ignored when switch fallthrough leads to thrown exception.
      • INT_VACUOUS_BIT_OPERATION: bit operations that don't do any meaningful work.
      • FB_UNEXPECTED_WARNING: warning generated that conflicts with @NoWarning FindBugs annotation.
      • FB_MISSING_EXPECTED_WARNING: warning not generated despite presence of @ExpectedWarning FindBugs annotation.
      • NOISE category: intended for use in data mining experiments.
        • NOISE_NULL_DEREFERENCE: fake null point dereference warning.
        • NOISE_METHOD_CALL: fake method call warning.
        • NOISE_FIELD_REFERENCE: fake field dereference warning.
        • NOISE_OPERATION: fake operation warning.
    • Other:
    • Fixes:
      • [ 2317842 ] Highlighting broken in Windows
      • [ 2515908 ] check for oddness should track sign of argument
      • [ 2487936 ] "L B GC" false pos cast from Map.Entry.getKey() to Map.get()
      • [ 2528264 ] Ant tasks not compatible with Ant 1.7.1
      • [ 2539590 ] SF_SWITCH_FALLTHROUGH wrong message reported
      • [ 2020066 ] Bug history displayed in fancy-hist.xsl is incorrect
      • [ 2545098 ] Invalid character in analysis results file
      • [ 2492673 ] Plugin sites should specify 'requires Eclipse 3.3 or newer'
      • [ 2588044 ] a tiny typing error
      • [ 2589048 ] Documentation for convertXmlToText insufficient
      • [ 2638739 ] NullPointerException when building
    • Patches:
      • [ 2538184 ] Make BugCollection implement Iterable<BugInstance> (thanks to Tomas Pollak)
      • [ 2249771 ] Add Maven2 Findbugs plugin link to the Links page (thanks to Garvin Leclaire)
      • [ 2609526 ] Japanese manual update (thanks to K. Hashimoto)
      • [ 2119482 ] CheckBcel checks for nonexistent classes (thanks to Jerry James)
  • FindBugs Eclipse plugin:
    • Major feature enhancements (thanks to Andrei Loskutov). See this overview for more information.
    • Major test improvements (thanks to Tomas Pollak).
    • Fixes:
      • [ 2532365 ] Compiler warning
      • [ 2522989 ] Fix filter files selection
      • [ 2504068 ] NullPointerException
      • [ 2640849 ] NPE in Eclipse plugin 1.3.7 and Eclipse 3.5 M5
    • Patches:
      • [ 2143140 ] Unchecked conversion fixes for Eclipse plugin (thanks to Jerry James)

Older versions...

Talks about FindBugs

Papers about FindBugs

Sponsors

Support for the FindBugs project is provided by SureLogic, which provides Sierra, an advanced interface and collaborative auditing and report system for static analysis tools, including FindBugs.

Additional Support

YourKit is kindly supporting open source projects with its full-featured Java Profiler. YourKit, LLC is creator of innovative and intelligent tools for profiling Java and .NET applications. Take a look at YourKit's leading software products: YourKit Java Profiler and YourKit .NET Profiler.

The FindBugs project also uses FishEye and Clover, which are generously provided by Cenqua/Atlassian.

Additional financial support for the FindBugs project has been provided by Google, Sun Microsystems, National Science Foundation grants ASC9720199 and CCR-0098162, and by a 2004 IBM Eclipse Innovation award.

Any opinions, findings and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation (NSF).


Send comments to findbugs@cs.umd.edu

SourceForge.net Logo