Improved Bug Localization with AI Agents Leveraging Hypothesis and Dynamic Cognition
Software bugs cost companies billions annually and cause developers to spend roughly 50% of their time on bug resolution. Traditional methods for bug localization often analyze the suspiciousness of code components (e.g., methods, documents) in isolation, overlooking their connections with other components in the codebase. Recent advances in Large Language Models (LLMs) and agentic AI techniques have shown strong potential for code understanding, but still lack causal reasoning during code exploration and struggle to manage growing context effectively, limiting their capability. In this paper, we present a novel agentic technique for bug localization –CogniGent– that overcomes the limitations above by leveraging multiple AI agents capable of causal reasoning, call-graph-based root cause analysis and context engineering. It emulates developers-inspired debugging practices (a.k.a., dynamic cognitive debugging) and conducts hypothesis testing to support bug localization. We evaluate CogniGent on a curated dataset of 591 bug reports using three widely adopted performance metrics and compare it against five established baselines from the literature. Experimental results show that our technique consistently outperformed existing traditional and LLM-based techniques, achieving MAP improvements of 23.33-38.57% at the document and method levels. Similar gains were observed in MRR, with increases of 25.14-53.74% at both granularity levels. Statistical significance tests also confirm the superiority of our technique. By addressing the reasoning, dependency, and context limitations, CogniGent advances the state of bug localization, bridging human-like cognition with agentic automation for improved performance.
Mon 13 AprDisplayed time zone: Brasilia, Distrito Federal, Brazil change
16:00 - 18:00 | Session 7 - LLM-Based Agents for Software Engineering TasksJournal First / Replications and Negative Results (RENE) / Research Track / ICPC Program at Europa II Chair(s): Wesley K.G. Assunção North Carolina State University, Banani Roy University of Saskatchewan | ||
16:00 10mTalk | LLMs for Qualitative Data Analysis Fail on Security-specific Comments in Human Experiments Replications and Negative Results (RENE) Maria Camporese University of Trento, Fabio Massacci University of Trento; Vrije Universiteit Amsterdam, Yuanjun Gong University of Trento Pre-print File Attached | ||
16:10 10mTalk | Do comments and expertise still matter? An experiment on programmers’ adoption of AI-generated JavaScript code Journal First Changwen LI , Christoph Treude Singapore Management University, Ofir Turel The University of Melbourne | ||
16:20 10mTalk | Reducing Token Usage of State-in-Context Agents using Minification Replications and Negative Results (RENE) | ||
16:30 10mTalk | Agile Story-Point Estimation: Is RAG a Better Way to Go? Replications and Negative Results (RENE) Lamyea Maha University of Saskatchewan, Tajmilur Rahman Gannon University, Chanchal K. Roy University of Saskatchewan DOI Pre-print | ||
16:40 10mTalk | Improved Bug Localization with AI Agents Leveraging Hypothesis and Dynamic Cognition Research Track Pre-print Media Attached | ||
16:50 10mTalk | Code Ranking with Human-Inspired Agent-Based Framework Research Track Liuwen Cao South China University of Technology, liang jiaxi , Jiexin Wang South China University of Technology, Yi Cai School of Software Engineering, South China University of Technology, Guangzhou, China | ||
17:00 20mLive Q&A | Joint QA and Discussion ICPC Program | ||
17:20 40mAwards | ICPC Awards and Closing Session ICPC Program | ||