Causal testing: understanding defects' root causes
Brittany Johnson, Yuriy Brun, Alexandra Meliou
Abstract
Understanding the root cause of a defect is critical to isolating and repairing buggy behavior. We present Causal Testing, a new method of root-cause analysis that relies on the theory of counterfactual causality to identify a set of executions that likely hold key causal information necessary to understand and repair buggy behavior. Using the Defects4J benchmark, we find that Causal Testing could be applied to 71% of real-world defects, and for 77% of those, it can help developers identify the root cause of the defect. A controlled experiment with 37 developers shows that Causal Testing improves participants' ability to identify the cause of the defect from 80% of the time with standard testing tools to 86% of the time with Causal Testing. The participants report that Causal Testing provides useful information they cannot get using tools such as JUnit. Holmes, our prototype, open-source Eclipse plugin implementation of Causal Testing, is available at http://holmes.cs.umass.edu/ . CCS CONCEPTS • Software and its engineering → Software testing and debugging.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Cited by top-tier papers20
- Causality-Based Neural Network RepairBing Sun, Jun Sun, Long H. Pham, Tie ShiICSE 2022 · 69 citations
- Unicorn: reasoning about configurable system performance through the lens of causalityMd Shahriar Iqbal, Rahul Krishna, Mohammad Ali Javidian, Baishakhi Ray et al.EuroSys 2022 · 60 citations
- When does my program do this? learning circumstances of software behaviorAlexander Kampmann, Nikolas Havrikov, Ezekiel O. Soremekun, Andreas ZellerFSE 2020 · 29 citations
- Causality in Configurable Software SystemsClemens Dubslaff, Kallistos Weis, Christel Baier, Sven ApelICSE 2022 · 24 citations
- Neural Network Semantic Backdoor Detection and Mitigation: A Causality-Based ApproachBing Sun, Jun Sun, Wayne Koh, Jie ShiUSENIX Security 2024 · 21 citations
Related papers
- How Does Killing Surviving Mutants Help Detect Real Bugs with Assertion Generation? A Controlled ExperimentHang Du, Vijay Krishna Palepu, James A. JonesISSTA 2026
- CausalRepair: Bridging the Causality Gap in Large Language Model-Based Automated Program Repair via Dual-SlicingLinhao Wu, Yizhou Chen, Zhen Yang, Pengyu Xue et al.ISSTA 2026
- Hypothesizer: A Hypothesis-Based Debugger to Find and Test Debugging HypothesesAbdulaziz Alaboudi, Thomas D. LaTozaUIST 2023 · 10 citations
- Prosecutor: Bayesian Counterfactual Fault LocalizationSara Baradaran, Yifei Huang, Wei Le, Mukund RaghothamanOOPSLA 2026
- Buildsheriff: Change-Aware Test Failure Triage for Continuous Integration BuildsChen Zhang, Bihuan Chen, Xin Peng, Wenyun ZhaoICSE 2022 · 10 citations
