Poster: The Buggy Side of Code Refactoring: Understanding the Relationship Between Refactorings and Bug

Poster: The Buggy Side of Code Refactoring: Understanding the Relationship Between Refactorings and Bug
复制标题

海报:代码重构的错误方面:了解重构与错误之间的关系

DOI:
10.1145/3183440.3195030
复制
发表时间:
2018
期刊:
2018 IEEE/ACM 40th International Conference on Software Engineering: Companion (ICSE-Companion)
影响因子:
--
通讯作者:
R. Mello
R. Mello
中科院分区:
--
文献类型:
--
作者:
Isabella Ferreira;Eduardo Fernandes;Diego Cedrim;Anderson G. Uchôa;Ana Carla Bibiano;Alessandro F. Garcia;J. Correia;Filipe Santos;Gabriel Nunes;Caio Barbosa;B. Neto;R. Mello

文献摘要

被引文献

相似文献

软件开发人员广泛实践代码重构。有一个明确的假设,即代码重构改善了软件项目的结构质量,从而降低了其错误的倾向。但是,在实践中,重构通常以不同的目的应用。根据某些重构的复杂性,开发人员可能会在不知不觉中使源代码更容易患有错误。在本文中,我们介绍了5个Java开源项目的纵向研究,其中分析了20,689个重构和1,033个错误报告。我们发现,一旦对其进行了第一次更改,就会在重构代码中引入许多错误。此外,与其他更改结合进行的重构影响的代码元素比受纯重构影响的代码元素更容易患有错误。
Code refactoring is widely practiced by software developers. There is an explicit assumption that code refactoring improves the structural quality of a software project, thereby also reducing its bug proneness. However, refactoring is often applied with different purposes in practice. Depending on the complexity of certain refactorings, developers might unconsciously make the source code more susceptible to have bugs. In this paper, we present a longitudinal study of 5 Java open source projects, where 20,689 refactorings, and 1,033 bug reports were analyzed. We found that many bugs are introduced in the refactored code as soon as the first immediate change is made on it. Furthermore, code elements affected by refactorings performed in conjunction with other changes are more prone to have bugs than those affected by pure refactorings.