Cyclomatic complexity: The nesting problem
Mir Muhammd Suleman Sarwar, Sara Shahzad, Ibrar Ahmad · 2013
Cyclomatic complexity is a metric for the measurement of complexity of a software. This metric although widely cited has many limitations. Many authors criticized cyclomatic complexity in many ways but still it is the most widely accepted idea regarding software complexity. One of the problems in cyclomatic complexity is the nesting problem. A nested construct is more complex than a simple construct, but cyclomatic complexity calculates same complexity for both types of constructs. Many authors addressed this problem but their solutions also has limitations. One of the limitations is that same solutions cannot be applied over nested-loop. In this paper we propose a solution to differentiate between a nested loop and a simple loop.