CLEW: Log-Anchored Backward Tracing for Root-Cause Code Localization
Wenji Bai, Muhammad Waseem, Jaakko Peltonen, Pekka Abrahamsson
Key points
From the paper's conclusion- These results suggest that CLEW can combine function-level localization with evidence links and runtime efficiency under the evaluated conditions.
Abstract
Failures in industrial software systems may involve multiple components and be difficult to reproduce outside the production environment. Root-cause code localization therefore often relies on issue descriptions and runtime logs. However, log evidence may be noisy or incomplete, and the code reporting a symptom may differ from the code containing the underlying defect. These conditions make it challenging to identify relevant log evidence and determine which functions could have caused the reported failure. To address this gap, we introduce CLEW, an agentic approach that combines rule-based log-to-code anchoring with LLM-guided backward code tracing. CLEW organizes selected observations into diagnostic states, guides source exploration from anchored symptom functions, and returns ranked candidate functions, an affected module, and an explanation comprising a proposed mechanism path and associated log events. For evaluation, we construct LogLoc, a benchmark comprising 192 real-world issue and fault-injection cases. Against three baselines, CLEW records the highest observed Acc@1 (77.3%) and MRR (81.3%) on LogLoc-Issues and matches the leading baselines at 97.6% Acc@1 on LogLoc-Airflow. Averaged over all 192 cases, CLEW's wall-clock time is approximately 73% lower than LocAgent's at a similar average inference cost. No aggregate degradation is observed under the tested perturbations, with modest changes in Acc@1 and MRR across the evaluated seeds and base models. These results suggest that CLEW can combine function-level localization with evidence links and runtime efficiency under the evaluated conditions.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Inquest: Log-Guided Root-Cause Code Localization with a Staged AgentarXiv · 2026
- From Logs to Faults: Reference-Free Fault Localization for Retrieval-Augmented Generation PipelinesarXiv · 2026
- Semantic Observability for Autonomous Systems DiagnosticsarXiv · 2026
- Agentic Root Cause Reasoning and Localization of Unsoundness in Static Call Graph AnalysisarXiv · 2026
- AutoCodeSherpa: Symbolic Explanations in AI Coding AgentsProceedings of the ACM on Software Engineering · 2026
- From Faulty Claims to Incorrect Patches: An Empirical Study of Task-Grounded Reasoning in Coding AgentsarXiv · 2026