AI invites itself on the developer’s screen

DeepCode AI
DeepCodeAI
Published in
6 min readJun 17, 2020

Helping the developer to write his code but also to debug and test it, this is the ambition of many publishers and service companies. AI is increasingly asserting itself as a track to assist developers on a daily basis and allow them to develop more and better.

by Alain Clapaud Published on: June 16, 2020

auto-translation from the original source in French: https://www.lemagit.fr/actualites/252484744/Les-IA-sinvitent-sur-lecran-du-developpeur

While the developer remains a scarce commodity for companies, project managers would like to see their team members focus on developing new functions and reduce the time spent debugging what they wrote the day before. 20%, 30%, sometimes 50% of a developer’s time is taken up by tasks deemed to generate little value for the company. Artificial intelligence algorithms could have a role to play in tipping the scales toward the most creative tasks.

Harnessing AI to help developers isn’t entirely new. Microsoft developers are well aware of the IntelliSense function in Visual Studio. This auto-completion function offers the developer to complete his line of code while typing. With the 2018 edition of its Build conference, Microsoft has gone further by using Machine Learning to make this auto-completion a little smarter. The algorithm analyzes the code already written by the developer in order to broaden its recommendations. Called IntelliCode, the function offers AI-assisted auto-completion, but also learning about the developer’s own code (for C # developers only) and capabilities in terms of style conventions,

Altran publishes its internal tools on Github

Code analysis can also be used in bug detection, the commonly accepted idea being that the earlier a bug is detected in the application lifecycle, the less it will be costly to fix it. In this perspective, Altran recently unveiled the “Code Defect AI” tool. The latter aims to detect bugs in the source code by relying on various fairly conventional AI algorithms including decision trees ( random decision forests ), support vector machines, MLP ( multilayer perceptron ) and finally logistic regressions.

In the video presenting the project, Khalid Sebti, Vice President in charge of software engineering and cybersecurity at Altran, summarizes the objective of this tool: “in software engineering, the developer writes the code and verifies then its code in a version control system like Git. The test teams discover the bugs and publish them in a fault management system so that the engineers can go fix the bug. This process is repeated several times until that the code becomes stable and resistant. This back-and-forth is very expensive and it will be enormously valuable to reduce the number of these cycles. “

Khalid Sebti says that the first users of the solution were able to identify more than 20% of their code faults even before the start of the test phase. Altran recently presented “Code Defect AI” on the Microsoft AI Lab portal and offers its tools for download on Github. Khalid Sebti now wishes to couple this tool for predicting code faults with the selection of test cases: “The solution will identify the portions of code that are potentially buggy and propose a series of tests to maximize code coverage and increase the quality of product”.

When the NLP generates test cases

Many start-ups are now seeking to develop development assistance tools based on artificial intelligence algorithms. This is particularly the case of the French Ponicode, created by Patrick Joubert in June 2019. We remember that this serial entrepreneur had sold Recast.AI to SAP in 2018, and it is strong from this experience in NLP ( Natural Language Processing , or natural language processing) that he now applies this approach to computer code.

The founder explains his approach: “AI can be useful at the very start of the application development cycle, when the developer writes the code. It can intervene during code reviews, during tests, and more in the documentation phase. We intend to address all these different subjects, but we have chosen to start with unit testing. Just ask the developers if they like to test their code and the answer is no ! “

The algorithm created by Ponicode therefore automatically generates unit tests and works with the Microsoft VSCode editor in the form of an extension. When the developer writes a function, a small Ponicode logo is displayed when the AI ​​can generate tests from this code. With a right click it accesses a Webview where it will generate the tests in a few clicks. “Our AI is able to suggest test values. It currently suggests test cases and we will be able to calculate the code coverage value by the tests. This will allow us to assess the gains made by extending the tests created by the developer with those of Ponicode,

The product can currently be tested in private beta on a single language, JavaScript, but Patrick Joubert says he can quickly support many more languages: “with Recast.AI, we were the first to create NLP models independent of language and we let’s do the same with Ponicode. It is not yet the case, but we are making good progress so that our AI can be language independent. My goal is that, in the coming year, we will be available in all languages from the corporate world, Java, C #, as well as Python, React, Angular, PHP “. The closest rival for French seems to be the British Diffblue, a spin-off from the University of Oxford whose tool is also in Beta phase.

Machine Learning tracks bugs and vulnerabilities

If Ponicode and Diffblue focus on the generation of tests, the Swiss startup Deepcode focuses on debugging. Project funded by the European Horizon 2020 fund, this spin-off of the Federal Polytechnic of Zurich exploits Machine Learning to flush out bugs and vulnerabilities in the source code.

Boris Paskalev, CEO of Deepcode explains his positioning: “the auto-completion tools are very useful and allow to considerably speed up the entry of the code, but the analysis of large volumes of code makes it possible to identify the potential risks presented by a program based on who changed which element of the code and which comments were added. This approach changes completely in dimension if you manage to convert the logic and complex structure of a piece of code into a semantic representation and lead the learning a Machine Learning model. From then on, Machine Learning can engage in meaningful code analysis and become true Augmented Intelligence for developers .

The analysis of JavaScript, Python, Java and TypeScript languages ​​are currently priority in the start-up’s roadmap, but work on C / C ++ is launched. The solution is available on VS Code, IntelliJ IDEA, Sublime Text, PyCharm, Atom, WebStorm, CLion, Visual Studio Codespaces, GitPod.

Boris Paskalev estimates that algorithms will be able to relieve by half the time spent by developers debugging their code. “Our initial target for average productivity gain should be 10%. Other elements allow us to obtain these advantages: the treatment of production problems, the corrective measures to extinguish fires and the coordination / treatment of any impact of the problems. The long-term advantage is that developers will always learn the semantics and logic of the problem, so their knowledge will grow even faster over time. “

Multiple start-ups are looking to innovate along the CI / CD chain, such as Testim or Mabl for example in the field of functional test automation or Applitools and Retest to identify purely visual defects applications. Finally, the Test Automation Cloud platforms are not outdone with players such as Sauce Labs, Sealights are not outdone with announcements that go in this direction.

While many publishers say they use AI, few really master AI technologies and are content with much more conventional algorithms. Adrian Trifu, founder of Logarix, editor of AI Reviewer explains: “AI Reviewer does not use machine learning to analyze the source code, at least not yet. Our tool is based on static analysis and measurement of structural models of the code and uses heuristics to detect anti-patterns. Although a form of machine learning could in principle make sense, a purely “magic” AI-based solution is still a long way off, I think. However, we plan to use some form of AI in the future. “

If the level of maturity of the editors of tools which are exploited in the chain CI / CD remains still very heterogeneous, no doubt that the AI ​​is already announced as a precious help to the developers who will undoubtedly be able to devote more from coding to wasting time to testing.

--

--

DeepCode AI
DeepCodeAI

AI for Better Software: Identify bugs before they happen to fulfill developers’ true coding potential and deliver quality products, faster.