The measures used in this study are eight:
☛ Number of sentences
☛ Number of atomic conditions per decision
☛ Total number of decisions
☛ Number of equalities
☛ Number of inequalities
☛ Nesting degree
☛ McCabe's cyclomatic complexity
☛ Branch coverage
There are 2 kinds of measures:
Which requires the execution of the program.
Which does not require the execution.
Cyclomatic complexity may also be applied to individual functions, modules, methods or classes within a program, and is formally defined as follows:
v(G) = E − N + 2P
where E is the number of edges of the graph, N is the number of nodes of the graph and P is the number of connected components.
Cyclomatic complexity is computed using the control flow graph of the program, the nodes of the graph correspond to indivisible groups of sentences of a program and a directed edge connects two nodes if the second sentence might be executed immediately after the first sentence.
Cyclomatic complexity is a complexity measure of code related to the number of ways there exists to traverse a piece of code. This measure determines the minimum number of test cases needed to test all the paths using linearly independent circuits.
Statement coverage is defined as the percentage of statements that are executed.
branch coverage is the percentage of branches exercised in a program. This coverage measure is used in most of the related papers in the literature.
The nesting degree is the maximum number of conditional statements that are nested one inside another.
The number of (in)equalities is the number of times that the operator is found in atomic conditions of a program.