FindBugs™ Manual

David H. Hovemeyer

William W. Pugh

This manual is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/1.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.

The name FindBugs and the FindBugs logo are trademarked by the University of Maryland.

17:16:15 EST, 22 November, 2013


Table of Contents

1. Introduction
1. Requirements
2. Installing FindBugs
1. Extracting the Distribution
3. Building FindBugs™ from Source
1. Prerequisites
2. Extracting the Source Distribution
3. Modifying local.properties
4. Running Ant
5. Running FindBugs™ from a source directory
4. Running FindBugs
1. Quick Start
2. Executing FindBugs
3. Command-line Options
5. Using the FindBugs GUI
1. Creating a Project
2. Running the Analysis
3. Browsing Results
4. Saving and Opening
6. Using the FindBugsAnt task
1. Installing the Ant task
2. Modifying build.xml
3. Executing the task
4. Parameters
7. Using the FindBugs™ Eclipse plugin
1. Requirements
2. Installation
3. Using the Plugin
4. Extending the Eclipse Plugin (since 2.0.0)
5. Troubleshooting
8. Filter Files
1. Introduction to Filter Files
2. Types of Match clauses
3. Java element name matching
4. Caveats
5. Examples
6. Complete Example
9. Analysis Properties
10. Annotations
11. Using rejarForAnalysis
12. Data mining of bugs with FindBugs
1. Commands
2. Examples
3. Ant example
13. License
14. Acknowledgments
1. Contributors
2. Software Used

List of Tables

9.1. Configurable Analysis Properties
12.1. Options for computeBugHistory command
12.2. Options for filterBugs command
12.3. Options for mineBugHistory command
12.4. Columns in mineBugHistory output
12.5. Columns in defectDensity output
12.6. Options for convertXmlToText command
12.7. setBugDatabaseInfo Options
12.8. listBugDatabaseInfo Columns