arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2601.21276cs.SEcs.AIcs.HC
收藏

更多代码,更少重用:调查代码质量和审查员对AI生成的拉取请求的态度

More Code, Less Reuse: Investigating Code Quality and Reviewer Sentiment towards AI-generated Pull Requests

Institute of Science Tokyo(东京科学研究所);Nara Institute of Science and Technology(奈良科学技術大學);Ritsumeikan University(立命館大學);Kyushu University(九州大學);University of British Columbia(不列颠哥伦比亚大學)

Haoming Huang, Pongchai Jaisri, Shota Shimizu, Lingfeng Chen, Sota Nakashima, Gema Rodríguez-Pérez

AI总结:

本研究调查了AI生成的拉取请求在代码质量和审查员情绪方面的表现,发现AI生成代码存在冗余问题,但审查员对其情绪更中性或积极,揭示了人机协作中的技术债务积累问题。

摘要:

大型语言模型(LLM)代理正在迅速发展,随着LLM代理在开发任务如代码生成中的应用日益增加。虽然LLM代理加速了代码生成,但研究表明它们可能对开发过程产生负面影响。然而,现有指标仅测量通过率,未能反映对长期可维护性和可读性的影响,也未能捕捉到人类对PR的直观评价。为了增加对这一问题的全面性,我们调查并评估了LLM的特性,以了解拉取请求的特征,而不仅仅是通过率。我们基于代码度量标准观察PR中的代码质量和可维护性,以评估客观特征以及开发人员对拉取请求的反应,无论是人类还是LLM生成的。评估结果表明,LLM代理经常忽视代码重用机会,导致比人类开发者更高的冗余水平。与质量问题相比,我们的情绪分析发现,审查员倾向于对AI生成的贡献表达更多中性或积极的情绪,而非人类贡献。这种不一致表明,AI代码的表面合理性掩盖了冗余,导致现实世界开发环境中技术债务的悄然积累。我们的研究为改进人机协作提供了见解。

英文摘要:

Large Language Model (LLM) Agents are advancing quickly, with the increasing leveraging of LLM Agents to assist in development tasks such as code generation. While LLM Agents accelerate code generation, studies indicate they may introduce adverse effects on development. However, existing metrics solely measure pass rates, failing to reflect impacts on long-term maintainability and readability, and failing to capture human intuitive evaluations of PR. To increase the comprehensiveness of this problem, we investigate and evaluate the characteristics of LLM to know the pull requests' characteristics beyond the pass rate. We observe the code quality and maintainability within PRs based on code metrics to evaluate objective characteristics and developers' reactions to the pull requests from both humans and LLM's generation. Evaluation results indicate that LLM Agents frequently disregard code reuse opportunities, resulting in higher levels of redundancy compared to human developers. In contrast to the quality issues, our emotions analysis reveals that reviewers tend to express more neutral or positive emotions towards AI-generated contributions than human ones. This disconnect suggests that the surface-level plausibility of AI code masks redundancy, leading to the silent accumulation of technical debt in real-world development environments. Our research provides insights for improving human-AI collaboration.

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

↑