Large language model (LLM) agents integrate external tools with one or more LLMs to accomplish specific tasks. Agents have rapidly been adopted by developers, and they are starting to be deployed in industrial workflows, such as their use to fix static analysis issues from the widely used SonarQube static analyzer. However, the growing importance of agents means their actions carry greater impact and potential risk. Thus, to use them at scale, an additional layer of trust and evidence is necessary. This work presents AutoCodeSherpa, a technique that provides explanations of software issues in the form of symbolic formulae. Inspired by the reachability, infection, and propagation model of software faults, the explanations are composed of input, infection, and output conditions, collectively providing a specification of the issue. In practice, the symbolic explanation is implemented as a combination of a property-based test (PBT) and program-internal symbolic expressions. Critically, this means our symbolic explanations are executable and can be automatically evaluated, unlike natural language explanations. Experiments show the generated conditions are highly accurate. For example, input conditions from AutoCodeSherpa had an accuracy of 85.7%. This high accuracy makes symbolic explanations particularly useful in two scenarios. First, the explanations can be used in automated issue resolution environments to decide whether to accept or reject patches from issue resolution agents; AutoCodeSherpa could reject 2x as many incorrect patches as baselines did. Secondly, as agentic AI approaches continue to develop, program analysis driven explanations like ours can be provided to other LLM-based repair techniques which do not employ analysis to improve their output. In our experiments, our symbolic explanations could improve the plausible patch generation rate of the Agentless technique by 60%.
@inproceedings{kang2026acs,title={{AutoCodeSherpa}: Symbolic Explanations in {AI} Coding Agents},author={Kang*, Sungmin and Ruan*, Haifeng and Roychoudhury, Abhik},year={2026},booktitle={Proceedings of the 35th International Symposium on Software Testing and Analysis},series={ISSTA 2026},}
A Quantitative and Qualitative Evaluation of LLM-based Explainable Fault Localization
Fault Localization (FL), in which a developer seeks to identify which part of the code is malfunctioning and needs to be fixed, is a recurring challenge in debugging. To reduce developer burden, many automated FL techniques have been proposed. However, prior work has noted that existing techniques fail to provide rationales for the suggested locations, hindering developer adoption of these techniques. With this in mind, we propose AutoFL, a Large Language Model (LLM)-based FL technique that generates an explanation of the bug along with a suggested fault location. AutoFL prompts an LLM to use function calls to navigate a repository, so that it can effectively localize faults over a large software repository and overcome the limit of the LLM context length. Extensive experiments on 798 real-world bugs in Java and Python reveal AutoFL improves method-level acc@1 by up to 233.3% over baselines. Furthermore, developers were interviewed on their impression of AutoFL-generated explanations, showing that developers generally liked the natural language explanations of AutoFL, and that they preferred reading a few, high-quality explanations instead of many.
@article{kang2024autofl,title={A Quantitative and Qualitative Evaluation of LLM-based Explainable Fault Localization},journal={Proceedings of the ACM on Software Engineering},number={FSE},pages={1424-1446},volume={1},issue={FSE},author={Kang*, Sungmin and An*, Gabin and Yoo, Shin},year={2024},}
Debugging takes up a significant portion of developer time. As a result,
automated debugging techniques including Fault Localization (FL) and Automated
Program Repair (APR) have garnered significant attention due to their potential
to aid developers in debugging tasks. With the recent advance in techniques that treat the two tasks as closely coupled, such as Unified Debugging, a framework to formally express these two tasks together would heighten our understanding of automated debugging
and provide a way to formally analyze techniques and approaches. To this end,
we propose a Bayesian framework of understanding automated debugging. We
find that the Bayesian framework, along with a concrete statement of the objective of
automated debugging, can recover maximal fault localization formulae from
prior work, as well as analyze existing APR techniques and their underlying
assumptions.
As a means of empirically demonstrating our framework, we further propose
BAPP, a Bayesian Patch Prioritization technique that incorporates intermediate program values
to analyze likely patch locations and repair actions, with its core equations
being derived by our Bayesian framework. We find that incorporating program
values allows BAPP to identify correct patches more precisely:
the rankings produced by BAPP reduced the number of
required patch evaluations by 68% and consequently reduced the repair
time by 34 minutes on average. Further, our Bayesian framework suggests a number of
changes to the way fault localization information is used in program repair,
which we validate is useful for BAPP.
These results highlight the potential of value-cognizant automated debugging
techniques, and further verifies our theoretical framework.
@inproceedings{Kang2023bb,author={Kang*, Sungmin and Choi*, Wonkeun and Yoo, Shin},booktitle={Proceedings of the 32nd International Symposium on Software Testing and Analysis},series={ISSTA 2023},title={A Bayesian Framework for Automated Debugging},year={2023},}
Large Language Models are Few-shot Testers: Exploring LLM-based General Bug Reproduction
Many automated test generation techniques have been developed to aid developers with writing tests. To facilitate full automation, most existing techniques aim to either increase coverage, or generate exploratory inputs. However, existing test generation techniques largely fall short of achieving more semantic objectives, such as generating tests to reproduce a given bug report. Reproducing bugs is nonetheless important, as our empirical study shows that the number of tests added in open source repositories due to issues was about 28% of the corresponding project test suite size. Meanwhile, due to the difficulties of transforming the expected program semantics in bug reports into test oracles, existing failure reproduction techniques tend to deal exclusively with program crashes, a small subset of all bug reports. To automate test generation from general bug reports, we propose LIBRO, a framework that uses Large Language Models (LLMs), which have been shown to be capable of performing code-related tasks. Since LLMs themselves cannot execute the target buggy code, we focus on post-processing steps that help us discern when LLMs are effective, and rank the produced tests according to their validity. Our evaluation of LIBRO shows that, on the widely studied Defects4J benchmark, LIBRO can generate failure reproducing test cases for 33% of all studied cases (251 out of 750), while suggesting a bug reproducing test in first place for 149 bugs. To mitigate data contamination, we also evaluate LIBRO against 31 bug reports submitted after the collection of the LLM training data terminated: LIBRO produces bug reproducing tests for 32% of the studied bug reports. Overall, our results show LIBRO has the potential to significantly enhance developer efficiency by automatically generating tests from bug reports.
@inproceedings{Kang2023aa,author={Kang*, Sungmin and Yoon*, Juyeon and Yoo, Shin},booktitle={Proceedings of the 45th IEEE/ACM International Conference on Software Engineering},series={ICSE 2023},title={Large Language Models are Few-shot Testers: Exploring LLM-based General Bug Reproduction},year={2023}}