Facebook is using AI to help developers track down bugs
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.
Interested in hearing industry leaders discuss subjects like this and sharing their use-cases? Attend the co-located IoT Tech Expo, Blockchain Expo, AI & Big Data Expo and Cyber Security & Cloud Expo World Series with upcoming events in Silicon Valley, London and Amsterdam and explore the future of enterprise technology.