arXiv:2512.05908cs.SEcs.AI2025-12中稿 · LLM4Code Workshop,…被引 5

用自然语言摘要提升微服务中多仓库的缺陷定位效率

Natural Language Summarization Enables Multi-Repository Bug Localization by LLMs in Microservice Architectures

  • 将代码库转为分层自然语言摘要,实现语义级搜索
  • 在真实工业系统上达到82%的定位准确率(Pass@10)
  • 适合需要可解释性与透明性的企业级AI工具开发

在多仓库微服务架构中,缺陷定位因自然语言报告与代码间的语义鸿沟、大模型上下文限制以及需先确定正确仓库而面临挑战。本文将该问题重构为自然语言推理任务:将代码库转化为文件、目录和仓库层级的上下文感知摘要,并执行两阶段搜索——先路由到相关仓库,再在仓库内自顶向下定位。在包含46个仓库、110万行代码的工业系统DNext上评估,本方法取得Pass@10为0.82、MRR为0.50的性能,显著优于检索基线及基于代理的RAG系统(如GitHub Copilot和Cursor)。结果表明,经过工程化的自然语言表示比原始源码更适用于可扩展的缺陷定位,能提供可解释的‘仓库→目录→文件’搜索路径,对建立企业AI工具的信任至关重要。

原文摘要 · Abstract (English)

Bug localization in multi-repository microservice architectures is challenging due to the semantic gap between natural language bug reports and code, LLM context limitations, and the need to first identify the correct repository. We propose reframing this as a natural language reasoning task by transforming codebases into hierarchical NL summaries and performing NL-to-NL search instead of cross-modal retrieval. Our approach builds context-aware summaries at file, directory, and repository levels, then uses a two-phase search: first routing bug reports to relevant repositories, then performing top-down localization within those repositories. Evaluated on DNext, an industrial system with 46 repositories and 1.1M lines of code, our method achieves Pass@10 of 0.82 and MRR of 0.50, significantly outperforming retrieval baselines and agentic RAG systems like GitHub Copilot and Cursor. This work demonstrates that engineered natural language representations can be more effective than raw source code for scalable bug localization, providing an interpretable repository -> directory -> file search path, which is vital for building trust in enterprise AI tools by providing essential transparency.

缺陷定位LLM应用微服务可解释性

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。