Microsoft has shared details of its new deep learning project called BugLab. The new deep learning model is being taught to detect and fix bugs, and it does not even require labeled data to do that. The AI in development, BugLab, can just inspect the whole code and point out the buggy part of it.
Understanding the code
For a successful debugging process, an AI needs to understand the code’s structure and the comments that developers leave, variable names, and more. The language in developers’ code comments is not always easy to understand, even for humans, while the variable names can cause a serious headache. In the meantime, BugLab can handle all of them and shows the codes needed to be changed for a fix.
Microsoft also shared some examples showing BugLab’s capabilities. In the example below, the developer used the wrong comparison operator and BugLab shows the fix:
In another example, BugLab finds the problem caused by checking the wrong variable in the code and hands over the solution:
Microsoft says their main goal with the project is to create a better AI-based tool for finding and fixing the bugs in developers’ codes. That will save very valuable time for the developer, which should also result in shorter development times.
In order to develop a deep-learning AI tool, it needs to be fed with a lot of data, which is often called “training”. The more data fed, the more accurate results come out. Ironically, Microsoft needs to find a lot of buggy codes which is quite hard to find on the git sites.
Microsoft has created a second AI to overcome this problem, which creates bugs on working codes, then BugLab tries to find and fix it. In this way, the two models train each other by playing some kind of hide and seek game.