首个专为C++设计的智能修复系统,精准定位问题并生成补丁。
InfCode-C++: Intent-Guided Semantic Retrieval and AST-Structured Search for C++ Issue Resolution
- 结合语义意图检索与抽象语法树结构查询,提升上下文准确性。
- 在MultiSWE-bench-CPP上达到25.58%修复率,领先前代模型10.85个百分点。
- 适合研究复杂静态类型语言自动化修复的开发者与研究人员。
大型语言模型(LLM)代理在仓库级问题修复中表现强劲,但现有系统几乎仅针对Python设计,依赖词汇检索和浅层代码导航,难以迁移到C++项目。由于重载标识符、嵌套命名空间、模板实例化及深层控制流结构,上下文获取与故障定位难度显著增加。因此,最先进的Python导向代理在MultiSWE-bench的C++子集上性能急剧下降。我们提出INFCODE-C++,首个面向C++的自主端到端问题修复系统。该系统融合两种互补的检索机制——语义代码意图检索与确定性抽象语法树(AST)结构查询,构建准确、语言感知的修复上下文。这些组件使大型静态类型C++仓库中的精确故障定位与鲁棒补丁合成成为可能。在 exttt{MultiSWE-bench-CPP}基准上,INFCODE-C++达到25.58%的修复率,比最强先前代理高出10.85个百分点,且性能超过MSWE-agent一倍以上。消融与行为研究进一步证明语义检索、结构分析与精准复现对C++问题修复的关键作用。INFCODE-C++凸显多语言软件代理中语言感知推理的重要性,并为未来可扩展的LLM驱动复杂静态类型生态修复研究奠定基础。
原文摘要 · Abstract (English)
Large language model (LLM) agents have recently shown strong performance on repository-level issue resolution, but existing systems are almost exclusively designed for Python and rely heavily on lexical retrieval and shallow code navigation. These approaches transfer poorly to C++ projects, where overloaded identifiers, nested namespaces, template instantiations, and deep control-flow structures make context retrieval and fault localization substantially more difficult. As a result, state-of-the-art Python-oriented agents show a drastic performance drop on the C++ subset of MultiSWE-bench. We introduce INFCODE-C++, the first C++-aware autonomous system for end-to-end issue resolution. The system combines two complementary retrieval mechanisms -- semantic code-intent retrieval and deterministic AST-structured querying -- to construct accurate, language-aware context for repair.These components enable precise localization and robust patch synthesis in large, statically typed C++ repositories. Evaluated on the \texttt{MultiSWE-bench-CPP} benchmark, INFCODE-C++ achieves a resolution rate of 25.58\%, outperforming the strongest prior agent by 10.85 percentage points and more than doubling the performance of MSWE-agent. Ablation and behavioral studies further demonstrate the critical role of semantic retrieval, structural analysis, and accurate reproduction in C++ issue resolution. INFCODE-C++ highlights the need for language-aware reasoning in multi-language software agents and establishes a foundation for future research on scalable, LLM-driven repair for complex, statically typed ecosystems.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。