AI is not at the top, it is the right way to work with programmers to write code

https://mp.weixin.qq.com/s/y0KXKPG47wVkCPQS_y8Xmg

By 超神经

著名的游戏研发公司育碧( Ubisoft )和开源技术大厂 Mozila 近期发布了联手开发的 Clever-Commit 编程辅助工具,为工程师提供 Bug 预警和更正的功能。 

We once published the article "Assisting you in writing Python is just the first step for AI to replace programmers", introducing more and more AI tools in the process of writing code that can help engineers improve their code quality and work efficiency.

AI is not at the top, it is the right way to work with programmers to write code
Assisting you to write Python is just the first step for AI to replace programmers (click on the picture to read)

For example, Kite invested by GitHub CEO can intelligently perform the functions of code snippet completion, function call and document demo query according to the current production environment. We because Kite once ridiculed AI's ambitions not only to lay hands on humans, but to replace the functions of engineers in the end.
Of course these are just jokes. At present, it seems unlikely that AI wants to completely replace craftsmen. In the future, it will be more AI intervention to help engineers work more efficiently and with high quality.
AI is not at the top, it is the right way to work with programmers to write code
When you find that your code can't run

Recently, Clever-Commit, an AI coding assistant jointly developed by Mozila and Ubisoft, emerged, and its role is to rescue the engineers behind Firefox from the bug. On February 12, Mozila issued a message that they cooperated with Ubisoft to start using this tool, which promoted more efficient code writing, thereby bringing Firefox users a better browsing experience.

Clever-Commit: Early warning of high-energy bugs ahead!

The predecessor of Clever-Commit is the Commit-Assistant launched by Ubisoft last year.

AI is not at the top, it is the right way to work with programmers to write code
Commit-Assistant is a system for finding bugs and suggesting fixes. It is a code assistant that assists developers in improving the game experience. The birth of this AI assistant is due to their huge code base. It is said that during training, it accepted Ubisoft's working code for about ten years, including many codes that have been modified by bugs.

In this context, Mozlia and Ubisoft collaborated to launch an upgraded version of Clever-Commit.

Clever-Commit is an auxiliary programming tool, which can be simply said to be an AI assistant that checks the code. When a developer submits a code change to the Firefox code base, it can compare the newly added code with the previous one to see if it is similar to the bug that has been found. If the assistant judges that the newly submitted part is suspicious, it will alert the developer.

AI is not at the top, it is the right way to work with programmers to write code

If the assistant's judgment is accurate, it means that the bug can be found and alerted before submitting it to the source repository. For some bugs, Clever-Commit can even propose appropriate fixes.

Mozilla plans to first use Clever-Commit during code reviews and then expand it to other development stages over time. It is worth mentioning that it is fully applicable to the three languages ​​Mozilla uses for Firefox: C++, JavaScript and Rust.

What is the principle of finding bugs?

In fact, its appearance is inevitable, and the automatic prevention and resolution of faults is an inevitable way for software development. Existing methods use code and process measurement to build a measurement-based model, which can effectively prevent the insertion of defects in software projects.

The technology used here is called CLEVER, which was first developed by researchers from Ubisoft and Concordia University. They once wrote a paper "CLEVER: Combining Code Metrics with Clone Detection for Just-In-Time Fault Prevention and Resolution "in Large Industrial Projects", explained its details, in general it is a combined level of bug prevention and resolution technology.

AI is not at the top, it is the right way to work with programmers to write code
Article address: https://montreal.ubisoft.com/wp-content/uploads/2018/05/ICSE-CE-MSR-165.pdf

Its main point is to accurately determine whether it is a risky part when adding the code, so as to intercept or repair it.

There are two main stages in the implementation method. The first is to build a library based on existing indicators, which can determine whether the newly added code is similar to the risky code; the second stage is to add these seemingly dangerous in the code clone area. And then judge whether it is a risk code.
AI is not at the top, it is the right way to work with programmers to write code
AI is not at the top, it is the right way to work with programmers to write code

In addition, CLEVER not only evaluates the current project, it also considers other related projects, so it achieves higher intelligence. Based on code base matching and previous data accumulation, CLEVER is at a leading level in terms of bug recognition rate and improvement suggestions.

Cross-border cooperation between Ubisoft and Firefox

Speaking of why CLEVER is so powerful, it is because of its powerful resources. Ubisoft is a giant in the video game industry, specializing in the design and implementation of high-budget video games.
AI is not at the top, it is the right way to work with programmers to write code

The Ubisoft software system is highly coupled, contains millions of files and submissions, and is developed and maintained by more than 8,000 developers in 29 locations on six continents. This is a unique advantage for CLEVER's development and training.

In order to compare the performance of CLEVER, they conducted tests on 12 Ubisoft systems. The results showed that CLEVER achieved 79% accuracy and 65% recall rate for risky code submissions, which exceeded the similar method Commit-guru (66% accuracy) And 63% recall) performance. In addition, CLEVER can recommend to developers how to fix 66.7% of risky submissions.

Clever-Commit, which has applied CLEVER technology, is expected to achieve good results once it is fully integrated into the Mozilla development process, which will also greatly reduce the pain of developers. Before submitting, catch four to five vulnerabilities, and save more resources than only discovering them after submitting them.

AI is not at the top, it is the right way to work with programmers to write code

The Firefox engineering team has indicated that it will start using Clever-Commit during its code writing, testing, and release process. They expect to be able to save hundreds of hours of vulnerability risk analysis and detection through this method.

still got more?

There are other attempts to use machine learning to troubleshoot bugs from large code bases.

Last year, Microsoft launched a similar tool in Visual Studio: IntelliCode.

AI is not at the top, it is the right way to work with programmers to write code

It is reported that IntelliCode studied the most popular public GitHub repositories (more than 2,000 projects, each with more than 100) to discover the characteristics of best coding practices.

The original purpose of IntelliCode is rather conservative. It provides smarter IntelliSense completion suggestions based on how other projects use the same API and understand which suggestions are more likely to be used. It is also used to detect coding style and space usage so that it can write code in a similar way to code writing style.

Like Clever-Commit, IntelliCode can be used to find bugs. Provide timely remedies for developers’ short-term mistakes.

Super Nervous Encyclopedia

Attention mechanism

The visual attention mechanism is a brain signal processing mechanism unique to human vision. This is a way for humans to use limited attention resources to quickly screen high-value information from a large amount of information. It is a survival mechanism formed in the long-term evolution of humans. The human visual attention mechanism has greatly improved the efficiency and efficiency of visual information processing. accuracy.

The attention mechanism in deep learning is essentially similar to the selective visual attention mechanism of humans. The core goal is to select information that is more critical to the current task goal from a large number of information.

Attention Model (Attention Model) is widely used in various types of deep learning tasks such as natural language processing, image recognition, and speech recognition. It is one of the most worthy of attention and in-depth understanding of the core technologies in deep learning technology.

AI is not at the top, it is the right way to work with programmers to write code

Guess you like

Origin blog.51cto.com/14929242/2535602