Abstract

Software refactoring is the common practice that is applied to improve the internal structure of software systems without altering their external behaviors. Software developers sometimes apply refactoring to prepare software systems for further extensions of requirements or adaptation to new requirements often presented as feature requests. However, in such context, identifying where and what type of refactoring to use is very challenging and mostly relies on developer’s intuition and experience. To facilitate refactorings selection during feature requests implementation, existing studies have relied on the past software change history to predict and recommend future refactorings. However, none of these approaches have attempted to exploit the potential of commit messages to drive refactoring recommendation. To this end, this paper proposes a machine-learning approach trained with the past history of previously applied refactorings detected using both traditional refactoring detectors and analysis of commit messages. The approach implements binary classifier to predict the need for refactoring, and a multi-label classifier to recommend required refactorings. The evaluation of the proposed approach based on the dataset comprised of commit messages of 65 open source projects suggest that, the approach significantly outperforms the state-of-the-art approach.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call