Abstract:Fault localization and program repair techniques have been extensively studied for over decades; their only connection is that fault localization serves as a supplier diagnosing potential buggy code for automated program repair. Recently, unified debugging has been proposed to unify fault localization and program repair in the other direction for the first time to boost both areas. ProFL, the first work on unified debugging, opens a new dimension that the large volume of patch execution information during program repair in turn can help boost state-of-the-art fault localization. Note that even state-of-the-art program repair techniques can only fix a small ratio of real bugs (e.g., < 20% for Defects4J) and simply abort for the vast majority of unfixed bugs. In contrast, unified debugging not only directly fixes bugs when possible, but also provides debugging hints for bugs that cannot be automatically fixed (e.g., the patch execution information from such unsuccessful repair can still help boost fault localization for manual repair). Although demonstrated to be a promising direction, unified debugging relies on massive test executions (i.e., million test executions) and can cost hours for execution. This work proposes AUDE to accelerate unified debugging by reducing test executions that provide little helpful feedback for improving fault localization. Specifically, AUDE first constructs an initial execution order of patches guided by Markov chain Monte Carlo sampling strategy, and then adaptively estimates the likelihood of each patch being informative during patch execution on-the-fly. The results on the widely-used Defejcts4J benchmark show that AUDE significantly accelerates ProFL by reducing 70.29% of test executions with negligible effectiveness drop in both fault localization and program repair, e.g., AUDE can localize the same number of bug methods at Top-1/Top-3/Top-5 as ProFL.