12.

Overview

When a program keeps exhibiting erroneous behavior after you've repaired it, you may have a Rogue Tile. We discuss programmer errors and original design errors as potential causes.

The Rogue Tile pattern is a bug pattern that all developers strive to minimize, but, as we'll demonstrate, it's not always an easy matter to eliminate the potential for such rogue tiles in a statically typed language like Java.

Here's our first bug pattern in a nutshell:

  • Pattern: Rogue Tile.

  • Symptoms: The code seems to act as if a previously corrected bug is still there.

  • Cause: At least one copy of a copy-and-paste code fragment still contains a bug fixed in the other copies.

  • Cures and Preventions: Factor out the common code, if possible; otherwise, update it. Avoid copying and pasting code.



Bug Patterns in Java
Bug Patterns In Java
ISBN: 1590590619
EAN: 2147483647
Year: N/A
Pages: 95
Authors: Eric Allen

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net