Evaluating the Impact of Explainable AI on Trust in AI-Assisted Code Review
Zhenhan Gao, Marvin Muñoz Barón, Umm-e Habiba, Daniel Graziotin, Stefan Wagner
Abstract
Background: Large language models (LLMs) are increasingly used to automate code review, but the reasoning behind their decisions remains hard to understand. Developers struggle to assess the validity of LLM-generated reviews, making it difficult to gauge how much trust to place in them. The role of Explainable AI (XAI) in code review and its impact on trust remain underexplored. Objective: We study the influence of XAI on developer trust in AI-assisted code reviews. Method: We conducted a within-subjects user study with 34 participants, comparing three LLM-based code review systems with varying levels of XAI support: Condition A (detailed explanation and review feedback), Condition B (review feedback only), and Condition C (no explanations). Participants reviewed real-world code change requests alongside the AI-generated reviews. We measured trust perceptions, agreement with the AI recommendation, the reasoning given for each decision, and the time taken. Results: The level of explanation significantly influences both trust and agreement with AI recommendations, but in different ways. Full explanations (A) yield the highest perceived trust (M = 3.99/5) but not the highest agreement, whereas moderate explanations (B) achieve the highest agreement (89.22%). This could suggest that more explanation prompts developers to question AI recommendations more frequently. No explanations (C) results in the lowest trust and agreement. Explanation level did not significantly affect review time. The most commonly cited reasons for decisions were code readability and correctness. Conclusion: Incorporating XAI into code review significantly changes trust perceptions and agreement with AI recommendations. These results inform the design and evaluation of trustworthy AI-based code review systems, as well as studies on the human factors of AI-assisted software development.
Create a lesson
Metadata
- Categories
- cs.SE, cs.AI, cs.HC
- Comments
- 23 pages, 4 figures, 5 tables. To appear in Proceedings of the ACM on Software Engineering (PACMSE), Vol. 3, No. ISSTA, Article ISSTA093 (ISSTA 2026). Published under CC BY 4.0. Replication package: https://doi.org/10.5281/zenodo.21457282
Related papers
TrustChain-Review: A Risk-Adaptive Blockchain and Game-Theoretic Framework for Trustworthy AI-Assisted Code Review
Shared title terminologycs.SEMohammad Naserameri
The Impact of LLM-Assistants on Software Developer Productivity: A Systematic Review and Mapping Study
Shared title terminologycs.SEAmr Mohamed, Maram Assi, Mariam Guizani
Code Review is a Conversation: Toward Conversational AI Review Assistants
Shared title terminologycs.SERosalia Tufano
Agentic AI-assisted coding offers a unique opportunity to instill epistemic grounding during software development
Shared title terminologycs.SEMagnus Palmblad, Jared M. Ragland, Benjamin A. Neely
SpecEngineeringBench: Evaluating Coding Agents as Autonomous Specification Engineers
Shared title terminologycs.SEXingjian Wang, Shijian Wang, Minghao Liu et al.
Diffs Are Cheap, Show Me the Trajectory: An Empirical Study of Trajectory-Informed Code Review
Shared title terminologycs.SEZijian Luo, Pengfei Gao, Dayi Lin et al.