logo
    Impact of Design Patterns on Software Complexity and Size
    11
    Citation
    16
    Reference
    10
    Related Paper
    Citation Trend
    Abstract:
    Many different factors influence the quality of software. Among the most important of these factors is software complexity. One way to improve software quality, therefore, is to minimize its complexity making it more understandable and maintainable. The design phase of the software development life cycle plays an instrumental role in fostering quality in software. Seasoned designers often use past design best practices codified in the form of design patterns to make their designs and the resultant code more elegant, robust, and resilient to change. Little work, however, has been done to empirically assess the quantitative impact of design patterns on software complexity. This research is an attempt to fill this gap. A comparative analysis of before and after versions of program pairs written without and with design patterns was performed for all twenty three GoF (Gang of Four) design patterns. These program pairs were collected (or, in some cases, developed) and compared with respect to their complexity and size. The results of this comparative analysis reveal that the cyclomatic complexity of the programs written using design patterns was less for most of the design patterns as compared to the programs written without using design patterns. However, the values of CK metrics, number of classes, and software size SLOC (Source Lines of Code) increased when design patterns were used.
    Keywords:
    Cyclomatic complexity
    Software metric
    Software design pattern
    Programming complexity
    Background: Software complexity affects its quality; a complex software is not only difficult to read, maintain and less efficient, but it also can be less secure with many vulnerabilities. Complexity metrics, e.g. cyclomatic complexity and nesting levels, are commonly used to predict and benchmark software cost and efficiency. Complexity metrics are also used to decide if code refactoring is needed. Objective: Software systems with high complexity need more time to develop and test and may lead to bad understandability and more errors. Nesting level in the target structure may result in developing more complex software in what is so-called the nesting problem. Nesting problem should be shortened by rewriting the code or breaking into several functional procedures. Method: In this paper, the relationship between the nesting levels, the cyclomatic complexity, and lines of code (LOC) metrics are measured through several software releases. In order to address how strong a relationship between these factors with the nesting level, correlation coefficients are calculated. Moreover, to examine to what extent the developers are aware of and tackle the nesting problem, the evolution of nesting levels for ten releases of five open sources systems is studied to see if it is improving over successive versions or not. Results: The result shows that the nesting level has variant effects on the cyclomatic complexity and SLOC for the five studied systems. Conclusion: nesting level has the tendency to have a positive correlation with other factors (cyclomatic complexity and LOC).
    Cyclomatic complexity
    Nesting (process)
    Code refactoring
    Programming complexity
    Benchmark (surveying)
    Software metric
    Software evolution
    Code (set theory)
    Different from existing methods of software complexity measure such as Halstead's Software Science, McCabe's Cyclomatic Complexity, and Chidamber and Kemerer's definition of six metrics, this paper provides a new method to evaluate software complexity by variable metric, which measures the number of variables, the distance between two variables and the aggregation of variables. This method can catch the essence of the software from the very basic place, the variables, and it can be applied to practical software complexity measure effectively.
    Cyclomatic complexity
    Software metric
    Programming complexity
    Software sizing
    Software measurement
    Citations (0)
    Software complexity metrics, such as code size and cyclomatic complexity, have been used in the software engineering community for predicting quality metrics such as maintainability, bug proneness and robustness. However, not many studies have addressed the relationship between complexity metrics and software testing and there is little experimental evidence to support the use of these code metrics in the estimation of test effort. We have investigated and evaluated the relationship between test effort (i.e, number of test cases and test execution time) and software complexity metrics for industrial control software used in an embedded system. We show how to measure different software complexity metrics such as number of elements, cyclomatic complexity, and information flow for a popular programming language named FBD used in the safety critical domain. In addition, we use test data and test suites created by experienced test engineers working at Bombardier Transportation Sweden AB to evaluate the correlation between several complexity measures and the testing effort. We found that there is a moderate correlation between software complexity metrics and test effort. In addition, the results show that the software size (i.e., number of elements in the FBD program) provides the highest correlation level with the number of test cases created and test execution time. Our results suggest that software size and structure metrics, while useful for identifying parts of the system that are more complicated, should not be solely used for identifying parts of the system for which test engineers might need to create more test cases. A potential explanation of this result concerns the nature of testing, since other attributes such as the level of thorough testing required and the size of the specifications can influence the creation of test cases. In addition, we used a linear regression model to estimate the test effort using the software complexity measurement results.
    Cyclomatic complexity
    Programming complexity
    Regression testing
    Software metric
    Maintainability
    Software reliability testing
    Test Management Approach
    Software sizing
    With the evolution of the software development, the scale of the software is increasingly growing to the extent that we cannot hand it easily. Some metrics are proposed to measure the complexity of software in last a few years. This article aims at a comprehensive survey of the metric of software complexity. Some classic and efficient software complexity metrics, such as Lines of Codes (LOC), Halstead Complexity Metric (HCM) and Cyclomatic Complexity Metric (CCM), are discussed and analyzed first. Then, some other approaches driven from above classic metrics are also discussed. The comparison and the relationship of these metrics of software complexity are also presented.
    Cyclomatic complexity
    Software metric
    Programming complexity
    Software measurement
    Software sizing
    Citations (78)
    The problem addressed by this thesis is the need for a software measurement tool that enforces a uniform measurement algorithm on several programming languages. The introductory chapter discusses the concern for software measurement and provides background for the specific models and metrics that are studied. A multilingual software measurement tool is then introduced, that analyzes programs written in Ada, C, Pascal, or PL/I, and quantifies over thirty different program attributes. Metrics computed by the program include McCabe's measure of cyclomatic complexity and Halstead's software science metrics. Some results and conclusions of preliminary data analysis, using the tool, are also given. The appendices contain exhaustive counting algorithms for obtaining the metrics in each language.
    Cyclomatic complexity
    Software metric
    Programming complexity
    Software measurement
    Pascal (unit)
    Software sizing
    Python
    Citations (0)
    Software complexity refers to the factors that determine the complexity level of a software project. High complexity is caused by the many attributes used in the system and the complex logic relationships among these attributes and features. The increased complexity of software is undesirable and affects maintenance. Over the years, Software Engineering scholars recommended several metrics like Halstead metric, cyclomatic complexity, and line of code metrics to deal with the complexity. With the complexity increasing as time goes by, there is a need for better metrics that can evaluate software more effectively. This research aims to develop a metrics model to determine the features that cause high complexity in software design architectures and to implement the multi-language complexity evaluation model for software architectures. Although this is the case, the literature on complexity metrics that implement diagram-centric complexity measures are inadequate. This study presents the outcomes obtained from our survey on metrics utilized in object-oriented environments. The survey comprises a small set of the most common and frequently implemented software metrics, which could be adopted to a group of object-oriented metrics and object-oriented programming. After reviewing the literature, Findings indicate that metrics that employ diagram-centric complexity measures are lacking.
    Cyclomatic complexity
    Software metric
    Programming complexity
    Software sizing
    Citations (2)
    To determine the complexity of software systems, software complexity measures are commonly utilized. However, their accuracy in forecasting software performance has been widely disputed. Accuracy of multiple software complexity measures in forecasting software performance are intended to be examined in this research study, employing numerous performance variables such as execution time, memory utilization, and scalability. Cyclomatic Complexity, Lines of Code, Halstead Complexity measures, and maintainability index are the most used methods to measure the complexity of software system. In this research result indicates how that different complexity matrices are vary in giving different software performance. Also examine what are the limitations of this different complexity matrixes.
    Cyclomatic complexity
    Programming complexity
    Software metric
    Maintainability
    Software sizing
    Software measurement
    Software complexity metrics, such as code size and cyclomatic complexity, have been used in the software engineering community for predicting quality metrics such as maintainability, bug proneness and robustness. However, not many studies have addressed the relationship between complexity metrics and software testing and there is little experimental evidence to support the use of these code metrics in the estimation of test effort. We have investigated and evaluated the relationship between test effort (i.e, number of test cases and test execution time) and software complexity metrics for industrial control software used in an embedded system. We show how to measure different software complexity metrics such as number of elements, cyclomatic complexity, and information flow for a popular programming language named FBD used in the safety critical domain. In addition, we use test data and test suites created by experienced test engineers working at Bombardier Transportation Sweden AB to evaluate the correlation between several complexity measures and the testing effort. We found that there is a moderate correlation between software complexity metrics and test effort. In addition, the results show that the software size (i.e., number of elements in the FBD program) provides the highest correlation level with the number of test cases created and test execution time. Our results suggest that software size and structure metrics, while useful for identifying parts of the system that are more complicated, should not be solely used for identifying parts of the system for which test engineers might need to create more test cases. A potential explanation of this result concerns the nature of testing, since other attributes such as the level of thorough testing required and the size of the specifications can influence the creation of test cases. In addition, we used a linear regression model to estimate the test effort using the software complexity measurement results.
    Cyclomatic complexity
    Programming complexity
    Regression testing
    Software metric
    Maintainability
    Software reliability testing
    Test Management Approach
    Software sizing