paperbot · PL 论文追踪

全部论文 待读 收藏

Recovering Revisions of Pull Requests with Altered History

恢复历史被改写的 Pull Request 修订
ASE Proceedings of the 41st IEEE/ACM International Conference on Automated Software Engineering2026引用 0 inbox
Gengyi Sun, Georges Aaron Randrianaina, Tao Xiao, Yasutaka Kamei, Shane McIntosh
crossref: 2026-10-09

AI 速览

一句话:提出 AntiDiffamine,基于提交祖先关系对齐,自动消除 force-push 后 PR 差异中的基底分支噪声。

在 Pull Request(PR)开发中,作者常通过 amend、squash 或 rebase 后 force-push 回应评审,但这会把 PR 特有变更与 base 分支更新混同,干扰评审并污染 PR 数据集。本文对 1,445 个 GitHub 项目的 935,011 个 PR 进行实证研究,发现 242,624 个 PR 含 568,218 次 force-push,其中 210,837 对(37.1%)存在混同。作者提出 AntiDiffamine:一种基于祖先关系的提交对齐方法,将 force-push 前后的 HEAD 提交映射到共同参考,以隔离 PR 特有变更。该方法可自动去混同 98.1% 的修订,将 diff 缩小 1 至 3 个数量级;在 Kubernetes 的 523 对 fail-fix 修订中,130 对存在混同,应用后识别出的修复文件与人工标注重叠更高。作者还提供 GitHub Action 模板以便实际采用。

问题
force-push 后 PR 修订的 diff 会混入 base 分支更新,导致评审困难并为 PR 数据集引入噪声,而现有方法缺乏对这种混同的系统隔离。
方法
对大规模 GitHub PR 的 force-push 行为进行实证分析,并提出 AntiDiffamine,基于提交祖先关系将 force-push 前后的 HEAD 对齐到共同参考以消除混同。
评估
在 1,445 个项目、935,011 个 PR 上量化 force-push 与混同现象;AntiDiffamine 能去混同 98.1% 的修订并大幅缩小 diff,并通过 Kubernetes fail-fix 案例、人工标注对比及 GitHub Action 模板验证实用性。
原文摘要(Abstract)

In pull-based development, Pull Requests (PRs) undergo peer review. To address review feedback, authors may "force-push" after amending, squashing, or rebasing commits. Such revisions can conflate PR-specific changes with updates on the base branch, hindering further review and introducing noise into PR-based datasets. In this paper, we empirically study 935,011 PRs from 1,445 well-maintained GitHub projects. We observe 568,218 force-push events in 242,624 PRs that span 1,366 projects. We denote the HEAD commits of the PR before and after force-pushing as a force-push pair, and observe that 210,837 pairs (37.1%) have a relationship that conflates PR changes with updates to the base branch. To systematically isolate PR-specific changes in such revisions, we propose AntiDiffamine---an ancestry-based approach that aligns commits on a common reference. AntiDiffamine can automatically deconflate 98.1% of the studied revisions, decreasing the diff size by one to three orders of magnitude. We also evaluate AntiDiffamine on fail-fix pairs, i.e., revisions that fix failing builds. A case study of Kubernetes reveals that 130 of 523 pairs have conflated diffs. Moreover, the fixing files identified when AntiDiffamine is applied overlap more with a human-labelled ground truth than when conflation is untreated or excluded. AntiDiffamine is a first attempt at addressing force-push-based diff conflation, which is having a real-world impact on practical and research workflows. To ease practical adoption, we provide a template GitHub Action, which scans PR updates for force-push events and applies AntiDiffamine to deconflate the diff.

链接与引用

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

BibTeX
@inproceedings{paperbot12445,
  title = {Recovering Revisions of Pull Requests with Altered History},
  author = {Gengyi Sun and Georges Aaron Randrianaina and Tao Xiao and Yasutaka Kamei and Shane McIntosh},
  booktitle = {ASE},
  year = {2026},
  doi = {10.1145/3832783.3837417}
}