Mining commit messages to enhance software refactorings recommendation: A machine learning approach

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 require...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
Veröffentlicht in:Machine learning with applications 2022-09, Vol.9, p.100316, Article 100316
1. Verfasser: Nyamawe, Ally S.
Format: Artikel
Sprache:eng
Schlagworte:
Online-Zugang:Volltext
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
Beschreibung
Zusammenfassung: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. •Predicting and recommending refactoring when implementing feature requests.•Leveraging information in commit messages to enhance refactoring recommendation.•A binary classifier is used to predict the need for refactoring.•A multi-label classifier is used to recommend types of refactoring required.
ISSN:2666-8270
2666-8270
DOI:10.1016/j.mlwa.2022.100316