Detecting Code Smell with a Deep Learning System - Nizam, Ali; Avar, Muhammed Yahya; Adaş, Ömer Kaan; Yanık, Ahmet (IEEE, 2023)
Code smell detection is one of the most significant issues in the software industry. Metric-based static code analysis tools are used to detect undesirable coding practices known as code smells and guide refactoring requirements. Furthermore, the usage of deep learning-based techniques has emerged in code analysis tasks. The line and block level detection capability of metric-based tools provides an advantage over deep learning system systems. This study aims to develop a deep learning-based system for inter-procedural code smell detection supporting line and block of code. We created an experimental dataset by gathering code from GitHub repositories and detecting code smell on these codes using the metric-based SonarQube tool. Recurrent neural networks and transformers implementations of deep neural networks were applied to detect code smells. We also employed cosine similarity and k-Nearest Neighbor machine learning techniques for a comprehensive comparison. The proposed system achieves an average accuracy of approximately 80%. These findings indicate that the proposed system can help software teams in identifying potential interprocedural code smells.
Keywords: Code Smell; Machine Learning; Deep Learning