How does refactoring affect internal quality attributes?: A multi-project study
How does refactoring affect internal quality attributes?: A multi-project study
复制标题
重构如何影响内部质量属性?:多项目研究
DOI:
--
复制
发表时间:
2017
期刊:
影响因子:
--
通讯作者:
Alessandro F. Garcia
中科院分区:
文献类型:
--
作者:
Alexander Chávez;Isabella Ferreira;Eduardo Fernandes;Diego Cedrim;Alessandro F. Garcia
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.