Recommending refactorings via commit message analysis

Recommending refactorings via commit message analysis
复制标题

DOI:
10.1016/j.infsof.2020.106332
复制
发表时间:
2020-10
期刊:
Inf. Softw. Technol.
影响因子:
--
通讯作者:
Soumaya Rebai;Marouane Kessentini;Vahid Alizadeh;O. Sghaier;R. Kazman
Soumaya Rebai;Marouane Kessentini;Vahid Alizadeh;O. Sghaier;R. Kazman
中科院分区:
其他
文献类型:
--
作者:
Soumaya Rebai;Marouane Kessentini;Vahid Alizadeh;O. Sghaier;R. Kazman

文献摘要

被引文献

相似文献

背景软件重构或重构的目的是提高软件质量和开发人员的生产力。以前的研究主要依赖于对代码的静态和动态分析来检测和推荐重构机会,例如代码气味。一旦确定,这些气味通过应用重构来修复,然后改进一组质量度量。虽然这种方法有价值并且已经显示出有希望的结果,但是许多检测到的重构机会可能与开发人员的当前上下文和意图无关。最近的研究表明,虽然开发人员记录他们的重构意图,他们可能会错过相关的重构与他们的rationaligned.MethodIn本文中,我们首先确定重构机会,通过分析开发人员提交的消息,并检查质量改进的更改文件,然后我们将这些知识提炼成可用的上下文驱动的重构建议,以补充静态和动态分析的代码。ResultsThe评估我们的方法,基于六个开源项目,表明,我们优于以前的研究,应用重构的基础上静态和动态分析的代码along.ConclusionThis研究提供了令人信服的证据,使用现有的提交消息中包含的信息,建议未来的重构的价值。
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.