arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2510.06104cs.SE
收藏

解释开源软件中的代码风险:迈向LLM生成的故障预测解释

Explaining Code Risk in OSS: Towards LLM-Generated Fault Prediction Interpretations

George Mason University(乔治梅森大学)

Elijah Kayode Adejumo, Brittany Johnson

AI总结:

本研究探讨利用大型语言模型将开源软件中的故障预测指标转化为清晰的风险解释和可操作指导,以帮助贡献者理解和审查代码修改,并提出评估其有效性的任务型研究方案。

摘要:

开源软件(OSS)因其提供的价值已成为全球范围内非常重要且关键的基础设施。OSS通常依赖于来自不同背景和经验水平的开发者的贡献。进行安全更改,例如修复错误或实现新功能,可能具有挑战性,尤其是在组件相互依赖的面向对象系统中。静态分析和缺陷预测工具会产生指标(例如复杂度、耦合度),这些指标标记出可能容易出现故障的组件,但这些信号对于不熟悉代码库的新贡献者来说往往难以解释。大型语言模型(LLMs)在代码摘要和文档生成等软件工程任务中表现出强大的性能。基于这一进展,我们研究LLMs是否能够将故障预测指标转化为清晰、人类可读的风险解释和可操作的指导,以帮助OSS贡献者规划和审查代码修改。我们概述了LLM生成的助手可能提供的解释类型(描述性、情境性和可操作性解释)。我们还概述了下一步计划,通过与OSS贡献者进行基于任务的研究来评估实用性,比较仅基于指标的基础方法与LLM生成的解释在决策质量、完成时间和错误率方面的表现。

英文摘要:

Open Source Software (OSS) has become a very important and crucial infrastructure worldwide because of the value it provides. OSS typically depends on contributions from developers across diverse backgrounds and levels of experience. Making safe changes, such as fixing a bug or implementing a new feature, can be challenging, especially in object-oriented systems where components are interdependent. Static analysis and defect-prediction tools produce metrics (e.g., complexity,coupling) that flag potentially fault-prone components, but these signals are often hard for contributors new or unfamiliar with the codebase to interpret. Large Language Models (LLMs) have shown strong performance on software engineering tasks such as code summarization and documentation generation. Building on this progress, we investigate whether LLMs can translate fault-prediction metrics into clear, human-readable risk explanations and actionable guidance to help OSS contributors plan and review code modifications. We outline explanation types that an LLM-generated assistant could provide (descriptive, contextual, and actionable explanations). We also outline our next steps to assess usefulness through a task-based study with OSS contributors, comparing metric-only baselines to LLM-generated explanations on decision quality, time-to-completion, and error rates

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

↑