Effort estimation and prediction of object-oriented systems1

https://doi.org/10.1016/S0164-1212(97)10021-8Get rights and content

Abstract

Due to the growing diffusion of the object-oriented paradigm (OOP) and the need of maintaining under control the process of software development, industries are looking for metrics capable of producing satisfactory effort estimations and predictions. These metrics have to produce results with a known confidence since the early phases of software life-cycle in order to establish a process of prediction and correction of costs. To this end, specific metrics are needed in order to maintain under control object-oriented system development. In this paper, new complexity and size metrics for effort evaluation and prediction are presented and compared with respect to the most important metrics proposed for the same purpose in the literature. The validation of the most important of these metrics is also reported.

Introduction

In recent years, several industries moved to the object-oriented paradigm (OOP) in the hope of satisfying their needs in terms of reusability, capability for programming “in the large” (i.e., for the capability of the OOP in modeling the reality by minimizing the cohesion among entities), etc., (Booch, 1994). In general, the introduction of the OOP is not immediate because it involves managers, analysts, designers, developers, etc. Thus, the adoption of the OOP implies to change the whole development process, (i.e., project management, resource evaluation, resource planning, requirements analysis, test, design, etc.). In most cases, the introduction of the object-oriented technology has not been accompanied by a corresponding effort to establish mechanisms for controlling the development process (Nesi, 1995). This lack is due on one hand to the lack of internal tradition in controlling the development process and, on the other hand, to the lack of consolidated suitable metrics for evaluating object-oriented projects.

In general, in order to guarantee the control of the development process, quantitative metrics for evaluating and predicting system characteristics must be used. One of the most important issues that should be maintained under control is the software cost (i.e., the effort). To this end, a linear/non-linear relationship between software complexity/size and effort (i.e., man-months or -days needed for system development, from requirements analysis to testing or in some cases only for coding) is commonly assumed. Therefore, the problem of effort evaluation is shifted to the problem of complexity or size evaluation. It should be noted that, when software complexity evaluation is performed after system building, it can be useful for: (i) predicting maintenance costs, (ii) comparing productivity and costs among different projects, (iii) learning the development process efficiency and parameters; when software complexity evaluation is performed before system building, it can be used for predicting costs of development, testing and early maintenance, etc.

Moreover, on the basis of the knowledge which is present in the early stages of the software life-cycle (e.g., number of classes, main relationships, number of methods, etc.) the process of code analysis allows the definition and tuning of metrics for predicting costs. From the cognitive point of view, the observable complexity can be regarded as the effort to understand subsystem/class behavior and functionalities. This complexity can be usually evaluated in the early phases and can be used for predicting costs of reuse and maintenance (Cant et al., 1991, Cant et al., 1994).

