HOME

TheInfoList



OR:

A Software Defect Indicator is a pattern that can be found in
source code In computing, source code, or simply code, is any collection of code, with or without comments, written using a human-readable programming language, usually as plain text. The source code of a program is specially designed to facilitate the ...
that is strongly correlated with a
software defect A software bug is an error, flaw or fault in the design, development, or operation of computer software that causes it to produce an incorrect or unexpected result, or to behave in unintended ways. The process of finding and correcting bugs i ...
, 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 program A computer program is a sequence or set of instructions in a programming language for a computer to Execution (computing), execute. Computer programs are one component of software, which also includes software documentation, documentation and oth ...
s, it is not always possible to identify defects directly, but there are often patterns, sometimes called
anti-pattern An anti-pattern in software engineering, project management, and business processes is a common response to a recurring problem that is usually ineffective and risks being highly counterproductive. The term, coined in 1995 by computer programmer An ...
s, 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 re-enabled. * 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. * Unused Variables: Unreferenced variables are a strong indicator for other errors.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

*
Cyclomatic complexity Cyclomatic complexity is a software metric used to indicate the complexity of a program. It is a quantitative measure of the number of linearly independent paths through a program's source code. It was developed by Thomas J. McCabe, Sr. in 1976. ...
*
Anti-pattern An anti-pattern in software engineering, project management, and business processes is a common response to a recurring problem that is usually ineffective and risks being highly counterproductive. The term, coined in 1995 by computer programmer An ...
*
Computer program A computer program is a sequence or set of instructions in a programming language for a computer to execute. Computer programs are one component of software, which also includes documentation and other intangible components. A computer program ...
*
Computer programming Computer programming is the process of performing a particular computation (or more generally, accomplishing a specific computing result), usually by designing and building an executable computer program. Programming involves tasks such as anal ...
*
Control flow In computer science, control flow (or flow of control) is the order in which individual statements, instructions or function calls of an imperative program are executed or evaluated. The emphasis on explicit control flow distinguishes an ''im ...
*
Software engineering Software engineering is a systematic engineering approach to software development. A software engineer is a person who applies the principles of software engineering to design, develop, maintain, test, and evaluate computer software. The term '' ...


References

{{reflist


External links


NIST Special Publication 500-235 Structured Testing: A Testing Methodology Using the Cyclomatic Complexity Metric
Software metrics