Facebook Is Using AI To Help Developers Track Down Bugs
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.