The Artima Developer Community
Sponsored Link

Java Community News
Fixing Bug Classes Not Bug Instances

1 reply on 1 page. Most recent reply: Jun 27, 2006 11:35 AM by Bhaskar Maddala

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Bill Venners

Posts: 2284
Nickname: bv
Registered: Jan, 2002

Fixing Bug Classes Not Bug Instances Posted: Jun 27, 2006 9:05 AM
Reply to this message Reply
Summary
In a recent developerWorks article, Brian Goetz shows how to create a new bug detector for FindBugs. This open source tool employs static analysis of bytecodes to create a report of candidate bugs in your code. Creating your own detector allows you to essentially find and fix entire bug classes, rather than fixing one bug instance at a time.
Advertisement

In the article, Testing with leverage, Part 1, author Brian Goetz compares and contrasts the software quality techiques of unit testing, code reviews, and static analysis. He suggests that the best return on investment will be realized by employing all three, and explains how to extend the static analysis tool FindBugs with a new bug detector. In situations where you can use this approach, creating a bug detector allows you to find all instances of a certain class of bugs simply by running the static analysis tool. The main idea behind this approach is that instead of simply fixing a bug when it is discovered, you fix it and try to find a way to prevent the entire class of bugs in the future.

Brian suggests that the main cost of static analysis is the time spent wading through false alarms—bugs that are reported, but which really aren't bugs. Each time you write a bug detector, of course, there will also be a cost. The payback, of course, is that you can find and fix many bugs before you ever run the program, bugs which may have been missed by other quality techniques, such as code reviews, unit testing, and plain old QA testing.

Have you used static analysis on your projects, and if so, what did you find was the most cost effective way to use it? Which tool or tools did you use? To what extent were false alarms a problem, and how did you manage them? And lastly, to what extent have you written your own bug detectors?


Bhaskar Maddala

Posts: 5
Nickname: maddalab
Registered: Feb, 2006

Re: Fixing Bug Classes Not Bug Instances Posted: Jun 27, 2006 11:35 AM
Reply to this message Reply
Here is an excellent plug-in that identifies over 40 classes of bugs

http://sourceforge.net/project/showfiles.php?group_id=147536

Flat View: This topic has 1 reply on 1 page
Topic: Fixing Bug Classes Not Bug Instances Previous Topic   Next Topic Topic: The Difference Between #{...} and ${...} in EL Syntax

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use