Ctrlflow Blog

Categories


Recent Posts


Codota: Your AI Pair Programmer

CtrlflowCtrlflow
This is the second post in our new series of blog posts on AI in software development, a topic that is dear to our heart here at Codetrails.

Codota

Codota is a self-styled “AI pair programmer” by the Israelian start-up of the same name. Like a human pair programmer, Codota sits next to you and offers suggestions while coding. In Codota’s case, this takes the form of a window hovering next to your Java IDE where Codota suggests fragments of real-world code that might be useful.

What Does It Do?

Whenever you select a variable, type or method in your IDE, the linked Codota window will show code examples that relate to the selected element and how you have used it so far (what methods you have called, etc.). You can then refine the search by adding further types or methods that should also occur in the examples. This can be done either free-form or by following Codota’s suggestions about types and methods that go well together. Once you have found a code example you like, it only takes two clicks to copy & paste it wholesale into your IDE.

The following video nicely showcases this workflow:

Where’s the AI?

The intelligence of Codota is in ranking the code examples so that the most relevant ones are shown at the top. This requires that Codota understands the language it analyzes (at the moment, this means Codota is limited to Java). The Codota application does not boil down the code example to its essence, i.e., the underlying pattern; you still see a (often messy) piece of real-world code in its entirety. That being said, the Web-based Codota frontend already makes some attempts to present the code snippets more concisely.

In addition to static analysis and information retrieval, there’s a fair amount of Big Data inside Codota: Its public knowledge base encompasses code from Github and Bitbucket as well as examples from Stack Overflow.

Where Can I Try it?

You can download Codota for all major platforms (Windows, macOS, Linux) and most IDEs (Eclipse, IntelliJ, Android Studio) from the company’s website. Searching through the public knowledge base is free; you only have to pay if you want to search your own, in-house knowledge base (this service has been announced but is not yet available).

Note: There is also the Codota Code Browsing Assistant for Chrome, which appaers to be a separate product. It overlays code snippets found on websites like Stack Overflow with additional information like Javadoc.


Dr. Marcel BruchAbout the author: Dr. Marcel Bruch is the founder of Codetrails and holds a PhD from Darmstadt University of Technology. He leads the Eclipse Code Recommenders project, which brought AI-powered developer assistance tools to over 4 million users.