Code Smells Detection Across Programming Languages
code smells, detection, transfer learning, machine learning, deep learning, neural networks
During software development, the presence of code smells has been related to the degradation of software quality. Several studies present the importance of detecting smells in the source code and to apply refactoring. However, the existing approaches for detecting code smells are limited for certain programming languages. In this context, this work aims to extend the techniques of code smell detection using transfer learning by comparing the results of models built from two neural network architectures. For our study, we selected five programming languages that are among the 10 most used languages according to a survey conducted by StackOverflow in 2021: Java, C#, C++, Python and JavaScript. The results indicated that when applying transfer learning, the models were able to classify well the snippets of smelled code in other languages with the exception of the Python model, regardless of the model's architecture. These results can help developers and researchers to apply the same code smell detection strategies in different programming languages and use models and datasets that we make available.