Lune

FSE2022顶会

Using nudges to accelerate code reviews at scale

Qianhua Shan, David Sukhdeo, Qianying Huang, Seth Rogers, Lawrence Chen, Elise Paradis, Peter C. Rigby, Nachiappan Nagappan

摘要

We describe a large-scale study to reduce the amount of time code review takes. Each quarter at Meta we survey developers. Combining sentiment data from a developer experience survey and telemetry data from our diff review tool, we address, "When does a diff review feel too slow?" From the sentiment data alone, we learn that 84.7% of developers are satisfied with the time their diffs spend in review. By enriching the survey results with telemetry for each respondent, we determined that sentiment is closely associated with the 75th percentile time in review for that respondent's diffs, i.e. those that take more than 24 hours.

To encourage developers to act on stale diffs that have had no action for 24 or more hours, we designed a NudgeBot to notify, i.e. nudge, reviewers. To determine who to nudge when a diff is stale, we created a model to rank the reviewers based on the probability that they will make a comment or perform some other action on a diff. This model outperformed models that looked at files the reviewer had modified in the past. Combining this information with prior author-review relationships, we achieved an MRR and AUC of .81 and .88, respectively.

To evaluate NudgeBot in production, we conducted an A/B clusterrandomized experiment on over 30k engineers. We observed substantial statistically significant decrease in both time in review (-6.8%, p=0.049) and time to first reviewer action (-9.9%, p=0.010). We also used guard metrics to ensure that most reviews were still done in fewer than 24 hours and that reviewers still spend the same amount of time looking at diffs, and saw no statistically significant change in these metrics. NudgeBot is now rolled out company wide and is used daily by thousands of engineers at Meta.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 1 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper1

  1. Towards Practical Defect-Focused Automated Code ReviewJunyi Lu, Lili Jiang, Xiaojia Li, Jianbing Fang 等ICML 2025

它引用的 Paper2

  1. Mitigating turnover with code review recommendation: balancing expertise, workload, and knowledge distributionEhsan Mirsaeedi, Peter C. RigbyICSE 2020 · 52 次引用
  2. Predicting developers' negative feelings about code reviewCarolyn D. Egelman, Emerson R. Murphy-Hill, Elizabeth Kammer, Margaret Morrow Hodges 等ICSE 2020 · 50 次引用

相关 Paper

  1. An Empirical Study on Code Review Activity Prediction and Its Impact in PracticeDoriane Olewicki, Sarra Habchi, Bram AdamsFSE 2024 · 2 次引用
  2. CommentFinder: a simpler, faster, more accurate code review comments recommendationYang Hong, Chakkrit Tantithamthavorn, Patanamon Thongtanunam, Aldeida AletiFSE 2022 · 57 次引用
  3. Using Pre-Trained Models to Boost Code Review AutomationRosalia Tufano, Simone Masiero, Antonio Mastropaolo, Luca Pascarella 等ICSE 2022 · 149 次引用
  4. Barriers for Students During Code Change ComprehensionJustin Middleton, John-Paul Ore, Kathryn T. StoleeICSE 2024 · 7 次引用
  5. Towards Automating Code Review ActivitiesRosalia Tufano, Luca Pascarella, Michele Tufano, Denys Poshyvanyk 等ICSE 2021 · 4 次引用
黄昏的海面,两侧是细线勾勒的悬崖