- Status: open --> closed-rejected
The findbugs CLI reports the line number of which the bug appears for all of the bug patterns except the following:
CI_CONFUSED_INHERITANCE
DMI_COLLECTION_OF_URLS
JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLASS
MF_CLASS_MASKS_FIELD
MS_CANNOT_BE_FINAL
NM_FIELD_NAMING_CONVENTION
SE_NONFINAL_SERIALVERSIONID
SE_NONLONG_SERIALVERSIONID
SE_NONSTATIC_SERIALVERSIONID
UUF_UNUSED_PUBLIC_OR_PROTECTED_FIELD
UUF_UNUSED_FIELD
UWF_NULL_FIELD
VO_VOLATILE_REFERENCE_TO_ARRAY
In all cases, the error message after the "ShortDescription" begin with the text "In" as opposed to "At", "Deferenced at", "Method invoked at", "Unsynchronized access at", "Obligation to clean up resource created at", or "Redundant null check at".
Here are a few example of the output (using test classes from /findbugsTestCases/src/java/).
Dm: BlockingMethodsOnURLs.map is or uses a map or set of URLs, which can be a performance hog In BlockingMethodsOnURLs.java
JCIP: TestImmutable2.y should be final since jcipAnnotations.TestImmutable2 is marked as Immutable. In TestImmutable2.java
MF: Field base_class_var masks field in superclass MaskMe In MaskMe.java
MS: messWithMe.UnprotectedClass.DontMessWithMe isn't final and can't be protected from malicious code In UnprotectedClass.java
Nm: The field name messWithMe.UnprotectedClass.DontMessWithMe doesn't start with a lower case letter In UnprotectedClass.java
Se: BadSerial$NotFinal.serialVersionUID isn't final In BadSerial.java
UuF: Unused field: AbstractMissingHashCode$StillMissingHashCode.y In AbstractMissingHashCode.java
VO: VolatileUsage.a is a volatile reference to an array; the array elements are non-volatile In VolatileUsage.java
For the other bug patterns, the convention appears to be to have a colon followed by the line number in square brackets, like the following:
CN: deref.UnconditionalDerefFalsePositive defines clone() but doesn't implement Cloneable At UnconditionalDerefFalsePositive.java:[lines 13-20]
DB: DuplicateBranches.doit(boolean, int, int) uses the same code for two branches At DuplicateBranches.java:[lines 5-7]
DB: npe.BranchOrStatement.f3(Object) uses the same code for two branches At BranchOrStatement.java:[line 24]
DB: npe.InstanceOf.test3() uses the same code for two branches At InstanceOf.java:[line 42]
DB: npe.NP.main(String[]) uses the same code for two branches At NP.java:[line 16]
DB: npe.NP.main(String[]) uses the same code for two branches At NP.java:[line 20]
DB: SwitchDup.nestedIf(boolean) uses the same code for two branches At SwitchDup.java:[lines 18-21]
DB: SwitchDup.simpleIf(boolean) uses the same code for two branches At SwitchDup.java:[line 8]
DC: Possible doublecheck on Doublecheck.o in Doublecheck.standardDoubleCheck() At Doublecheck.java:[lines 15-17]
DC: Possible doublecheck on Doublecheck.ready in Doublecheck.getData() At Doublecheck.java:[lines 81-83]
DLS: Dead store of javaVersionIncompatibilities.InitializeMe.class in javaVersionIncompatibilities.ForceClassInitialization.main(String[]) At ForceClassInitialization.java:[line 5]