Deep Learning Based Feature Envy Detection

被引:71
作者
Liu, Hui [1 ]
Xu, Zhifeng [1 ]
Zou, Yanzhen [2 ,3 ]
机构
[1] Beijing Inst Technol, Sch Comp Sci & Technol, Beijing, Peoples R China
[2] Peking Univ, Minist Educ, Key Lab High Confidence Software Technol, Beijing, Peoples R China
[3] Peking Univ, Sch Elect Engn & Comp Sci, Beijing, Peoples R China
来源
PROCEEDINGS OF THE 2018 33RD IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMTED SOFTWARE ENGINEERING (ASE' 18) | 2018年
基金
中国国家自然科学基金;
关键词
Feature Envy; Deep Learning; Software Refactoring; Code Smells; SMELLS; REFACTORINGS;
D O I
10.1145/3238147.3238166
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Software refactoring is widely employed to improve software quality. A key step in software refactoring is to identify which part of the software should be refactored. To facilitate the identification, a number of approaches have been proposed to identify certain structures in the code (called code smells) that suggest the possibility of refactoring. Most of such approaches rely on manually designed heuristics to map manually selected source code metrics to predictions. However, it is challenging to manually select the best features, especially textual features. It is also difficult to manually construct the optimal heuristics. To this end, in this paper we propose a deep learning based novel approach to detecting feature envy, one of the most common code smells. The key insight is that deep neural networks and advanced deep learning techniques could automatically select features (especially textual features) of source code for feature envy detection, and could automatically build the complex mapping between such features and predictions. We also propose an automatic approach to generating labeled training data for the neural network based classifier, which does not require any human intervention. Evaluation results on open-source applications suggest that the proposed approach significantly improves the state-of-the-art in both detecting feature envy smells and recommending destinations for identified smelly methods.
引用
收藏
页码:385 / 396
页数:12
相关论文
共 49 条
[1]   Identifying refactoring opportunities in object-oriented code: A systematic literature review [J].
Al Dallal, Jehad .
INFORMATION AND SOFTWARE TECHNOLOGY, 2015, 58 :231-249
[2]  
Amorim L, 2015, 2015 IEEE 26TH INTERNATIONAL SYMPOSIUM ON SOFTWARE RELIABILITY ENGINEERING (ISSRE), P261, DOI 10.1109/ISSRE.2015.7381819
[3]  
[Anonymous], 2016, 2016 IEEE 24th International Conference on Program Comprehension (ICPC)
[4]   REPENT: Analyzing the Nature of Identifier Renamings [J].
Arnaoudova, Venera ;
Eshkevari, Laleh M. ;
Di Penta, Massimiliano ;
Oliveto, Rocco ;
Antoniol, Giuliano ;
Gueheneuc, Yann-Gael .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2014, 40 (05) :502-532
[5]   Methodbook: Recommending Move Method Refactorings via Relational Topic Models [J].
Bavota, Gabriele ;
Oliveto, Rocco ;
Gethers, Malcom ;
Poshyvanyk, Denys ;
De Lucia, Andrea .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2014, 40 (07) :671-694
[6]   Noise-Resistant Deep Learning for Object Classification in Three-Dimensional Point Clouds Using a Point Pair Descriptor [J].
Bobkov, Dmytro ;
Chen, Sili ;
Jian, Ruiqing ;
Iqbal, Muhammad Z. ;
Steinbach, Eckehard .
IEEE ROBOTICS AND AUTOMATION LETTERS, 2018, 3 (02) :865-872
[7]  
Chollet F., 2018, Keras: Thepython deep learning library, pascl
[8]  
Di Nucci D, 2018, 2018 25TH IEEE INTERNATIONAL CONFERENCE ON SOFTWARE ANALYSIS, EVOLUTION AND REENGINEERING (SANER 2018), P612, DOI 10.1109/SANER.2018.8330266
[9]   Comparing and experimenting machine learning techniques for code smell detection [J].
Fontana, Francesca Arcelli ;
Mantyla, Mika V. ;
Zanoni, Marco ;
Marino, Alessandro .
EMPIRICAL SOFTWARE ENGINEERING, 2016, 21 (03) :1143-1191
[10]   Code smell severity classification using machine learning techniques [J].
Fontana, Francesca Arcelli ;
Zanoni, Marco .
KNOWLEDGE-BASED SYSTEMS, 2017, 128 :43-58