Abstract
Traditional software metrics have been used to evaluate the maintainability of software programs by supporting the identification of code smells. Recently, concern metrics have also been proposed with this purpose. While traditional metrics quantify properties of software modules, concern metrics quantify concern properties, such as scattering and tangling. Despite being increasingly used in empirical studies, there is a lack of empirical knowledge about the effectiveness of concern metrics to detect code smells. This paper reports the results of an empirical study to investigate whether concern metrics can be useful indicators of three code smells, namely Divergent Change, Shotgun Surgery, and God Class. In this study, 54 subjects from two different institutions have analyzed traditional and concern metrics aiming to detect instances of these code smells in two information systems. The study results indicate that, in general, concern metrics support developers detecting code smells. In particular, we observed that (i) the time spent in code smell detection is more relevant than the developers’ expertise; (ii) concern metrics are clearly useful to detect Divergent Change and God Class; and (iii) the concern metric Number of Concerns per Component is a reliable indicator of Divergent Change.
Chapter PDF
Similar content being viewed by others
References
Data of the Experiment with Metrics, http://www.dcc.ufmg.br/~juliana.padilha/caise2014
Carneiro, G.F., et al.: Identifying Code Smells with Multiple Concern Views. In: Proc. of the Brazilian Symposium on Software Engineering (SBES), pp. 128–137 (2010)
Chidamber, S.R., Kemerer, C.F.: A Metrics Suite for Object Oriented Design. Trans. on Software Engineering (1994)
Conejero, J. M. et al.: On the Relationship of Concern Metrics and Requirements Maintainability. Inf. and Sof. Technology (IST) (2011)
Ducasse, S., Girba, T., Kuhn, A.: Distribution Map. In: Proc. of ICSM, pp. 203–212 (2006)
Eaddy, M., et al.: Do Crosscuting Concerns Cause Defects? IEEE Trans. on Software Engineering, 497–515 (2008)
Fenton, N.E., Pfleeger, S.L.: Software Metrics: A Rigorous and Practical Approach. Thomson (1996)
Ferrari, F., et al.: An Exploratory Study of Fault-Proneness in Evolving Aspect-Oriented Programs. In: Proc. of the Int’l Conf. on Software Engineering (ICSE), pp. 65–74 (2010)
Figueiredo, E., et al.: On the Impact of Crosscutting Concern Projection on Code Measurement. Proc. of the Int’l Conf. on Aspect-Oriented Soft. Develop, AOSD (2011)
Figueiredo, E., et al.: On the Maintainability of Aspect-Oriented Software: A Concern-Oriented Measurement Framework. In: Proc. of CSMR (2008)
Figueiredo, E., et al.: Evolving Software Product Lines with Aspects: an Empirical Study on Design Stability. In: Proc. of the Int. Conf. on Soft. Engineering (ICSE), pp. 261–270 (2008)
Fowler, M.: Refactoring: Improving the Design of Existing Code. Addison Wesley (1999)
Garcia, A.: Modularizing Design Patterns with Aspects: A Quantitative Study. In: Proc. of the Int. Conf. Aspect Oriented Software Development (AOSD), March 14-18 (2005)
Greenwood, P., et al.: On the impact of aspectual decompositions on design stability: An empirical study. In: Ernst, E., et al. (eds.) ECOOP 2007. LNCS, vol. 4609, pp. 176–200. Springer, Heidelberg (2007)
Jain, R.: The Art of Computer System Performance Analysis: Techniques for Experimental Design, Measurement, Simulation and Modeling, pp. 1–702. John Wiley & Sons (1991)
Kiczales, G., et al.: Aspect-oriented programming. In: Akşit, M., Matsuoka, S. (eds.) ECOOP 1997. LNCS, vol. 1241, pp. 220–242. Springer, Heidelberg (1997)
Lanza, M., Marinescu, R.: Object-Oriented Metrics in Practice. Springer (2006)
Macia, I. et al.: Are Automatically-Detected Code Anomalies Relevant to Architectural Modularity? In: Proc. of Int’l Conf. on Aspect-oriented Soft. Dev. (AOSD), pp. 167–178 (2012)
Marinescu, R.: Detection Strategies: Metrics-Based Rules for Detecting Design Flaws. In: Proc. of Int’l Conf. on Software Maintenance (ICSM), pp. 350–359 (2004)
Nguyen, T., Nguyen, H., Nguyen, H., Nguyen, T.: Aspect recommendation for evolving software. In: Proc. of the Int’l Conf. on Soft. Eng (ICSE), pp. 361–370 (2011)
Parnas, D.L.: On The Criteria to Be Used in Decomposing Systems into Modules. Comm. of the ACM 15(12), 1053–1058 (1972)
Riel, A.J.: Object-Oriented Design Heuristics. Addison-Wesley Professional (1996)
Robillard, M. and Murphy, G. Representing Concerns in Source Code. Trans. on Soft. Eng. and Meth. (2007)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2014 Springer International Publishing Switzerland
About this paper
Cite this paper
Padilha, J., Pereira, J., Figueiredo, E., Almeida, J., Garcia, A., Sant’Anna, C. (2014). On the Effectiveness of Concern Metrics to Detect Code Smells: An Empirical Study. In: Jarke, M., et al. Advanced Information Systems Engineering. CAiSE 2014. Lecture Notes in Computer Science, vol 8484. Springer, Cham. https://doi.org/10.1007/978-3-319-07881-6_44
Download citation
DOI: https://doi.org/10.1007/978-3-319-07881-6_44
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-07880-9
Online ISBN: 978-3-319-07881-6
eBook Packages: Computer ScienceComputer Science (R0)