Skip to main navigation Skip to search Skip to main content

Feature requests-based recommendation of software refactorings

  • Ally S. Nyamawe
  • , Hui Liu*
  • , Nan Niu
  • , Qasim Umer
  • , Zhendong Niu
  • *Corresponding author for this work

Research output: Contribution to journalArticlepeer-review

25 Scopus citations

Abstract

Software requirements are ever-changing which often leads to software evolution. Consequently, throughout software lifetime, developers receive new requirements often expressed as feature requests. To implement the requested features, developers sometimes apply refactorings to make their systems adapt to the new requirements. However, deciding what refactorings to apply is often challenging and there is still lack of automated support to recommend refactorings given a feature request. To this end, we propose a learning-based approach that recommends refactorings based on the history of the previously requested features, applied refactorings, and code smells information. First, the state-of-the-art refactoring detection tools are leveraged to identify the previous refactorings applied to implement the past feature requests. Second, a machine classifier is trained with the history data of the feature requests, code smells, and refactorings applied on the respective commits. Consequently, the machine classifier is used to predict refactorings for new feature requests. The proposed approach is evaluated on the dataset of 55 open source Java projects and the results suggest that it can accurately recommend refactorings (accuracy is up to 83.19%).

Original languageEnglish
Pages (from-to)4315-4347
Number of pages33
JournalEmpirical Software Engineering
Volume25
Issue number5
DOIs
StatePublished - 1 Sep 2020
Externally publishedYes

Bibliographical note

Publisher Copyright:
© 2020, Springer Science+Business Media, LLC, part of Springer Nature.

Keywords

  • Code smells
  • Feature requests
  • Machine learning
  • Recommendation
  • Software refactoring

ASJC Scopus subject areas

  • Software

Fingerprint

Dive into the research topics of 'Feature requests-based recommendation of software refactorings'. Together they form a unique fingerprint.

Cite this