Skip to main content
QUICK REVIEW

[论文解读] Human-Agent versus Human Pull Requests: A Testing-Focused Characterization and Comparison

Roberto Milanese, Francesco Salzano|arXiv (Cornell University)|Jan 29, 2026
Software Engineering Techniques and PracticesComputer Science被引用 0
一句话总结

这项研究比较了6,582个人机PRs(HAPRs)与3,122个人工PRs(HPRs)在测试频率、上下文和测试质量方面的表现,发现测试覆盖率相似但HAPRs的测试范围更大,且质量差异不显著。

ABSTRACT

AI-based coding agents are increasingly integrated into software development workflows, collaborating with developers to create pull requests (PRs). Despite their growing adoption, the role of human-agent collaboration in software testing remains poorly understood. This paper presents an empirical study of 6,582 human-agent PRs (HAPRs) and 3,122 human PRs (HPRs) from the AIDev dataset. We compare HAPRs and HPRs along three dimensions: (i) testing frequency and extent, (ii) types of testing-related changes (code-and-test co-evolution vs. test-focused), and (iii) testing quality, measured by test smells. Our findings reveal that, although the likelihood of including tests is comparable (42.9% for HAPRs vs. 40.0% for HPRs), HAPRs exhibit a larger extent of testing, nearly doubling the test-to-source line ratio found in HPRs. While test-focused task distributions are comparable, HAPRs are more likely to add new tests during co-evolution (OR=1.79), whereas HPRs prioritize modifying existing tests. Finally, although some test smell categories differ statistically, negligible effect sizes suggest no meaningful differences in quality. These insights provide the first characterization of how human-agent collaboration shapes testing practices.

研究动机与目标

  • 理解基于AI的编码代理如何影响PR中的测试实践的动机。
  • 量化HAPRs与HPRs的测试频率和范围。
  • 考察测试贡献的开发上下文(共同演化 vs. 测试为中心)。
  • 通过测试异味评估测试质量以评估对可维护性的影响。

提出的方法

  • 使用AIDev数据集(版本3)在四种语言(Java、JavaScript、Python、TypeScript)下比较6,582个HAPRs与3,122个HPRs。
  • 基于人工分析与验证的语言特定启发式方法识别测试文件与源代码文件(精确度0.988,召回率0.982,F1 0.985)。
  • 使用指标在PR、文件、行层面衡量测试:计数、比率、TF、TLoC及相关比率。
  • 将测试上下文分为共同演化(COC)和测试为中心(TFC),将测试任务分为新增、修改、删除。
  • 使用AromaDr检测测试异味,计算PR前后异味差,并用非参数检验分析显著性。

实验结果

研究问题

  • RQ1RQ1:HAPRs与HPRs在测试贡献的频率和范围上是否存在差异?
  • RQ2RQ2:在开发上下文(共同演化与测试为中心)及任务类型上,HAPRs与HPRs的测试贡献有何不同?
  • RQ3RQ3:通过测试异味,HAPRs与HPRs在测试质量上有何差异?

主要发现

  • HAPRs包含测试的比例略高于HPRs(42.9% vs 40.0%),具有统计显著性但效应量较小(OR≈1.13)。
  • 在存在测试时,HAPRs增加了更多与测试相关的文件和行数(更高的文件比率和行比率;显著但效应量从小到中等)。
  • 在共同演化情境中,HAPRs更可能添加新的测试(68.4% vs 54.8%;OR=1.79);HPRs更常修改(43.5% vs 20.6%)或删除(4.8% vs 0.9%)现有测试。
  • 测试异味在两组之间的分布相似;尽管某些类别在统计上存在差异,但效应量微小,表明人机协作对质量没有实际差异。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。