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

AI生成的拉取请求中的文档漂移

Documentation Drift in AI-Generated Pull Requests

Monash University(莫纳什大学)

Will De Michele, Kla Tantithamthavorn

AI总结:

该研究针对AIDev数据集的29669个AI生成PR,发现63.2%的AI PR未更新文档,文档漂移会加剧,未记录文档的文件后续被重新记录的概率仅为已记录的一半,揭示AI编码的文档债务易累积。

摘要:

AI编码智能体如今正大规模向软件仓库贡献代码,但其文档实践仍未得到明确表征。我们分析了AIDev数据集中来自2585个仓库的29669个AI生成的拉取请求(PR),测量文档协同变更:即代码文件修改是否伴随同一PR中文档文件的更新。我们发现63.2%的AI PR仅修改代码而未更新任何文档。这一比例因任务类型差异显著:功能开发任务为55.2%,重构任务为77.5%。在30至90天的时间窗口内,未记录文档的代码文件后续被修复的概率比已记录文档的文件高8.6%至11.7%。原始PR级别的比较显示相反结果,因为已记录文档的PR规模是未记录的3.9倍,因此吸引更多修复。控制规模影响后,该结果反转。尽管已记录文档的PR规模更大(中位数:40秒对比184秒),其合并速度仍更快,尽管该数据集中的合并在很大程度上是自动化的。文档漂移还会加剧:在90天内,未记录文档而被修改的文件,后续被重新记录文档的概率约为已记录文档文件的一半(24%对比48%)。这表明文档债务倾向于累积而非被重新处理。

英文摘要:

AI coding agents now contribute to software repositories at scale, yet their documentation practices remain uncharacterised. We analyse 29,669 AI-generated pull requests from 2,585 repositories in the AIDev dataset, measuring documentation co-change: whether code-file modifications are accompanied by a documentation-file update in the same PR. We find that 63.2% of AI PRs change code without updating any documentation. This varies sharply by task type: 55.2% for features and 77.5% for refactoring. Undocumented code files are followed by a fix to the same file 8.6 to 11.7% more often than documented files across 30 to 90-day windows. A raw PR-level comparison shows the opposite because documented PRs are 3.9 times larger and therefore attract more fixes. Controlling for size exposure reverses this result. Documented changes also merge faster despite their larger size (median: 40 seconds versus 184 seconds), although merging is largely automated in this dataset. Documentation drift also compounds: within 90 days, a file changed without documentation is later re-documented at roughly half the rate of a file changed with documentation (24% versus 48%). This suggests that documentation debt tends to accumulate rather than be revisited.

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

↑