Automated Recommendation of Software Refactorings based on Feature Requests

被引:18
作者
Nyamawe, Ally S. [1 ]
Liu, Hui [1 ]
Niu, Nan [2 ]
Umer, Qasim [1 ]
Niu, Zhendong [1 ]
机构
[1] Beijing Inst Technol, Sch Comp Sci & Technol, Beijing, Peoples R China
[2] Univ Cincinnati, Dept Elect Engn & Comp Sci, Cincinnati, OH 45221 USA
来源
2019 27TH IEEE INTERNATIONAL REQUIREMENTS ENGINEERING CONFERENCE (RE 2019) | 2019年
基金
美国国家科学基金会; 中国国家自然科学基金;
关键词
Feature Requests; Machine Learning; Refactorings Recommendation; Software Refactoring; IMPACT; TRACEABILITY; REQUIREMENTS;
D O I
10.1109/RE.2019.00029
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
During software evolution, developers often receive new requirements expressed as feature requests. To implement the requested features, developers have to perform necessary modifications (refactorings) to prepare for new adaptation that accommodates the new requirements. Software refactoring is a well-known technique that has been extensively used to improve software quality such as maintainability and extensibility. However, it is often challenging to determine which kind of refactorings should be applied. Consequently, several approaches based on various heuristics have been proposed to recommend refactorings. However, there is still lack of automated support to recommend refactorings given a feature request. To this end, in this paper, we propose a novel approach that recommends refactorings based on the history of the previously requested features and applied refactorings. First, we exploit the state-of-the-art refactoring detection tools to identify the previous refactorings applied to implement the past feature requests. Second, we train a machine classifier with the history data of the feature requests and refactorings applied on the commits that implemented the corresponding feature requests. The machine classifier is then used to predict refactorings for new feature requests. We evaluate the proposed approach on the dataset of 43 open source Java projects and the results suggest that the proposed approach can accurately recommend refactorings (average precision 73%).
引用
收藏
页码:187 / 198
页数:12
相关论文
共 45 条
[1]  
Aggarwal CharuC., 2012, MINING TEXT DATA, DOI 10.1007/978-1-4614-3223-4_6
[2]   Change impact analysis for maintenance and evolution of variable software systems [J].
Angerer, Florian ;
Grimmer, Andreas ;
Praehofer, Herbert ;
Gruenbacher, Paul .
AUTOMATED SOFTWARE ENGINEERING, 2019, 26 (02) :417-461
[3]  
[Anonymous], 2002, P ACL 02 WORKSHOP EF
[4]  
[Anonymous], 2010, P 18 ACM SIGSOFT INT, DOI DOI 10.1145/1882291.1882353
[5]  
[Anonymous], 2008, Introduction to information retrieval
[6]  
Bavota Gabriele, 2014, Recommending Refactoring Operations in Large Software Systems, P387
[7]   On the Impact of Refactoring Operations on Code Quality Metrics [J].
Chaparro, Oscar ;
Bavota, Gabriele ;
Marcus, Andrian ;
Di Penta, Massimiliano .
2014 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE MAINTENANCE AND EVOLUTION (ICSME), 2014, :456-460
[8]  
Dig D, 2006, LECT NOTES COMPUT SC, V4067, P404
[9]  
Fokaefs Marios, 2007, 2007 IEEE International Conference on Software Maintenance, P519, DOI 10.1109/ICSM.2007.4362679
[10]  
Fowler Martin, 1999, AW OBJ TECHNOL S