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

Linux内核中感知设计的代码审查的基准测试与增强

Benchmarking and Enhancing Design-Aware Code Review in the Linux Kernel

Fudan University(复旦大学);Nanyang Technological University(南洋理工大学)

Zhenhao Zhou, Kai Yu, Ying Wang, Zhiqiang Yuan, Junhao Zeng, Yijian Wu, Chong Wang, Xin Peng

AI总结:

该研究针对Linux内核的感知设计代码审查问题,提出DesignLore方法并构建DesignReviewBench基准,实验显示其在设计权衡检测上较基线实现21.6%的相对提升,凸显了复用历史设计知识的价值。

摘要:

代码审查通常需要超越局部正确性的推理。在成熟的软件系统中,审查者必须识别出由提议变更引入的设计权衡,比较替代解决方案,并推理它们与项目特定约束的兼容性。我们将此问题称为感知设计的代码审查。然而,现有的自动化审查方法主要关注缺陷和正确性,而历史审查讨论中积累的设计知识仍然难以复用。为应对这些挑战,我们提出DesignLore,一种知识增强方法,它从历史审查讨论中提取设计决策,将其组织为自适应设计分类法,并复用相关历史知识以指导代码审查。我们进一步构建DesignReviewBench,一个源自真实补丁审查历史的基准,用于系统评估感知设计的代码审查。我们的评估显示,感知设计的审查对当前编码智能体仍然具有挑战性,最强的基线在设计权衡检测上仅达到0.213的F1值。相比之下,DesignLore达到0.259的F1值,实现了21.6%的相对提升,并且在不同智能体系统和主干模型上均持续带来增益。这些结果凸显了感知设计的审查的重要性,并证明了恢复和复用历史设计知识以支持该审查的潜力。

英文摘要:

Code review often requires reasoning beyond local correctness. In mature software systems, reviewers must recognize design trade-offs introduced by a proposed change, compare alternative solutions, and reason about their compatibility with project-specific constraints. We refer to this problem as design-aware code review. However, existing automated review approaches primarily focus on defects and correctness, while the design knowledge accumulated in historical review discussions remains difficult to reuse. To address these challenges, we present DesignLore, a knowledge-augmented approach that extracts design decisions from historical review discussions, organizes them into an adaptive design taxonomy, and reuses relevant historical knowledge to guide code review. We further construct DesignReviewBench, a benchmark derived from real patch-review histories for systematically evaluating design-aware code review. Our evaluation shows that design-aware review remains challenging for current coding agents, with the strongest baseline achieving an F1 of only 0.213 on design trade-off detection. In comparison, DesignLore achieves an F1 of 0.259, a 21.6% relative improvement, and consistently delivers gains across different agent systems and backbone. These results highlight the importance of design-aware review and demonstrate the potential of recovering and reusing historical design knowledge to support it.

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

↑