The Relationship Between Code Smells and Traceable Patterns - Are They Measuring the Same Thing?
Document Type
Article
Publication Date
12-1-2017
Abstract
It is important to maintain software quality as a software system evolves. Managing code smells in source code contributes towards quality software. While metrics have been used to pinpoint code smells in source code, we present an empirical study on the correlation of code smells with class-level (micro pattern) and method-level (nano-pattern) traceable code patterns. This study explores the relationship between code smells and class-level and method-level structural code constructs. We extracted micro patterns at the class level and nano-patterns at the method level from three versions of Apache Tomcat, three versions of Apache CXF and two J2EE web applications namely PersonalBlog and Roller from Stanford SecuriBench and then compared their distributions in code smell versus noncode smell classes and methods. We found that Immutable and Sink micro patterns are more frequent in classes having code smells compared to the noncode smell classes in the applications we analyzed. On the other hand, LocalReader and LocalWriter nano-patterns are more frequent in code smell methods compared to the noncode smell methods. We conclude that code smells are correlated with both micro and nano-patterns.
DOI
10.1142/S0218194017400095
Montclair State University Digital Commons Citation
Codabux, Zadia; Sultana, Kazi Zakia; and Williams, Byron J., "The Relationship Between Code Smells and Traceable Patterns - Are They Measuring the Same Thing?" (2017). Department of Computer Science Faculty Scholarship and Creative Works. 581.
https://digitalcommons.montclair.edu/compusci-facpubs/581