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 journalArticle

1 Citation (Scopus)

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.

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

Keywords

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

Cite this

@article{73187553330f4c3fb7176de2b6a1c5e0,
title = "The Relationship between Code Smells and Traceable Patterns - Are They Measuring the Same Thing?",
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.",
keywords = "Code smell, micro pattern, nano-pattern, traceable pattern",
author = "Zadia Codabux and Sultana, {Kazi Zakia} and Williams, {Byron J.}",
year = "2017",
month = "12",
day = "1",
doi = "10.1142/S0218194017400095",
language = "English",
volume = "27",
pages = "1529--1547",
journal = "International Journal of Software Engineering and Knowledge Engineering",
issn = "0218-1940",
publisher = "World Scientific Publishing Co. Pte Ltd",
number = "9-10",

}

The Relationship between Code Smells and Traceable Patterns - Are They Measuring the Same Thing? / Codabux, Zadia; Sultana, Kazi Zakia; Williams, Byron J.

In: International Journal of Software Engineering and Knowledge Engineering, Vol. 27, No. 9-10, 01.12.2017, p. 1529-1547.

Research output: Contribution to journalArticle

TY - JOUR

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

AU - Codabux, Zadia

AU - Sultana, Kazi Zakia

AU - Williams, Byron J.

PY - 2017/12/1

Y1 - 2017/12/1

N2 - 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.

AB - 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.

KW - Code smell

KW - micro pattern

KW - nano-pattern

KW - traceable pattern

UR - http://www.scopus.com/inward/record.url?scp=85041171073&partnerID=8YFLogxK

U2 - 10.1142/S0218194017400095

DO - 10.1142/S0218194017400095

M3 - Article

AN - SCOPUS:85041171073

VL - 27

SP - 1529

EP - 1547

JO - International Journal of Software Engineering and Knowledge Engineering

JF - International Journal of Software Engineering and Knowledge Engineering

SN - 0218-1940

IS - 9-10

ER -