UPDATED 13:30 EST / SEPTEMBER 13 2018

EMERGING TECH

Facebook creates an AI-based tool to automate bug fixes

Facebook Inc. is trying to speed up the time it takes to roll out new software updates and debug any issues in them with a new tool called SapFix that its engineers are building.

SapFix, which is still under development, is designed to generate fixes automatically for specific bugs before sending them to human engineers for approval.

Facebook, which announced the tool today ahead of its @Scale conference in San Jose, California, for developers building large-scale systems and applications, calls SapFix an “AI hybrid tool.” It uses artificial intelligence to automate the creation of fixes for bugs that have been identified by its software testing tool Sapienz, which is already being used in production.

SapFix will eventually be able to operate independently from Sapienz, but for now it’s still a proof-of-concept that relies on the latter tool to pinpoint bugs first of all.

SapFix can fix bugs in a number of ways, depending on how complex they are, Facebook engineers Yue Jia, Ke Mao and Mark Harman wrote in a blog post announcing the tools. For simpler bugs, SapFix creates patches that revert the code submission that introduced them. In the case of more complicated bugs, SapFix uses a collection of “templated fixes” that were created by human engineers based on previous bug fixes.

And in case those human-designed template fixes aren’t up to the job, SapFix will then attempt what’s called a “mutation-based fix,” which works by continually making small modifications to the code that caused the software to crash, until a solution is found.

SapFix goes further by generating multiple potential fixes for each bug, then submits these for human evaluation. It also performs tests on each of these fixes so engineers can see if they might cause other problems, such as compilation errors and other crashes somewhere else.

gray_sapfix4

“So, as powerful as its underlying tech may be, and as much time and effort it saves by operating autonomously, SapFix can’t implement its own proposed fixes,” Facebook’s engineering team explained. “Engineers are always in the loop, and this tool relies on their expertise to confirm whether a proposed fix should be deployed. It’s an important milestone for AI hybrids and offers further evidence that search-based software engineering can reduce friction in software development.”

The process of fixing software bugs, which includes detecting them in the first place, and then managing, distributing and deploying patches, has been a manual exercise for far too long, so it’s good to see Facebook trying to automate these tasks with its AI,” Holger Mueller, vice president and principal analyst at Constellation Research Inc., told SiliconANGLE.”

With these manual fixes, he added, “failure is always lurking around the corner, and often comes with often dire consequences for users.”

SapFix is a promising solution to these problems, but it’s still a largely untested tool, Mueller warned.

“Given SapFix’s dependence on Sapienz [to find bugs], the value beyond the Facebook ecosystem still needs to be evaluated,” Mueller said. “But what with the number of developers working on Facebook applications and SapFix’s potential to increase their productivity, this is a key step towards delivering what Facebook really wants, which is more apps running on its platform.”

Facebook said its experiments with SapFix represent the first time a machine-generated bug fix with end-to-end testing has been deployed on a codebase of such massive scale. However, it said, the tool can be used for deployments of any scale.

Facebook said it intends to open-source both SapFix and Sapienz once additional engineering work has been completed.

Image: testbytes/Pixabay

A message from John Furrier, co-founder of SiliconANGLE:

Your vote of support is important to us and it helps us keep the content FREE.

One click below supports our mission to provide free, deep, and relevant content.  

Join our community on YouTube

Join the community that includes more than 15,000 #CubeAlumni experts, including Amazon.com CEO Andy Jassy, Dell Technologies founder and CEO Michael Dell, Intel CEO Pat Gelsinger, and many more luminaries and experts.

“TheCUBE is an important partner to the industry. You guys really are a part of our events and we really appreciate you coming and I know people appreciate the content you create as well” – Andy Jassy

THANK YOU