Export to GitHub

findbugs - issue #37

findbugsTestCases from branch 1.3.9 reports bugs as expected, findbugsTestCases from rev. 13120 reports no bugs


Posted on Feb 7, 2011 by Grumpy Horse

Reproduction steps: 1. check out rev. 13120 and version 1.3.9 of findbugs 2. on each, perform: cd findbugsTestCases; ant

select output from 1.3.9: [findbugs] Warnings generated: 1977 [findbugs] Missing classes: 11 [findbugs] Calculating exit code... [findbugs] Setting 'missing class' flag (2) [findbugs] Setting 'bugs found' flag (1) [findbugs] Exit code set to: 3 [findbugs] Java Result: 3 [findbugs] Classes needed for analysis were missing [findbugs] Output saved to build/normal.xml select output from rev. 13120: [findbugs] Executing findbugs from ant task [findbugs] Running FindBugs... [findbugs] Calculating exit code... [findbugs] Exit code set to: 0 [findbugs] Output saved to build/normal.xml [findbugs] Executing findbugs from ant task [findbugs] Running FindBugs... [findbugs] Calculating exit code... [findbugs] Exit code set to: 0 [findbugs] Output saved to build/normal.html

I ran this w/ ant v. 1.8.1; java 1.6_22 on linux kernel version 2.6.36, 64bit userspace.

I encounter this non-reporting problem when using a rev. 13120 findbugs-ant.jar on my own projects. I expect that specifying "<findbugs ... reportLevel="low" ..." will cause findbugs to report all bugs found. Nonetheless, when TextUiCommandLine lns. 584-5 are executed, they set a rankThreshold and priorityThreshold that cause two of my test case bugs--ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD and URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD--to fail the test at ln. 175 of AbstractBugReporter and thus they are not reported.

Further, I can see that only a small subset of available detectors are ever applied to my classes (the ones in detectorList, which is populated in ln. 1039 of FindBugs2). I expected that all detectors in edu.umd.cs.findbugs.detect would be applied if I didn't specify an inclusion or exclusion list. It looks like a lot more detectors (some 155) are added to a plugin's detectorFactoryList , but I'm not clear on the intended use of that list and the later-populated detectorList.

Comment #1

Posted on Feb 8, 2011 by Grumpy Horse

This issue should be closed given that sourceforge's bug tracker is the preferred system for this project. The duplicate bug report in sourceforge's tracker is numbered 3175875.

Comment #2

Posted on Nov 23, 2011 by Quick Elephant

(No comment was entered for this change.)

Status: Invalid