Jump to content

Software defect indicator

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Gbolton (talk | contribs) at 16:52, 15 May 2009 (Created page with 'A '''Software Defect Indicator''' is a pattern which can be found in source code which is strongly correlated with a software defect, an error or omission i…'). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

A Software Defect Indicator is a pattern which can be found in source code which is strongly correlated with a software defect, an error or omission in the source code of a computer program that may cause it to malfunction.

When inspecting the source code of computer programs, it is not always possible to identify defects directly, but there are often patterns (sometimes called anti-patterns indicating that defects are present.

Some examples of Software Defect Indicators:

  • Disabled Code: Code has been written and the programmer has disabled it, or switched it off, without making it clear why it has been disabled, or when or whether it will be reenabled.
  • Routine Too Complex: A program (method, module, routine, subroutine, procedure, or any named block of code) contains more than 10 binary terms in conditional statements.

[1]

  • Unused Variables: There are unreferenced variables in the code. Unreferenced variables are a strong indicator for other errors.

[2]

References

  1. ^ William T. Ward: "Software Defect Prevention Using McCabe's Complexity Metric", Hewlett-Packard Journal, April 1989, pp 64-69: Control-flow complexity has been correlated with low reliabilty and frequent errors.
  2. ^ David N. Card, Victor E. Church, and William W. Agresti: "An Empirical Study of Software Design Practices", IEEE Transactions on Software Engineering, SE-12, no. 2, February 1986, pp 264-71: 46 percent of routines with no unused variables had no errors compared to only 17 to 29 percent for those with one or more unreferenced variables.

See also