当前位置: X-MOL 学术Inf. Softw. Technol. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Recommending refactorings via commit message analysis
Information and Software Technology ( IF 3.8 ) Pub Date : 2020-05-15 , DOI: 10.1016/j.infsof.2020.106332
Soumaya Rebai , Marouane Kessentini , Vahid Alizadeh , Oussama Ben Sghaier , Rick Kazman

Context

The purpose of software restructuring, or refactoring, is to improve software quality and developer productivity.

Objective

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

Method

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

Results

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

Conclusion

This study provides compelling evidence of the value of using the information contained in existing commit messages to recommend future refactorings.



中文翻译:

通过提交消息分析推荐重构

语境

软件重组或重构的目的是提高软件质量和开发人员的生产率。

目的

先前的研究主要依靠对代码的静态和动态分析来检测和建议重构机会,例如代码气味。一旦识别出这些气味,就可以通过应用重构来解决这些问题,然后再改进一组质量指标。尽管这种方法具有价值并已显示出令人鼓舞的结果,但许多检测到的重构机会可能与开发人员当前的环境和意图无关。最近的研究表明,尽管开发人员记录了他们的重构意图,但他们可能会错过与其理由相符的相关重构。

方法

在本文中,我们首先通过分析开发人员的提交消息并检查已更改文件中的质量改进来确定重构机会,然后将这些知识提炼成可用的上下文驱动的重构建议,以补充对代码的静态和动态分析。

结果

根据六个开源项目对我们的方法进行的评估表明,我们的性能优于先前的研究,后者仅基于对代码的静态和动态分析而应用了重构。

结论

这项研究提供了令人信服的证据,证明了使用现有提交消息中包含的信息来推荐将来的重构的价值。

更新日期:2020-05-15
down
wechat
bug