Detection of embedded code smells in dynamic web applications

  • Authors:
  • Hung Viet Nguyen;Hoan Anh Nguyen;Tung Thanh Nguyen;Anh Tuan Nguyen;Tien N. Nguyen

  • Affiliations:
  • Iowa State University, USA;Iowa State University, USA;Iowa State University, USA;Iowa State University, USA;Iowa State University, USA

  • Venue:
  • Proceedings of the 27th IEEE/ACM International Conference on Automated Software Engineering
  • Year:
  • 2012

Quantified Score

Hi-index 0.00

Visualization

Abstract

In dynamic Web applications, there often exists a type of code smells, called embedded code smells, that violate important principles in software development such as software modularity and separation of concerns, resulting in much maintenance effort. Detecting and fixing those code smells is crucial yet challenging since the code with smells is embedded and generated from the server-side code. We introduce WebScent, a tool to detect such embedded code smells. WebScent first detects the smells in the generated code, and then locates them in the server-side code using the mapping between client-side code fragments and their embedding locations in the server program, which is captured during the generation of those fragments. Our empirical evaluation on real-world Web applications shows that 34%-81% of the tested server files contain embedded code smells. We also found that the source files with more embedded code smells are likely to have more defects and scattered changes, thus potentially require more maintenance effort.