Hunting bugs: Towards an automated approach to identifying which change caused a bug through regression testing

Michel Maes-Bermejo,Alexander Serebrenik, Micael Gallego, Francisco Gortázar,Gregorio Robles, Jesús María González Barahona

Empirical Software Engineering(2024)

引用 0|浏览3
暂无评分
摘要
Finding code changes that introduced bugs is important both for practitioners and researchers, but doing it precisely is a manual, effort-intensive process. The perfect test method is a theoretical construct aimed at detecting Bug-Introducing Changes (BIC) through a theoretical perfect test. This perfect test always fails if the bug is present, and passes otherwise. To explore a possible automatic operationalization of the perfect test method. To use regression tests as substitutes for the perfect test. For this, we transplant the regression tests to past snapshots of the code, and use them to identify the BIC, on a well-known collection of bugs from the Defects4J dataset. From 809 bugs in the dataset, when running our operationalization of the perfect test method, for 95 of them the BIC was identified precisely and in the remaining 4 cases, a list of candidates including the BIC was provided. We demonstrate that the operationalization of the perfect test method through regression tests is feasible and can be completely automated in practice when tests can be transplanted and run in past snapshots of the code. Given that implementing regression tests when a bug is fixed is considered a good practice, when developers follow it, they can detect effortlessly bug-introducing changes by using our operationalization of the perfect test method.
更多
查看译文
关键词
Bug origins,Bug-introducing changes,First-failing change,SZZ algorithm,Software Testing,Regression Testing
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要