Abstract [eng] |
Existing code smells detection solutions rely on software metrics handcrafting for every system, therefore, it is not possible to easily apply the same solution for different software systems. The main objective of this work is to propose a machine-learning model that is able to detect code smells using automatically detected source code syntactic and semantic features. External pretrained attention neural network Code2Vec and long short-term memory recurrent neural network (LSTM) were tried for source code features extraction. In this work, a transfer learning based model was proposed which uses LSTM for source code features extraction and feed forward neural network for code smells classification. The proposed model with automatic features learning showed only slightly worse results in classification of large class, data class and long method smells than a model with handcrafted features. Thus, the proposed model can be applied for different software systems without additional changes. |