Facebook is using AI to help developers track down bugs

Categories

Facebook is releasing an AI-powered tool called SapFix which aims to help software developers track down pesky bugs in their code.

SapFix detects errors in code and suggests possible fixes to developers. Currently, it fixes bugs spotted by Sapienz – a software testing tool by Facebook – but the company promises it will be able to find errors in any code.

The AI works by rolling back the code which has caused an error. At this point, it refers to its knowledge base of fixes that have worked in the past until it no longer causes an error.

Multiple solutions are produced and tested against three parameters:

Are there compilation errors?

Does the crash persist?

Does the fix introduce new crashes?

After producing the potential fixes, it picks one to send to engineers who are then able to review whether it’s a viable solution.

Facebook is already using SapFix internally and claims it helped them in shipping improved builds of its Android app. The company says it believes SapFix marks the first time AI-suggested fixes have been deployed into a codebase as large as Facebook’s.

“It’s an important milestone for AI hybrids and offers further evidence that search-based software engineering can reduce friction in software development,” wrote Facebook in a blog post. “As we develop SapFix to work with different kinds of bugs and software, the tool has the potential to change the speed and quality of code generation.”

The next step for SapFix is to detect crashes before they happen in order to be proactive about fixes before they become a problem for users.

SapFix and Sapienz will be released as open source tools once Facebook completes its engineering work.

What are your thoughts on Facebook’s use of AI to help developers eliminate bugs? Let us know in the comments.

Developer Tech offers the latest app developer news and strategy. We cover topics, including coding, monetisation, billing, marketing and design, within the app development industry. We aim to help developers by providing top-class practical content across many issues.

Founded in 2011, we provide a channel for expert, brands and thought leaders to share content and engage with other industry professionals around the world.