使用演化耦合在测试和代码单元之间建立相关性链接。故障定位实例研究
Using Evolutionary Coupling to Establish Relevance Links Between Tests and Code Units. A case study on fault localization
摘要:
许多软件工程技术,例如故障定位,都是基于测试和代码之间的相关关系来操作的。这些关系通常是通过使用动态测试执行信息(测试执行跟踪)来推断的,这些信息近似于相关代码单元之间的联系,并由测试断言程序行为。不幸的是,在实践中,动态信息并不总是可用的,由于仪器或生产环境的性质引入的开销。为了解决这个问题,我们提出了CEMENT,这是一种静态技术,它可以自动推断出项目发展过程中的测试和代码关系。关键思想是开发人员在同一时间段内对测试和代码单元进行相关更改,即,测试和代码单元的共同进化反映了它们之间可能的联系。我们在15个开源项目上评估了CEMENT,并表明它确实捕获了相关链接。此外,我们进行了故障定位的案例研究,我们比较水泥与现有的信息检索为基础的故障定位(IRFL)技术,并表明它达到了相当的性能。我们的结果的进一步分析表明,成功定位的两种方法,建议互补性的故障之间的小重叠。特别是,在39个成功定位的故障中,两个是常见的,而CEMENT和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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。