Chuniversiteit logomarkChuniversiteit.nl
The Toilet Paper

Do software engineers use autocompletion features differently than other developers?

If you suspect that Betteridge’s law of headlines strikes again, you’re probably right.

Fictitious example of an autocompletion feature in an IDE
These are not the methods you are looking for

Programmers in movies are often able to crank out working code with seemingly very little effort. In real life, programmers often rely on IDE features like autocompletion to produce correct code quickly. Amlekar et al. studied the differences in autocompletion usage between people who program for a living and people who do it “on the side”.

Why it matters

Link

Most integrated development environments (IDEs) offer some form of autocompletion feature which proposes potentially relevant code fragments that can be easily inserted using a single keystroke. This is useful, because:

  • It’s no longer necessary to memorise (or manually lookup) which methods can be called on an object;

  • It’s harder to write calls to methods and properties that don’t actually exist;

  • It saves keystrokes, which .

One might expect that , who spend much more time within IDEs than other developers (researchers, hobbyists, and students), use autocompletion differently. That would imply that professionals have different needs, and IDEs should adapt their autocompletion behaviour for this special group of users.

How the study was conducted

Link

The authors tried to answer these questions using the MSR 2018 challenge dataset, which .

The dataset contains 194,500 autocompletion events. Most autocompletion events are terminated because the developer:

  • applies one of the proposed code fragments;

  • cancels autocompletion altogether; or

  • filters the list of proposed code fragments in an attempt to obtain better suggestions.

Autocompletion events that are terminated in other ways or are triggered by developers for whom their job role is not known are filtered out. After filtering about 39,000 events remain.

These are used to calculate autocompletion ratios (share of autocompletion events within the total number of events within a single programming session) and determine the types of proposed code fragments (e.g. type, variable, and method names).

What discoveries were made

Link

The results are fairly straightforward, but are best taken with a grain of salt due to the small size of the dataset:

  • Autocompletion rates are similar for professional developers and other types of developers. The median rate is slightly higher for other developers, but the difference is not statistically significant;

  • Professional developers and other types of developers also use autocompletion for similar code fragment types. Again, it’s not that there are no differences at all – it’s just that they don’t mean much.

Summary

Link
  1. Professional developers do not use autocompletion differently than other developers like researchers, hobbyists, and students