Getafix: Learning to Fix Bugs Automatically
Johannes Bader, Andrew Scott, Michael Pradel, Satish Chandra

TL;DR
Getafix is an automated bug-fixing system that learns from past human fixes to generate accurate, human-like bug repairs efficiently, significantly improving software reliability in industrial settings.
Contribution
This paper introduces Getafix, the first industrially-deployed tool that learns fix patterns from human fixes to automatically generate accurate bug repairs.
Findings
Predicts exact human fixes 12-91% of the time depending on bug category.
Top-5 suggestions cover 526 out of 1,268 bugs.
Deployed at Facebook, improving software reliability.
Abstract
Static analyzers help find bugs early by warning about recurring bug categories. While fixing these bugs still remains a mostly manual task in practice, we observe that fixes for a specific bug category often are repetitive. This paper addresses the problem of automatically fixing instances of common bugs by learning from past fixes. We present Getafix, an approach that produces human-like fixes while being fast enough to suggest fixes in time proportional to the amount of time needed to obtain static analysis results in the first place. Getafix is based on a novel hierarchical clustering algorithm that summarizes fix patterns into a hierarchy ranging from general to specific patterns. Instead of a computationally expensive exploration of a potentially large space of candidate fixes, Getafix uses a simple yet effective ranking technique that uses the context of a code change to select…
Click any figure to enlarge with its caption.
Figure 1
Figure 2
Figure 3
Figure 4
Figure 5
Figure 6Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
