Aim. There are 10s of thousands of code review comments each week at Meta. We developed Metamate for Code Review (MetaMateCR) that provides AI-assisted fixes for reviewer comments in production at scale.
Method. We developed an internal benchmark of 64k ⟨𝑟𝑒𝑣𝑖𝑒𝑤_𝑐𝑜𝑚𝑚𝑒𝑛𝑡, 𝑝𝑎𝑡𝑐ℎ⟩ data points to fine-tune Llama models. Once our models achieve reasonable offline results, we roll them into production. To ensure that our AI-assisted fixes do not negatively impact the time it takes to do code reviews, we conduct randomized controlled safety trials as well as full production experiments.
Offline Results. As a baseline, we compare GPT-4o to our small and large Llama models. In offline results, our LargeLSFT model creates an exact match patch 68% of the time outperforming GPT-4o by 9 percentage points (pp). The internal models also use more modern Hack functions when compared to the PHP functions suggested by GPT-4o. Safety Trial. When we roll MetaMateCR into production in a safety trial that compares no AI patches with AI patch suggestions, we see a large regression with reviewers taking over 5% longer to conduct reviews. After investigation, we modify the UX to only show authors the AI patches, and see no regressions in the time for reviews.
Production. When we roll LargeLSFT into production, we see an ActionableToApplied rate of 19.7%, which is a 9.2pp improvement over GPT-4o. Our results illustrate the importance of safety trials in ensuring that AI does not inadvertently slow down engineers, and a successful review comment to AI patch product running at scale.
Wed 8 JulDisplayed time zone: Eastern Time (US & Canada) change
10:30 - 12:30 | Code Review 1Industry Papers / Journal-First Paper / Research Papers at MB 2.210 Chair(s): Tao Xiao Kyushu University | ||
10:30 20mTalk | SWR-Bench: Assessing LLM Performance in Real-World Code Review Comment Generation Research Papers Zhengran Zeng Peking University, Ruikai Shi Peking University, Keke Han Peking University, Yixin Li Peking University, Kaicheng Sun Northwestern Polytechnical University, Yidong Wang Peking University, Zhuohao Yu Peking University, Rui Xie Peking University, Wei Ye Peking University, Shikun Zhang Peking University | ||
10:50 20mTalk | Assessing Harmful Comments and Specificity in Code Review Feedback at Scale using Large Language Models Industry Papers Audrey You University of Auckland, Jingyi (Jenny) Wang University of Auckland, Youxiang Lei Multitudes, Lauren Peate Multitudes, Kelly Blincoe University of Auckland | ||
11:10 20mTalk | HalluJudge: A Reference-Free Hallucination Detection for Context Misalignment in Code Review Automation Industry Papers Kla Tantithamthavorn Monash University, Hong Yi Lin The University of Melbourne, Patanamon Thongtanunam University of Melbourne, Wachiraphan (Ping) Charoenwet University of Melbourne, Minwoo Jeong Atlassian, Ming Wu Atlassian | ||
11:30 20mTalk | Hydra-Reviewer: A holistic multi-agent system for automatic code review comment generation Journal-First Paper Xiaoxue Ren Zhejiang University, Chaoqun Dai Zhejiang Gongshang University, Qiao Huang Zhejiang Gongshang University, Ye Wang Zhejiang Gongshang University, Chao Liu Chongqing University, Bo Jiang Zhejiang Gongshang University Link to publication | ||
11:50 20mTalk | AI-Assisted Fixes to Code Review Comments at Scale Industry Papers Chandra Sekhar Maddila Meta Platforms, Inc., Negar Ghorbani Meta Platforms Inc., James Saindon Meta, Parth Thakkar Meta Platforms, Inc., Vijayaraghavan Murali Meta Platforms Inc., Rui Abreu Meta, Jingyue Shen Meta Platforms Inc., Brian Zhou Meta Platforms Inc., Nachiappan Nagappan Meta Platforms, Inc., Peter C Rigby Meta / Concordia University | ||
12:10 20mTalk | Code Reviewer Recommendation for High Risk Diffs at Scale: Workflow, Recommender, and Live Experiments Industry Papers Aishwarya Girish Paraspatki Meta Platforms, Inc., Brandon Reznicek Meta Platforms, Inc., Rui Abreu Meta, Ford Garberson Meta Platforms, Inc., Audris Mockus University of Tennessee, Nachiappan Nagappan Meta Platforms, Inc., Peter C Rigby Meta / Concordia University | ||