TY - GEN
T1 - Automated recommendation of software refactorings based on feature requests
AU - Nyamawe, Ally S.
AU - Liu, Hui
AU - Niu, Nan
AU - Umer, Qasim
AU - Niu, Zhendong
N1 - Publisher Copyright:
© 2019 IEEE.
PY - 2019/9
Y1 - 2019/9
N2 - 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 stateof-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%).
AB - 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 stateof-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%).
KW - Feature Requests
KW - Machine Learning
KW - Refactorings Recommendation
KW - Software Refactoring
UR - http://www.scopus.com/inward/record.url?scp=85076927644&partnerID=8YFLogxK
U2 - 10.1109/RE.2019.00029
DO - 10.1109/RE.2019.00029
M3 - Conference contribution
AN - SCOPUS:85076927644
T3 - Proceedings of the IEEE International Conference on Requirements Engineering
SP - 187
EP - 198
BT - Proceedings - 2019 IEEE 27th International Requirements Engineering Conference, RE 2019
A2 - Damian, Daniela
A2 - Perini, Anna
A2 - Lee, Seok-Won
PB - IEEE Computer Society
T2 - 27th IEEE International Requirements Engineering Conference, RE 2019
Y2 - 23 September 2019 through 27 September 2019
ER -