Conditional-Based Refactorings and Fault-Proneness: An Empirical Study

Conditional-Based Refactorings and Fault-Proneness: An Empirical Study
复制标题

基于条件的重构和故障倾向:实证研究

DOI:
10.1109/icstw.2013.81
复制
发表时间:
2013
期刊:
2013 IEEE Sixth International Conference on Software Testing, Verification and Validation Workshops
影响因子:
--
通讯作者:
G. Concas
G. Concas
中科院分区:
--
文献类型:
--
作者:
S. Counsell;Matt Gatrell;R. Hierons;Alessandro Murgia;R. Tonelli;M. Marchesi;G. Concas

文献摘要

被引文献

相似文献

最近的实证工作表明,一些最常用的基于 Java 的重构与代码条件和标志的操作有关。此类代码的逻辑通常很复杂并且难以进行回归测试。因此,一个开放的研究问题涉及应用这些重构的类的错误倾向概况,相对于其他类的重构。在本文中,我们探讨了三个 Eclipse 项目的六个版本以及这些版本的重构类中的错误。我们探讨了四种特定的基于条件的重构,并假设:应用这四种重构的类往往具有相对较高的故障发生率,因为它们所操作的构造所赋予的嵌入式逻辑的固有复杂性。结果表明,四种重构中的一种特别适用于具有更高故障特征的类 - “用保护子句替换嵌套条件”重构。发现了一些证据,表明“删除控制标志”重构也适用于相对高度容易出错的类。相对于其他类型的重构,结果表明这两个有效地标记了容易出错的类。
Recent empirical work has shown that some of the most frequently applied Java-based refactorings relate to the manipulation of code conditionals and flags. The logic of such code is often complex and difficult to test regressively. One open research issue thus relates to the fault-proneness profiles of classes where these refactorings have been applied, vis-a-vis refactorings on other classes. In this paper, we explore six releases of three Eclipse projects and the faults in the refactored classes of those releases. We explore four specific conditional-based refactorings and the supposition that: classes where these four refactorings have been applied will tend to have relatively higher fault incidences because of the inherent complexity of the embedded logic given by the constructs they operate on. Results showed that one of the four refactorings in particular had been applied to classes with higher fault profiles - the `Replace Nested Conditional with Guard Clauses' refactoring. Some evidence that the `Remove Control Flag' refactoring had also been applied to relatively highly fault-prone classes was found. Relative to other types of refactoring, the result thus suggests that these two effectively signpost fault-prone classes.