arXiv:2601.21276cs.SEcs.AI2026-01中稿 · MSR 2026被引 6

AI生成的代码冗余高但评审更认可,暴露了质量与评价间的矛盾。

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

  • 对比人类开发者,AI更少复用代码,导致冗余率更高。
  • 尽管代码质量差,但评审对AI提交的反馈情绪更中性或积极。
  • 揭示了表面可读性掩盖技术债务,适合关注人机协作的研究者参考。

大型语言模型(LLM)代理在开发任务中快速推进,常用于代码生成。尽管加速了编码过程,现有研究显示其可能带来负面影响。然而,现有评估仅关注通过率,未能反映长期可维护性和可读性,也未捕捉人工对拉取请求(PR)的直观评价。为此,我们考察了LLM生成的拉取请求在代码质量与可维护性方面的特征,结合代码度量指标评估客观特性,并分析人类与LLM生成内容对评审者的反应。结果显示,相较于人类开发者,LLM频繁忽视代码复用机会,导致更高程度的冗余。与此同时,情感分析表明,评审者对AI生成贡献的情绪更趋于中性或正面。这种不一致说明:AI代码的表面合理性掩盖了冗余问题,导致真实开发环境中技术债务悄然累积。本研究为优化人机协作提供了洞见。

原文摘要 · Abstract (English)

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.

代码生成人机协作技术债情感分析

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。