How does refactoring affect internal quality attributes?: A multi-project study

How does refactoring affect internal quality attributes?: A multi-project study
复制标题

重构如何影响内部质量属性?:多项目研究

DOI:
--
复制
发表时间:
2017
期刊:
Brazilian Symposium on Software Engineering
影响因子:
--
通讯作者:
Alessandro F. Garcia
Alessandro F. Garcia
中科院分区:
--
文献类型:
--
作者:
Alexander Chávez;Isabella Ferreira;Eduardo Fernandes;Diego Cedrim;Alessandro F. Garcia

文献摘要

被引文献

相似文献

重构是开发人员沿着软件维护和演化过程中常用的一种技术。软件重构有望提高软件项目的内部质量属性,如耦合和内聚。然而,有有限的理解在何种程度上开发人员实现这一期望时,重构他们的源代码。本研究调查了重构操作如何影响五个众所周知的内部质量属性:凝聚力,耦合,复杂性,继承性和大小。为此,我们分析了23个开源项目的版本历史,其中包含29,303次重构操作。我们的分析揭示了有趣的观察结果。首先,我们注意到开发人员将超过94%的重构操作应用于至少具有一个关键内部质量属性的代码元素,而不是以前的工作。其次,65%的重构操作改善了其相关的内部质量属性,其余35%的操作保持质量属性不受影响。第三,当应用纯重构操作(所谓的根管重构)时,我们确认内部质量属性要么经常得到改善,要么至少没有恶化。最后,虽然重构操作通常会达到其他特定的目的,例如添加新功能或修复错误,但这些操作中有55%令人惊讶地提高了内部质量属性,而只有10%的质量下降。
Refactoring is a technique commonly applied by developers along the software maintenance and evolution. Software refactoring is expected to improve the internal quality attributes of a software project, such as coupling and cohesion. However, there is limited understanding on to what extent developers achieve this expectation when refactoring their source code This study investigates how refactoring operations affect five well-known internal quality attributes: cohesion, coupling, complexity, inheritance, and size. For this purpose, we analyze the version history of 23 open source projects with 29,303 refactoring operations. Our analysis revealed interesting observations. First, we noticed that developers apply more than 94% of the refactoring operations to code elements with at least one critical internal quality attribute, as opposed to previous work. Second, 65% of the refactoring operations improve their related internal quality attributes and the remaining 35% operations keep the quality attributes unaffected. Third, whenever pure refactoring operations are applied (the so-called root-canal refactoring), we confirm that internal quality attributes are either frequently improved or at least not worsened. Finally, while refactoring operations often reach other specific aims, such as adding a new feature or fixing a bug, 55% of these operations surprisingly improve internal quality attributes against only 10% of quality decline.