The Relationship between Code Smells and Traceable Patterns - Are They Measuring the Same Thing?

Zadia Codabux, Kazi Zakia Sultana, Byron J. Williams

Research output: Contribution to journalArticlepeer-review

6 Scopus citations


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.

Original languageEnglish
Pages (from-to)1529-1547
Number of pages19
JournalInternational Journal of Software Engineering and Knowledge Engineering
Issue number9-10
StatePublished - 1 Dec 2017


  • Code smell
  • micro pattern
  • nano-pattern
  • traceable pattern


Dive into the research topics of 'The Relationship between Code Smells and Traceable Patterns - Are They Measuring the Same Thing?'. Together they form a unique fingerprint.

Cite this