arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2604.26118cs.SE
收藏

基于大语言模型的未覆盖代码片段问题生成

LLM-Guided Issue Generation from Uncovered Code Segments

Concordia University(康考迪亚大学)

Diany Pressato, Honghao Tan, Mariam Elmoazen, Shin Hwei Tan

AI总结:

本文提出IssueSpecter工具,通过结合代码覆盖分析与大语言模型缺陷识别,生成优先级高的问题报告,验证其在Python项目中有效检测多种类型漏洞,且比传统方法在准确率和召回率上表现更优。

摘要:

开发者日益被缺乏可操作性和可复现性的AI生成问题报告所困扰,削弱了对自动化bug检测工具的信任。本文提出IssueSpecter,一个自动检测未覆盖代码片段中bug并生成优先级问题报告的工具。IssueSpecter结合代码覆盖分析与基于大语言模型的缺陷识别,生成包含严重性评级、复现步骤和建议修复的结构化报告。我们在13个活跃维护的Python项目上评估IssueSpecter,生成10,467个问题报告。手动标注IssueSpecter排名前130的问题确认,84.6%的LLM生成问题有效或需要进一步调查,仅15.4%为假阳性。基于LLM的排名在P@3上比基于规则的排名高出50%,在MRR上高出41%。识别的bug涵盖逻辑错误、边界错误、安全漏洞和状态一致性错误等多种类型。通过按优先级排序问题,IssueSpecter旨在帮助开发者优先关注最影响大的bug。最后,我们通过案例研究复现了其生成问题报告中出现的真实bug,证明其在开源Python项目中的实际价值。与CoverUp相比,在相同评估条件下,IssueSpecter在bug有效性率(81.0% vs. 76.2%)上表现更优,同时提供包含复现步骤和候选修复的结构化问题报告,无需开发者解释生成的测试意图即可立即操作。

英文摘要:

Developers are increasingly overwhelmed by AI-generated issue reports that lack actionability and reproducibility, eroding trust in automated bug detection tools. In this paper, we present IssueSpecter, an automated tool that finds bugs in uncovered code segments and automatically generates prioritized, actionable issue reports. IssueSpecter combines coverage analysis with LLM-based defect identification, producing structured reports complete with severity ratings, reproduction steps, and suggested fixes. We evaluate IssueSpecter on 13 actively maintained Python projects, generating 10,467 issue reports. Manual annotation of the top-130 ranked issues by IssueSpecter confirms that 84.6% of the LLM-generated issues are valid or warrant further investigation, with only 15.4% false positives. LLM-based ranking outperforms rule-based ranking by 50% at P@3 and 41% in MRR. The identified bugs cover a wide variety of types, from logic and boundary errors to security vulnerabilities and state consistency bugs. By ranking issues by priority, IssueSpecter aims to help developers focus their attention on the most impactful bugs first. Finally, we validate IssueSpecter through case studies reproducing real bugs surfaced from its generated issue reports, demonstrating its practical value for automatic bug discovery in open-source Python projects. Compared against CoverUp, a state-of-the-art coverage-driven test generation tool, IssueSpecter achieves a higher bug validity rate (81.0% vs. 76.2%) under identical evaluation conditions, using the same model and the same number of evaluated artifacts per project, while additionally providing structured issue reports with reproduction steps and candidate fixes that are immediately actionable without requiring developers to interpret generated test intent.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