论文标题
使用进化耦合来在测试和代码单元之间建立相关链接。关于故障定位的案例研究
Using Evolutionary Coupling to Establish Relevance Links Between Tests and Code Units. A case study on fault localization
论文作者
论文摘要
许多软件工程技术,例如故障本地化,都根据测试和代码之间的相关关系来运行。这些关系通常是通过使用动态测试执行信息(测试执行跟踪)来推断这些关系的,该信息(测试执行跟踪)近似相关代码单元之间的链接并通过测试,程序行为主张。不幸的是,在实践中,由于仪器或生产环境的性质引入的间接费用,动态信息并不总是可用的。为了解决这个问题,我们提出了水泥,这是一种静态技术,它会自动侵入该项目的演变,从而自动渗透这种测试和代码关系。关键的想法是,开发人员在同一时期对测试和代码单位进行相关更改,即测试和代码单元的共同进化反映了它们之间的可能链接。我们评估了15个开源项目的水泥,并表明它确实捕获了相关链接。此外,我们执行了故障定位案例研究,在该案例研究中,我们将水泥与现有信息检索的故障定位(IRFL)技术进行比较,并表明其实现了可比的性能。对我们的结果的进一步分析表明,通过表明互补性的两种方法,成功定位的断层之间存在一个小的重叠。特别是,在39个成功的局部故障中,有两个是常见的,而水泥和IRFL本地化16和21。这些结果表明,测试和代码进化耦合可以有效地支持测试和调试活动。
Many software engineering techniques, such as fault localization, operate based on relevance relationships between tests and code. These relationships are often inferred through the use of dynamic test execution information (test execution traces) that approximate the link between relevant code units and asserted, by the tests, program behaviour. Unfortunately, in practice dynamic information is not always available due to the overheads introduced by the instrumentation or the nature of the production environments. To deal with this issue, we propose CEMENT, a static technique that automatically infers such test and code relationships given the projects' evolution. The key idea is that developers make relevant changes on test and code units at the same period of time, i.e., co-evolution of tests and code units reflects a probable link between them. We evaluate CEMENT on 15 open source projects and show that it indeed captures relevant links. Additionally, we perform a fault localization case study where we compare CEMENT with an existing Information Retrieval-based Fault Localization (IRFL) technique and show that it achieves comparable performance. A further analysis of our results reveals a small overlap between the faults successfully localized by the two approaches suggesting complementarity. In particular, out of the 39 successfully localized faults, two are common while CEMENT and IRFL localize 16 and 21. These results demonstrate that test and code evolutionary coupling can effectively support test and debugging activities.