Traditional code metrics for complexity/size estimation, often used for procedural languages (e.g., McCabe (1976), (Henderson-Sellers and Edwards (1990), Halstead (1977)and the number of lines of code (LOC)), are unsuitable to be directly applied for evaluating object-oriented systems (Henderson-Sellers and Edwards, 1990; Bilow et al., 1993; Nesi and Campanai, 1996). This is mainly due to the fact that working with the OOP leads to shift part of the human resources from the design/code phase to that of analysis (Henderson-Sellers et al., 1994). In that phase, classes are identified together with their main relationships2 (is_a, is_part_of, is_referred_by). On the other hand, following evolutionary models for the development life-cycle (e.g., spiral (Boehm, 1986), fountain (Henderson-Sellers and Edwards, 1990), whirlpool (Williams, 1996), pinball (Ambler, 1994)), the distinction among phases is partially lost – e.g., some system parts can be under design when others are still under analysis. Therefore, these aspects must be captured with specific metrics, otherwise their related costs are unmeasurable (e.g., the costs of specialization, the costs of object reuse, etc.).

For eliminating the above mentioned drawbacks, some authors have defined new specific code metrics for evaluating size and/or complexity of object-oriented systems. Thomas and Jacobson have suggested to estimate class complexity as the sum of attribute and method complexities (Thomas and Jacobson, 1989), without considering the class external interface (i.e., method interface in terms of parameter complexity) and reuse. Henderson-Sellers has added to the above metric a term for addressing the problems of reuse (e.g., inheritance) (Henderson-Sellers, 1991). Chidamber and Kemerer have presented the Weighted Method per Class (WMC) which is the sum of the complexity of each class method and where each method complexity is obtained by using the McCabe complexity (Chidamber and Kemerer, 1994), by considering in this way only the functional and computational aspects of the class. Li and Henry have suggested to count the number of methods and the number of attributes (with the so-called Size2 metric) for addressing the problem of effort prediction (Li and Henry, 1993), without weights and, thus, tuning the model. In Henderson-Sellers (1994), Nesi and Campanai (1996)and Hopkins (1994)issues regarding the external and internal class complexity have been discussed by proposing several metrics. In Laranjeira (1990)and Lorenz and Kidd (1994)class complexity has been estimated by counting the number of LOC for all class methods. Most of the above mentioned metrics have been only partially validated.

Recently, a growing attention on the process of software development has created the need to get process-oriented information and to integrate metrics into the software development process. Furthermore, owing to the presence of many differences among projects by the same company, it is also important to create an integrated environment for software development (editing, navigating among classes, measuring, etc.) and to perform project-oriented tailored measures. This means that it is important for a company to adopt a unique method and approach for project measurement, but this approach must be capable of being tuned in order to adapt its features to different types of projects and languages. This process of adaption is usually performed by adjusting weights and thresholds (Henderson-Sellers et al., 1994, Meyer, 1990, Henderson-Sellers, 1993, Coulange and Roan, 1993). Some studies with metrics and measurement frameworks for object-oriented systems have been presented in Laranjeira (1990), Meyer (1990), Henderson-Sellers (1993), Coulange and Roan (1993), Li and Henry (1993), Brito e Abreu et al., 1995, Nesi and Campanai, 1996where general concepts for the estimation of system size, complexity and reuse level have been proposed together with many other metrics.

In this paper, a research about the estimation and prediction of effort of object-oriented systems coded in C++ is presented. The metrics proposed belong to a framework specifically defined for C++ language. The main aspects of our metric framework have been inherited from that presented in Campanai and Nesi (1994)and Nesi and Campanai (1996)by the same research group. Moreover, due to the high number of metrics which are available in our framework (see Section 4), only those metrics which are related to software complexity, size and effort are reported and compared in this paper with respect to the most important metrics proposed for the same purpose in the literature. The metrics presented in this paper for evaluation and/or predicting class effort have been validated against several projects.

This paper is organized as follows. In Section 2, the metrics proposed for evaluating and predicting class effort on the basis of complexity/size are reported and compared with well-known metrics proposed in the literature. Then the validation of the most important metrics proposed is presented together with a comparison against metrics extracted from the literature in Section 3. This is followed by a very short overview of our metric framework and tool for automatic code metric evaluation (Section 4). Conclusions are drawn in Section 5.

Section snippets

Complexity/size of object-oriented systems

Most of the traditional code metrics proposed in the literature express the complexity/size as a function of a number of quantities which can be directly determined from system code – (McCabe, 1976, Henderson-Sellers and Edwards, 1990, Halstead, 1977); others adjust such measures with coefficients depending on the application domain. In addition, it has been often demonstrated that most of these metrics are related to the LOC which is a typical measure of code size (Shepperd and Ince, 1993).

Comparison and validation of metrics

A metric analysis has been performed in order to identify which metric of the above-mentioned class metrics is better ranked for evaluating and/or predicting class effort.

The comparative analysis with validation has been carried out among the previously defined metrics and those already defined in the literature. Moreover, since most of the new metrics defined are very complex and computationally expensive to be evaluated (see Eq. (9)), an analysis to verify the influence of their parameters in

Short overview of metric framework

In the literature, many metrics frameworks have been presented – e.g., (Henderson-Sellers, 1991; Zuse, 1994; Meyer, 1990; Henderson-Sellers, 1993; Coulange and Roan, 1993; Li and Henry, 1993; Brito e Abreu et al., 1995). The metrics previously proposed belong to a metric framework such as many other metrics. Our approach is based on three different system views: a technical, a cognitive, and a process-oriented view (Nesi and Campanai, 1996). The technical view refers to the software engineering

Conclusions

The adoption of the OOP has produced a great demand of specific metrics. In the past, many researchers have proposed several direct and indirect metrics for effort evaluation of object-oriented systems – e.g., WMC, Size2, TJCC, HSCC, CMLOC, Size2, etc. In this paper, these metrics have been compared with new and more general metrics for class complexity estimation. During the validation phase, it has also been demonstrated that the metrics proposed with optimal weights present the highest

Acknowledgements

The authors would like to thank in particular the following members of TOOMS, ICOOMM, QV, LIOO and MOODS teams for collecting data about effort class per class: M. Campanai, M. Traversi of CESVIT, U. Paternostro, F. Fioravanti, S. Crucchi, M. Bruno, F. Bellini, F. Butera, N. Baldini, F. Spinu, M. Perfetti of Elexa. A special thank to B. Pages for an early version of the class browser (i.e., Xcoral), and A. Borri of CESVIT, for his help in designing the first version of TAC++. A sincere thank to

Paolo Nesi was born in Florence, Italy, in 1959. He received his doctoral degree in electronic engineering from the University of Florence, Italy, and received the Ph.D. degree from the University of Padoa, Italy, in 1992. In 1991, he was a visitor at the IBM Almaden Research Center, CA, USA. Since November 1991, he is with the Department of Systems and Informatics of the University of Florence, Italy, as a Researcher and Assistant Professor of both “Computer Science” and “Software

References (33)

  • W. Li et al.

    Object-oriented metrics that predict maintainability

    Journal of Systems Software

    (1993)
  • P. Nesi et al.

    Metric framework for object-oriented real-time systems specification languages

    The Journal of Systems and Software

    (1996)
  • Ambler, S.W., 1994. The pinball lifecycle model, Object Magazine 4...
  • Bilow, S.C., Lea, D., Freburger, K., deChampeaux, D., 1993. Workshop on: processes and metrics for object-oriented...
  • B.W. Boehm

    A spiral model of software development and enhancement

    ACM SIGSOFT Software Engineering Notes

    (1986)
  • Booch, G., 1994. Object-Oriented Design with Applications. Benjamin/Cummings, California,...
  • Brito e Abreu, F., Goulao, M., Esteves, R., 1995. Toward the design quality evaluation of object oriented software...
  • Bucci, G., Campanai, M., Nesi, P., Traversi, M., 1993. An object-oriented case tool for reactive system specification....
  • Bucci, G., Campanai, M., Nesi, P., Traversi, M., 1994. An object-oriented dual language for specifying reactive...
  • Campanai, M., Nesi, P., 1994. Supporting object-oriented design with metrics. In: Proceedings of the International...
  • Cant, S.N., Jeffery, D.R., Henderson-Sellers, B., 1991. A conceptual model of cognitive complexity of elements of the...
  • Cant, S.N., Henderson-Sellers, B., Jeffery, D.R., 1994. Application of cognitive complexity metrics to object-oriented...
  • S.R. Chidamber et al.

    A metrics suite for object oriented design

    IEEE Transactions on Software Engineering

    (1994)
  • Coulange, B., Roan, A., 1993. Object-oriented techniques at work: facts and statistics. In: Proceedings of the...
  • Halstead, H.M., 1977. Elements of Software Science. Elsevier, North...
  • Henderson-Sellers, B., 1991. Some metrics for object-oriented software engineering. In: Proceedings of the...
  • Cited by (53)

    • Research patterns and trends in software effort estimation

      2017, Information and Software Technology
    • Scale economies and production function estimation for object-oriented software component and source code documentation size

      2006, European Journal of Operational Research
      Citation Excerpt :

      The impact of number of parameters used in the method on the component size is not well established [23,24]. Class level complexity depends on the complexity of the given class itself, the complexity of any inherited class, and the number of inherited classes [24,14]. Class complexity may be explained by the complexity of methods [24].

    View all citing articles on Scopus

    Paolo Nesi was born in Florence, Italy, in 1959. He received his doctoral degree in electronic engineering from the University of Florence, Italy, and received the Ph.D. degree from the University of Padoa, Italy, in 1992. In 1991, he was a visitor at the IBM Almaden Research Center, CA, USA. Since November 1991, he is with the Department of Systems and Informatics of the University of Florence, Italy, as a Researcher and Assistant Professor of both “Computer Science” and “Software Engineering”. Since 1995, he is Assign. Prof. of Information Technology. Since 1987, he is active on several research topics, object-oriented technology, real-time systems, quality, testing, formal languages, physical models, parallel architectures. He holds the scientific responsibility at the CESVIT for object-oriented technologies and HPCN. He is a member of the Scientific Committee of the Italian Association on Object-Oriented Technologies (TABOO). He is a Program Chair of the “2nd Euromicro Working Conference on Software Maintenance and Reengineering”, CSMR'98, Florence, March 1998. He has been General Chair of Objective Quality Symposium 1995, Lecture Notes in Computer Science no. 926, Springer. He has been a member of programme committee of international Conferences (e.g., ICECCS'96 and ICECCS'97, “IEEE International Conference on Engineering of Complex Computer Systems”; AQUIS'96, “3rd International Conference on Achieving Quality in Software”; CSMR'97"). Nesi is an editorial board member of the “Journal of Real-Time Imaging”, Academic Press, and responsible of several projects (e.g., DIM45 ESPRIT III MEPI, MOODS ESPRIT-HPCN, etc.). He is a member of IEEE, IAPR-IC, TABOO and AIIA.

    Torello Querci was born in Florence, Italy. He received his doctoral degree in information engineering from the University of Florence, Italy, in 1995. Since 1995, he is a researcher at CQ_ware (Center for Software Quality) at CESVIT (High-Tech Agency for technology transfer). He is active on object-oriented, quality control, object-oriented methodology for analysis and design, code analysis tools and product/process assessment, in general.

    1

    This work was partially supported by MURST Ex60% govern Ministry of University and Scientific Research and by CESVIT, High-Tech Agency, Center for Software Quality, Florence.

    View full text