Automated recommendation of software refactorings based on feature requests

Ally S. Nyamawe, Hui Liu*, Nan Niu, Qasim Umer, Zhendong Niu

*Corresponding author for this work

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

25 Citations (Scopus)

Abstract

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%).

Original languageEnglish
Title of host publicationProceedings - 2019 IEEE 27th International Requirements Engineering Conference, RE 2019
EditorsDaniela Damian, Anna Perini, Seok-Won Lee
PublisherIEEE Computer Society
Pages187-198
Number of pages12
ISBN (Electronic)9781728139128
DOIs
Publication statusPublished - Sept 2019
Event27th IEEE International Requirements Engineering Conference, RE 2019 - Jeju Island, Korea, Republic of
Duration: 23 Sept 201927 Sept 2019

Publication series

NameProceedings of the IEEE International Conference on Requirements Engineering
Volume2019-September
ISSN (Print)1090-705X
ISSN (Electronic)2332-6441

Conference

Conference27th IEEE International Requirements Engineering Conference, RE 2019
Country/TerritoryKorea, Republic of
CityJeju Island
Period23/09/1927/09/19

Keywords

  • Feature Requests
  • Machine Learning
  • Refactorings Recommendation
  • Software Refactoring

Fingerprint

Dive into the research topics of 'Automated recommendation of software refactorings based on feature requests'. Together they form a unique fingerprint.

Cite this