An Empirical Evaluation of Code Smell Detection in Angular Applications
Maykon Nunes, Emanuel Coutinho, Carla Bezerra, Ivan Machado
TLDR
This study identifies 11 Angular-specific code smells, catalogs them, and develops an effective automated tool for their detection.
Key contributions
- Cataloged 11 distinct Angular code smells from grey literature, 6 also found in React.
- Developed an automated static analysis tool to detect these Angular code smells.
- Empirically evaluated the tool, achieving high accuracy (>0.88) and F1-scores (0.89-1.00).
- Revealed recurring issues like component overloading and duplicated logic in Angular apps.
Why it matters
This paper provides the first catalog of Angular-specific code smells, derived from community knowledge. It demonstrates the feasibility and effectiveness of automated detection, offering a crucial foundation for improving front-end code quality and future tool development.
Original Abstract
Angular is one of the most widely adopted frameworks for developing large-scale, dynamic web applications. As projects increase in scope and complexity, developers face growing challenges in managing architecture and maintaining clean, modular code. These challenges often lead to design flaws, commonly referred to as code smells. While React-specific smells have been cataloged in prior studies, limited knowledge exists regarding Angular-specific smells and how they manifest. This study investigates Angular code smells through a grey literature review, consolidating community knowledge and technical discussions. From the collected sources, 11 distinct Angular code smells were identified, 6 of which also occur in React-based systems, suggesting that some issues are cross-framework. Each smell was analyzed, exemplified, and grouped according to its technical characteristics. Based on the resulting catalog, we implemented an automated static analysis tool to detect Angular code smells. The tool was empirically evaluated using a manually validated dataset, and its effectiveness was assessed through standard information retrieval metrics. The evaluation results indicate high detection performance across all smells, achieving accuracy values above 0.88 and F1-scores ranging from 0.89 to 1.00. The findings reveal recurring issues such as component overloading, duplicated logic, and inefficient template bindings, reinforcing the relevance of systematic detection support. This study presents the first catalog of Angular-specific code smells derived from grey literature and demonstrates the feasibility and effectiveness of automated detection, providing a solid foundation for future empirical studies and tool development aimed at improving front-end code quality.
📬 Weekly AI Paper Digest
Get the top 10 AI/ML arXiv papers from the week — summarized, scored, and delivered to your inbox every Monday.