Recommending refactorings via commit message analysis
Recommending refactorings via commit message analysis
复制标题
DOI:
10.1016/j.infsof.2020.106332
复制
发表时间:
2020-10
期刊:
影响因子:
--
通讯作者:
Soumaya Rebai;Marouane Kessentini;Vahid Alizadeh;O. Sghaier;R. Kazman
中科院分区:
文献类型:
--
作者:
Soumaya Rebai;Marouane Kessentini;Vahid Alizadeh;O. Sghaier;R. Kazman
ContextThe purpose of software restructuring, or refactoring, is to improve software quality and developer productivity.ObjectivePrior studies have relied mainly on static and dynamic analysis of code to detect and recommend refactoring opportunities, such as code smells. Once identified, these smells are fixed by applying refactorings which then improve a set of quality metrics. While this approach has value and has shown promising results, many detected refactoring opportunities may not be related to a developer’s current context and intention. Recent studies have shown that while developers document their refactoring intentions, they may miss relevant refactorings aligned with their rationale.MethodIn this paper, we first identify refactoring opportunities by analyzing developer commit messages and check the quality improvements in the changed files, then we distill this knowledge into usable context-driven refactoring recommendations to complement static and dynamic analysis of code.ResultsThe evaluation of our approach, based on six open source projects, shows that we outperform prior studies that apply refactorings based on static and dynamic analysis of code alone.ConclusionThis study provides compelling evidence of the value of using the information contained in existing commit messages to recommend future refactorings.