One of the many direct applications of machine learning is the use of machine learning tools to find the bugs in programs, without executing the programs. There have been a number of tools developed and released in recent times for this luxury to programmers.
Here are the top six examples of ML tools that can assist you to find code bugs in your program.
“We have a unique platform that understands software code the same way Grammarly understands written language,” said Boris Paskalev, one of the founding members. “This unique proposition is positioned us save billions of dollars within the software development community with our first service and then to be on the front end of transforming the industry towards fully autonomous code synthesis.”
In a bid to cut the number of coding errors made in its Firefox browser, Mozilla is deploying a machine-learning-driven coding assistant developed in conjunction with Ubisoft, called Clever-Commit.
The tool builds on work by Ubisoft La Forge, Ubisoft’s research lab. Mozilla plans to use Clever-Commit during code reviews, and in time this will expand to other phases of development, too.
InteliCode is a tool by Microsoft which is on its Visual Studio. IntelliCode is used to find bugs and can also detect improperly used variables. It saves time by adding what the user is most likely to add at the top of the compilation list. It also has recommendations based on open source projects on GitHub each with over 100 stars. When combined with the context of the existing code, the completion list is tailored to promote common practices. IntelliCode isn’t limited to statement completion. Signature help also recommends the most likely overload for your context. It’s also being used to detect coding styles and whitespace usages to format the code in a way that it looks consistent with the rest of the program.
IntelliCode has examined some of the most popular public GitHub repositories, more than 2,000 projects each with more than 100 stars, to figure out best coding practices.
SapFix is an AI hybrid tool created by Facebook engineers for debugging. The tool can suggest fixes for bugs in the code after which it proposes them to the programmers for their appoval and deployment. SapFix has been used to accelerate the process of shaping robust, stable code updates to millions of devices using Facebook Android app which is the first such use of AI-powered debugging at this scale. It also speeds up the process of rolling out new software.
SapFix can create patches that either fully or partially revert the code submission that introduced them. For more complex crashes, the system generates patches by drawing from its collection of templated fixes. These templates are generated based on a pool of past fixes. When previously used human-designed templates don’t fit, SapFix will attempt a mutation-based fix, whereby it performs small code modifications to the abstract syntax tree (AST) of the crash-causing statement, making adjustments to the patch until a potential solution is found.
A graphic illustrating how SapFix generates patches for software bugs. Image credit: Facebook.
Deployed in September 2017, Sapienz is a tool again developed by Facebook based on AI which helps SapFix find and fix code, before reaching the production. Along with Facebook’s Infer static analysis tool, it helps to localise the points in the code to patch. Once both the tools identify a particular part of the code associated with a crash, it passed the information to SapFix, which picks from a few strategies to generate a patch. The tool automatically designs, runs and reports the results of tens of thousands of test cases every day on the app.
In the first few months since its deployment, the technology has allowed engineers to fix issues within hours, and even minutes of the code being written. It has tested millions of lines of code in Facebook’s Android app.
6. Commit Assistant:
The Commit-Assistant aims to identify patterns in past bugs to better intercept new bugs. It will allow teams to save on debugging time and focus on the creation of quality features. It was made with a code of 10 years worth from Ubisoft’s software library, to speed up the company’s development process.
This was specifically for predicting bugs in a game’s code before even the error is committed.