This week on the Facebook code blog they shared details about a new tool called Getafix that automatically finds fixes for bugs and offers them to engineers to approve. 😎

Modern production codebases are extremely complex and are updated constantly. To create a system that can automatically find fixes for bugs — without help from engineers — we built Getafix to learn from engineers’ previous changes to the codebase. It finds hidden patterns and uses them to identify the most likely remediations for new bugs.

Getafix has been deployed to production at Facebook, where it now contributes to the stability of apps that billions of people use.

The goal of Getafix is to let computers take care of the routine work, albeit under the watchful eye of a human, who must decide when a bug requires a complex, nonroutine remediation.

Whether or not this tool will be open sourced or shared at large remains to be seen. How cool would it be to have something like this deployed to your codebase to find and suggest fixes to your bugs?

Get the latest news and podcasts for developers in your inbox, every week. We make it super easy to keep up with developer news that matters.

Discussion

I would love to run this tool on our codebase for awhile and see what it comes up with. The idea of mining ‘fix templates’ for the correct one is super cool as well.

Another interesting data point that I’d love their engineering team to release: what percentage of Getafix’s PRs are actually merged without modification? I imagine that number is relatively low, but potentially trending up over time.