Artigo Revisado por pares

Accounting for data encapsulation in the measurement of object-oriented class cohesion

2015; Wiley; Volume: 27; Issue: 5 Linguagem: Inglês

10.1002/smr.1714

ISSN

2047-7481

Autores

Jehad Al Dallal,

Tópico(s)

Software System Performance and Reliability

Resumo

Journal of Software: Evolution and ProcessVolume 27, Issue 5 p. 373-400 Research Article Accounting for data encapsulation in the measurement of object-oriented class cohesion Jehad Al Dallal, Corresponding Author Jehad Al Dallal Department of Information Science, Kuwait University, PO Box 5969, Safat, 13060 Kuwait Correspondence to: Jehad Al Dallal, Department of Information Science, Kuwait University, PO Box 5969, Safat 13060, Kuwait. E-mail: [email protected]Search for more papers by this author Jehad Al Dallal, Corresponding Author Jehad Al Dallal Department of Information Science, Kuwait University, PO Box 5969, Safat, 13060 Kuwait Correspondence to: Jehad Al Dallal, Department of Information Science, Kuwait University, PO Box 5969, Safat 13060, Kuwait. E-mail: [email protected]Search for more papers by this author First published: 23 April 2015 https://doi.org/10.1002/smr.1714Citations: 5Read the full textAboutPDF ToolsRequest permissionExport citationAdd to favoritesTrack citation ShareShare Give accessShare full text accessShare full-text accessPlease review our Terms and Conditions of Use and check box below to share full-text version of article.I have read and accept the Wiley Online Library Terms and Conditions of UseShareable LinkUse the link below to share a full-text version of this article with your friends and colleagues. Learn more.Copy URL Abstract Intuitively, in a certain class, a pair of methods that share an attribute of an object type is potentially more cohesive than those that share an attribute of a primitive type because the attribute of a reference type could implicitly refer to multiple data. Existing class cohesion measures ignore the implicit access to or sharing of attributes due to the encapsulation feature. As a result, the obtained cohesion values can be inaccurate and could lead to incorrect quality indications. This paper aims at demonstrating how to account for data encapsulation (DE) in cohesion measurement and reports empirical studies that investigate the impact of considering DE in cohesion measurement on cohesion values and the abilities of cohesion measures to predict class fault proneness. To differentiate between attributes and parameters of different types, we propose a weight assignment algorithm. The weight that is assigned to an attribute or a parameter of a type depends on the number of encapsulated attributes of the type. Seven cohesion measures are extended to consider the assigned weights in cohesion measurement. The results of the empirical study show that the cohesion values and the corresponding fault-proneness prediction results can significantly change when accounting for DE in cohesion measurement. Copyright © 2015 John Wiley & Sons, Ltd. References 1 Aggarwal K, Singh Y, Kaur A, Malhotra R. Empirical analysis for investigating the effect of object-oriented metrics on fault proneness: a replicated case study. Software Process Improvement and Practice 2009; 14(1): 39– 62. 2 Al Dallal J. Improving the applicability of object-oriented class cohesion metrics. Information and Software Technology 2011; 53(9): 914– 928. 3 Briand LC, Wüst J, Lounis H. Replicated case studies for investigating quality factors in object-oriented designs. Empirical Software Engineering 2001; 6(1): 11– 58. 4 Chowdhury MZ. Using complexity, coupling and cohesion metrics as early indicators of vulnerabilities. Journal of Systems Architecture 2011; 57(3): 294– 313. 5 D'Ambros M, Lanza M, Robbes R. Evaluating defect prediction approaches: a benchmark and an extensive comparison. Empirical Software Engineering 2012; 17(4-5): 531– 577. 6 Elish M, Al-Yafei A, Al-Mulhem M. Empirical comparison of three metrics suites for fault prediction in packages of object-oriented systems: a case study of Eclipse. Advances in Engineering Software 2011; 42(10): 852– 859. 7 Singh Y, Kaur A, Malhotra R. Empirical validation of object-oriented metrics for predicting fault proneness models. Software Quality Journal 2010; 18(1): 3– 35. 8 Al Dallal J. Object-oriented class maintainability prediction using internal quality attributes. Information and Software Technology 2013; 55(11): 2028– 2048. 9 Dagpinar M, Jahnke JH. Predicting maintainability with object-oriented metrics – an empirical comparison, Proceedings of the 10th Working Conference on Reverse Engineering, 2003. 10 Elish M, Elish K. Application of TreeNet in predicting object-oriented software maintainability: a comparative study, 13th European Conference on Software Maintenance and Reengineering (CSMR '09), 2009; pp. 69– 78. 11 Li-jin W, Xin-xin H, Zheng-yuan N, Wen-hua K. Predicting object-oriented software maintainability using projection pursuit regression, 1st International Conference on Information Science and Engineering (ICISE), 2009; pp. 3827– 3830. 12 Al Dallal J, Morasca S, Predicting object-oriented class reuse-proneness using internal quality attributes. Empirical Software Engineering 2014; 19(4): 775– 821. 13 Bieman J, Kang B. Cohesion and reuse in an object-oriented system, Proceedings of the 1995 Symposium on Software reusability, Seattle, Washington, United States, 1995; pp. 259– 262. 14 Gui G, Scott PD. Measuring software component reusability by coupling and cohesion metrics. Journal of Computers 2009; 4(9): 797– 805. 15 Chidamber SR, Kemerer CF. A metrics suite for object oriented design. IEEE Transactions on Software Engineering 1994; 20(6): 476– 493. 16 Hitz M, Montazeri B. Measuring coupling and cohesion in object oriented systems, Proceedings of the International Symposium on Applied Corporate Computing, 1995; pp. 25– 27. 17 Li W, Henry SM. Maintenance metrics for the object oriented paradigm. In Proceedings of 1st International Software Metrics Symposium, Baltimore, MD, 1993; pp. 52– 60. 18 Briand LC, Daly J, Wust J. A unified framework for cohesion measurement in object-oriented systems. Empirical Software Engineering - An International Journal 1998; 3(1): 65– 117. 19 Henderson-sellers B. Object-Oriented Metrics Measures of Complexity. Prentice-Hall: NJ, USA, 1996. 20 Al Dallal J, Briand L. A precise method-method interaction-based cohesion metric for object-oriented classes. ACM Transactions on Software Engineering and Methodology (TOSEM) 2012; 21(2): 8:1– 8:34. 21 Bonja C, Kidanmariam E. Metrics for class cohesion and similarity between methods, Proceedings of the 44th Annual ACM Southeast Regional Conference, Melbourne, Florida, 2006; pp. 91– 95. 22 Fernández L, Peña R. A sensitive metric of class cohesion. International Journal of Information Theories and Applications 2006; 13(1): 82– 91. 23 Bansiya J, Etzkorn L, Davis C, Li W. A class cohesion metric for object-oriented designs. Journal of Object-Oriented Program 1999; 11(8): 47– 52. 24 Counsell S, Swift S, Crampton J. The interpretation and utility of three cohesion metrics for object-oriented design. ACM Transactions on Software Engineering and Methodology (TOSEM) 2006; 15(2): 123– 149. 25 Al Dallal J, Briand L. An object-oriented high-level design-based class cohesion metric. Information and Software Technology 2010; 52(12): 1346– 1361. 26 Al Dallal J. Fault prediction and the discriminative powers of connectivity-based object-oriented class cohesion metrics. Information and Software Technology 2012; 54(4): 396– 416. 27 Chen Z, Zhou Y, Xu B. A novel approach to measuring class cohesion based on dependence analysis, Proceedings of the International Conference on Software Maintenance, 2002; pp. 377– 384. 28 Chidamber SR, Kemerer CF. Towards a metrics suite for object-oriented design. Object-Oriented Programming Systems, Languages and Applications (OOPSLA) Special Issue of SIGPLAN Notices, 1991; 26(10): 197– 211. 29 Chae HS, Kwon YR, Bae D. A cohesion measure for object-oriented classes. Software—Practice & Experience 2000; 30(12): 1405– 1431. 30 Xu B, Zhou Y. More comments on 'A cohesion measure for object-oriented classes' by H. S. Chae, Y. R. Kwon and D. H. Bae (Softw. Pract. Exper. 2000, 30: 1405-1431). Software—Practice & Experience 2003; 33(6): 583– 588. 31 Al Dallal J. Mathematical validation of object-oriented class cohesion metrics. International Journal of Computers 2010; 4(2): 45– 52. 32 Al Dallal J. Measuring the discriminative power of object-oriented class cohesion metrics. IEEE Transactions on Software Engineering 2011; 37(7): 788– 804. 33 Briand LC, Wust J, Daly J, Porter V. Exploring the relationship between design measures and software quality in object-oriented systems. Journal of System and Software 2000; 51(3): 245– 273. 34 Al Dallal J. Constructing models for predicting extract subclass refactoring opportunities using object-oriented quality metrics. Information and Software Technology 2012; 54(10): 1125– 1141. 35 Al Dallal J. The impact of accounting for special methods in the measurement of object-oriented class cohesion on refactoring and fault prediction activities. Journal of Systems and Software 2012; 85(5): 1042– 1057. 36 Al Dallal J. Incorporating transitive relations in low-level design-based class cohesion measurement. Software: Practice and Experience 2013; 43(6): 685– 704. 37 Al Dallal J. The impact of inheritance on the internal quality attributes of Java classes. Kuwait Journal of Science and Engineering 2012; 39(2A): 131– 154. 38 Chhikara A, Chhillar R, Khatri S. Evaluating the impact of different types of inheritance on the object oriented software metrics. International Journal of Enterprise Computing and Business Systems 2011; 1(2): 1– 7. 39 Etzkorn L, Davis C, Li W. A practical look at the lack of cohesion in methods metric. Journal of Object-oriented Programming 1998; 11(5): 27– 34. 40 Radjenovića D, Heričkob M, Torkarc R, Živkovičb A. Software fault prediction metrics: a systematic literature review. Information and Software Technology 2013; 55(8): 1397– 1418. 41 CKJM. extended - An extended version of Tool for Calculating Chidamber and Kemerer Java Metrics (and many other metrics), http://gromit.iiar.pwr.wroc.pl/p_inf/ckjm/, accessed in January 2013. 42 Rosenkrantz W. Introduction to Probability and Statistics for Science, Engineering, and Finance, 1 edn. Chapman and Hall/CRC: FL, USA, 2008. 43 Devore J. Probability and Statistics for Engineering and the Sciences, 8th edn. Cengage Learning: Boston, MA, USA, 2011. 44 Shatnawi R, Li W. The effectiveness of software metrics in identifying error-prone classes in post-release software evolution process. The Journal of Systems and Software 2008; 81: 1868– 1882. 45 Hosmer D, Lemeshow S. Applied Logistic Regression, 2nd edn. Wiley Interscience: NY, USA, 2000. 46 Briand LC, Wust J. Empirical studies of quality models in object-oriented systems. Advances in Computers. Academic Press: USA, 2002; 56: 97– 166. 47 Subramanyam R, Krishnan M. Empirical analysis of CK metrics for object-oriented design complexity: implications for software defects. IEEE Transactions on Software Engineering 2003; 29(4): 297– 310. 48 Arisholm E, Briand LC, Johannessen EB. A systematic and comprehensive investigation of methods to build and evaluate fault prediction models. Journal of Systems and Software 2010; 83(1): 2– 17. 49 Olson D, Delen D. Advanced Data Mining Techniques, 1st edn. Springer: NY, USA, 2008. 50 O'Brien R. A caution regarding rules of thumb for variance inflation factors. Quality and Quantity 2007; 41(5): 673– 690. 51 Lavazza L, Morasca S, Taibi D, Tosi D. An empirical investigation of perceived reliability of open source Java programs. accepted for publication in Proceedings of the27th Symposium On Applied Computing, SAC '12, 2012. 52 Mockus A, Fielding R, Herbsleb J. Two case studies of open source software development: Apache and Mozilla. ACM Transactions on Software Engineering and Methodology 2002; 11(3): 309– 346. 53 Samoladas S Bibi IS, Bleris GL. Exploring the quality of free/open source software: a case study on an ERP/CRM system, 9th Panhellenic Conference in Informatics, Thessaloniki, Greece, 2003. 54 Samoladas G, Gousios DS, Stamelos I. The SQO-OSS quality model: measurement based open source software evaluation. Open Source Development, Communities and Quality 2008; 275: 237– 248. 55 Spinellis D, Gousios G, Karakoidas V, Louridas P, Adams PJ, Samoladas I, Stamelos I. Evaluating the quality of open source software. Electronic Notes in Theoretical Computer Science 2009; 233: 5– 28. 56 Krantz D, Luce R, Suppes P, Tversky A. Foundations of Measurement, vol. 1. Academic Press: San Diego, 1971. 57 Morasca S. A probability-based approach for measuring external attributes of software artifacts, Proceedings of the 3rd International Symposium on Empirical Software Engineering and Measurement, 2009, USA, pp. 44– 55. 58 Roberts F. Measurement theory with applications to decision making, utility, and the social sciences. Encyclopedia of Mathematics and its Applications, vol. 7. Addison-Wesley: University of California, USA, 1979. 59 Eclipse. http://www.eclipse.org/, accessed in March 2013. 60 DrJava. http://sourceforge.net/projects/drjava/, accessed in March 2013. 61 Illusion. http://sourceforge.net/projects/aoi/, accessed in March 2013. 62 FreeMind. http://freemind.sourceforge.net/, accessed in March 2013. 63 JHotDraw. http://sourceforge.net/projects/jhotdraw/, accessed in March 2013. Citing Literature Volume27, Issue5May 2015Pages 373-400 ReferencesRelatedInformation

Referência(s)