paperbot · PL 论文追踪

全部论文 待读 收藏

P2 First come first served: the impact of file position on code review

先到先得:文件位置对代码审查的影响
FSE Proceedings of the 30th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering2022匹配度 1/10 · 该论文研究代码审查中文件展示位置对评论分布和缺陷发现率的影响,属于软件工程与人机交互的实证研究,与用户的静态分析、形式化验证、LLM/Agent、浮点与贝叶斯程序分析等核心方向无关。引用 16 inbox
Enrico Fregnan, Larissa Braz, Marco D'Ambros, Gül Çalıklı, Alberto Bacchelli
crossref: 2026-09-12

AI 速览

一句话:通过观察与对照实验证明代码审查中文件展示位置会系统性影响评论分布与缺陷发现率。

论文研究代码审查工具(如 Gerrit、GitHub)按字母序展示文件是否会因相对位置偏见审查结果。作者采用两步三角验证:先分析 GitHub 上 138 个 Java 项目、219,476 个 PR 的审查评论,在控制讨论串和新增行数等混杂因素后发现,较早展示的文件获得更多评论;再招募 106 名参与者进行在线对照实验,在两个文件中植入两个不相关缺陷并交换其位置。结果显示,一类缺陷的发现不受文件位置影响,另一类缺陷在文件位于最后时被识别几率比位于第一时低 64%。研究表明文件位置会影响代码审查结果,并对工具设计与实践有启示。

问题
探究代码审查工具按固定顺序(如字母序)展示文件时,文件的相对位置是否会使审查评论和缺陷发现产生偏见。
方法
先分析 GitHub 上 138 个 Java 项目、219,476 个 PR 的审查评论,并控制讨论串和新增行数等混杂因素;再开展 106 人参与的在线对照实验,交换植入两个不相关缺陷的文件位置。
评估
观察性分析比较不同位置文件的评论数量,实验则测量参与者在两种文件位置条件下发现两类植入缺陷的表现,并报告几率差异(最后位置低 64%)。
原文摘要(Abstract)

The most popular code review tools (e.g., Gerrit and GitHub) present the files to review sorted in alphabetical order. Could this choice or, more generally, the relative position in which a file is presented bias the outcome of code reviews? We investigate this hypothesis by triangulating complementary evidence in a two-step study. First, we observe developers’ code review activity. We analyze the review comments pertaining to 219,476 Pull Requests (PRs) from 138 popular Java projects on GitHub. We found files shown earlier in a PR to receive more comments than files shown later, also when controlling for possible confounding factors: e.g., the presence of discussion threads or the lines added in a file. Second, we measure the impact of file position on defect finding in code review. Recruit- ing 106 participants, we conduct an online controlled experiment in which we measure participants’ performance in detecting two unrelated defects seeded into two different files. Participants are assigned to one of two treatments in which the position of the defective files is switched. For one type of defect, participants are not affected by its file’s position; for the other, they have 64% lower odds to identify it when its file is last as opposed to first. Overall, our findings provide evidence that the relative position in which files are presented has an impact on code reviews’ outcome; we discuss these results and implications for tool design and code review.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@inproceedings{paperbot7030,
  title = {First come first served: the impact of file position on code review},
  author = {Enrico Fregnan and Larissa Braz and Marco D'Ambros and Gül Çalıklı and Alberto Bacchelli},
  booktitle = {FSE},
  year = {2022},
  doi = {10.1145/3540250.3549177}
}