Is it possible to detect unused methods in a source tree using FindBugs? I see some posts on SO where users are claiming to do that, some others asking how to do this in FB
as a member of the FindBugs team I can tell you that unfortunately FindBugs does not do this. If you search through the bug patterns on our website, the only mentions of "unused" detectors is for unused fields.
The best approach (to me) to find candidates for unused methods is to use coverage tools, like emma.
Instrument you application, use it excessivly and examine the emma logs - methods that not have been used during the session may be unused and you can use your favourite IDE (eclipse, ...) to examine the unvisited methods call hierarchies.
I doubt, that find bugs or any other code analyser can really detect unused methods, because methods may be