Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon

SapFix and Sapienz: Facebook’s hybrid AI tools to automatically find and fix software bugs

Save for later
  • 2 min read
  • 14 Sep 2018

article-image

“Debugging code is drudgery”
-Facebook Engineers Yue Jia, Ke Mao and Mark Harman


To significantly reduce the amount of time developers spend on debugging code and rolling out new software, Facebook engineers have come up with an ingenious tool called ‘SapFix’. Sapfix, which is still under development, can automatically generate fixes for specific bugs  identified by Sapienz. It will then propose these fixes to engineers for approval and deployment to production.

SapFix will eventually be able to operate independently from Sapienz, Facebook’s intelligent automated software testing tool. For now, it is a proof-of-concept that relies on the latter tool to pinpoint bugs.

How does SapFix work?


This AI hybrid tool will generate bug fixes depending upon the type of bug encountered. For instance:

For simpler bugs: SapFix will create patches that revert the code submission that introduced these bugs.
For complicated bugs: The tool uses a collection of “templated fixes” that were created by human engineers based on previous bug fixes.
If human-designed template fixes aren’t up to the job: The tool attempts a “mutation-based fix,” which works by continuously making small modifications to the code that caused the software to crash, until a solution is found.
SapFix generates multiple potential fixes for every bug. This is then submitted to the engineers for evaluation. The fixes are tested in advance so engineers can check if they might cause problems like compilation errors and other crashes.

sapfix-and-sapienz-facebooks-hybrid-ai-tools-to-automatically-find-and-fix-software-bugssapfix-and-sapienz-facebooks-hybrid-ai-tools-to-automatically-find-and-fix-software-bugs-img-0

Unlock access to the largest independent learning library in Tech for FREE!
Get unlimited access to 7500+ expert-authored eBooks and video courses covering every tech area you can think of.
Renews at €18.99/month. Cancel anytime

Source: Facebook


With an automated end-to-end testing and repair, SapFix is an important milestone in AI hybrid tool deployment. Facebook intends to open source both, SapFix and Sapienz, once additional engineering work has been completed. You can read more about this tool on Facebook’s Blog.

Facebook introduces Rosetta, a scalable OCR system that understands text on images using Faster-RCNN and CNN

How AI is going to transform the Data Center

Facebook Reality Labs launch SUMO Challenge to improve 3D scene understanding and modeling algorithms