fb-contrib™: A FindBugs™ auxiliary detector plugin
fb-contrib™ is an extra detector plugin to be used with the static bug
finder FindBugs™ (findbugs.sourceforge.net). Just download the fb-contrib.jar
file, and place it in the appropriate location based on how you wish to use it. (See below). FindBugs™ will
automatically pick up the jar file, and incorporate these detectors with its
fb-contrib can be used from the Findbugs™ Gui, Ant, or the eclipse plugin.
To run fb-contrib from the gui, or ant, just place the fb-contrib jar in the plugins directory inside of the
To run fb-contrib from eclipse, assuming that the main FindBugs plugin is installed,
simply drop the fb-contrib.jar in the plugins directory of eclipse, and restart eclipse.
The latest version of fb-contrib is 5.0.3 available for download
Detectors added in git
- [STB] Stacked Try Blocks
Looks for two or more try catch blocks that are consecutive and catch the
same kind of exception, and throw the same exception always. These blocks can
be coalesced into one.
- [PSC] Presize Collections
Looks for methods that create and populate collections, and while knowing
the end size of those collections, does not pre allocate the collection
to be big enough. This just causes unneeded reallocations putting strain
on the garbage collector.
- [AIOB] Array Index Out of Bounds
Looks for questionable load/stores to array elements.
Looks for accesses to array elements using literal values that are known to be outside the bounds of the array.
This mistake will cause an ArrayIndexOutOfBoundsException to occur at runtime.
Looks for stores to array elements where the array itself appears to have not been allocated.
- [CNC] Collection Naming Confusion
Looks for fields and local variables that have Map, Set, List in their names
but the variable is a collection of a different basic type.
- [PME] Poor Mans Enum
Looks for simple fields that only store one of several constant values. This usually is an indication
that this field should really be an enum type.
- [UP] Unused Parameter
Looks for private or static methods that have parameters that aren't used. These parameters
can be removed.
- [CD] Circular Dependencies
Looks for class dependencies that where two or more classes rely on each other, either directly or indirectly.
This often signifies an improper data model. Consider using interfaces to break this closed loop.
Detectors added in v5.0.0
Detectors added in v4.8.0
Detectors added in v4.6.0
Detectors added in v4.4.0
Detectors added in v4.2.0
Detectors added in v4.0.0
Detectors added in v3.8.0
Detectors added in v3.6.0
Detectors added in v3.4.0
Detectors added in v3.2.0
Detectors added in v3.0.0
Detectors added in v2.8.0
Detectors added in v2.6.0
Detectors added in v2.4.0
Detectors added in v2.2.0
Detectors added in v2.0.0
Detectors added in v1.8.0
Detectors added in v1.6.0
Detectors added in v1.4.0
Detectors added in v1.2.0
Detectors added in v1.0.0
Detectors added in v0.9.3
fb-contrib is a trademark of MeBigFatGuy.com
FindBugs is a trademark of University of Maryland