探索大语言模型在解决环境相关崩溃漏洞中的应用:定位与修复
Exploring Large Language Models in Resolving Environment-Related Crash Bugs: Localizing and Repairing
AI总结:
该研究针对大语言模型在真实环境相关崩溃漏洞修复中的能力空白,对比不同崩溃类型的修复难点,探索多种提示策略,提出交互式方法IntDiagSolver,在多个主流LLM上显著提升了崩溃漏洞的定位与修复准确率。
摘要:
软件崩溃漏洞会导致意外的程序行为甚至突然终止,因此需要立即解决。然而,由于崩溃漏洞的根本原因十分复杂——可能源于源代码问题或第三方库依赖等外部因素,修复这类漏洞颇具挑战性。大语言模型(LLM)已在软件工程任务中展现出应用前景,但现有研究主要关注LLM定位和修复代码相关崩溃漏洞的能力,其在解决真实软件中环境相关崩溃漏洞的有效性仍未被探索。为填补这一空白,我们开展了首个全面研究,评估LLM解决真实环境相关崩溃漏洞的能力。我们首先系统比较了在不同崩溃上下文信息量级下,LLM解决代码相关与环境相关崩溃漏洞的性能。研究结果表明,定位是解决代码相关崩溃的主要挑战,而修复对环境相关崩溃而言难度更大。此外,我们研究了不同提示策略(结合不同提示模板与多轮交互)对提升环境相关崩溃漏洞修复效果的影响。在此基础上,我们进一步探索了一种利用LLM自规划能力的高级主动询问提示策略。基于这些探索,我们提出了IntDiagSolver——一种交互式方法,旨在通过与LLM的持续交互实现精准的崩溃漏洞修复。在多个LLM(包括GPT-3.5、GPT-4、Claude、CodeLlama、DeepSeek-R1和Qwen-3-Coder)上对IntDiagSolver开展的广泛评估显示,其修复准确率得到了持续提升:定位准确率提升幅度达9.1%至43.3%,修复准确率提升幅度达9.1%至53.3%。
英文摘要:
Software crash bugs cause unexpected program behaviors or even abrupt termination, thus demanding immediate resolution. However, resolving crash bugs can be challenging due to their complex root causes, which can originate from issues in the source code or external factors like third-party library dependencies. Large language models (LLMs) have shown promise in software engineering tasks. However, existing research predominantly focuses on the capability of LLMs to localize and repair code-related crash bugs, leaving their effectiveness in resolving environment-related crash bugs in real-world software unexplored. To fill this gap, we conducted the first comprehensive study to assess the capability of LLMs in resolving real-world environment-related crash bugs. We first systematically compare LLMs' performance in resolving code-related and environment-related crash bugs with varying levels of crash contextual information. Our findings reveal that localization is the primary challenge for resolving code-related crashes, while repair poses a greater challenge for environment-related crashes. Furthermore, we investigate the impact of different prompt strategies on improving the resolution of environment-related crash bugs, incorporating different prompt templates and multi-round interactions. Building on this, we further explore an advanced active inquiry prompting strategy leveraging the self-planning capabilities of LLMs. Based on these explorations, we propose IntDiagSolver, an interactive methodology designed to enable precise crash bug resolution through ongoing engagement with LLMs. Extensive evaluations of IntDiagSolver across multiple LLMs (including GPT-3.5, GPT-4, Claude, CodeLlama, DeepSeek-R1, and Qwen-3-Coder) demonstrate consistent improvements in resolution accuracy, with substantial enhancements ranging from 9.1% to 43.3% in localization and 9.1% to 53.3% in repair.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。