Came across an interesting article about a tool called Jester here:
http://www-128.ibm.com/developerworks/java/library/j-jester/It's recommended as a complimentary tool to whatever code coverage tool you use.
From the website:
Jester finds code that is not covered by tests. Jester makes some change to your code, runs your tests, and if the tests pass Jester displays a message saying what it changed. Jester includes a script for generating web pages that show the changes made that did not cause the tests to fail.
Jester is different than code coverage tools, because it can find code that is executed by the running of tests but not actually tested. Jester's approach is called mutation testing or automated error seeding. However, Jester is not meant as a replacement for code coverage tools, merely as a complementary approach.
I'll have to have a closer look at it to see just how effective it is, but I'll leave you with a word from one of the original JUnit developers:
“Why just think your tests are good when you can know for sure? Sometimes Jester tells me my tests are airtight, but sometimes the changes it finds come as a bolt out of the blue. Highly recommended.”
Kent Beck
You can find out more about Jester here:
http://jester.sourceforge.net/