当前位置: X-MOL 学术ACM Trans. Softw. Eng. Methodol. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Why Developers Refactor Source Code
ACM Transactions on Software Engineering and Methodology ( IF 6.6 ) Pub Date : 2020-09-26 , DOI: 10.1145/3408302
Jevgenija Pantiuchina 1 , Fiorella Zampetti 2 , Simone Scalabrino 3 , Valentina Piantadosi 4 , Rocco Oliveto 4 , Gabriele Bavota 1 , Massimiliano Di Penta 2
Affiliation  

Refactoring aims at improving code non-functional attributes without modifying its external behavior. Previous studies investigated the motivations behind refactoring by surveying developers. With the aim of generalizing and complementing their findings, we present a large-scale study quantitatively and qualitatively investigating why developers perform refactoring in open source projects. First, we mine 287,813 refactoring operations performed in the history of 150 systems. Using this dataset, we investigate the interplay between refactoring operations and process (e.g., previous changes/fixes) and product (e.g., quality metrics) metrics. Then, we manually analyze 551 merged pull requests implementing refactoring operations and classify the motivations behind the implemented refactorings (e.g., removal of code duplication). Our results led to (i) quantitative evidence of the relationship existing between certain process/product metrics and refactoring operations and (ii) a detailed taxonomy, generalizing and complementing the ones existing in the literature, of motivations pushing developers to refactor source code.

中文翻译:

为什么开发人员重构源代码

重构旨在在不修改其外部行为的情况下改进代码的非功能属性。以前的研究通过调查开发人员调查了重构背后的动机。为了概括和补充他们的发现,我们提出了一项大规模的定量和定性研究为什么开发人员在开源项目中执行重构。首先,我们挖掘了 150 个系统历史中执行的 287,813 次重构操作。使用这个数据集,我们研究了重构操作和过程(例如,以前的更改/修复)和产品(例如,质量指标)指标之间的相互作用。然后,我们手动分析实现重构操作的 551 个合并拉取请求,并对实现重构背后的动机进行分类(例如,删除代码重复)。我们的结果导致(i)某些流程/产品指标与重构操作之间存在关系的定量证据,以及(ii)详细的分类法,概括和补充文献中现有的分类法,推动开发人员重构源代码的动机。
更新日期:2020-09-26
down
wechat
bug