Work

A Novel Code Completion Strategy

Year: 2022
Type: article
Abstract: Programmers rely on a multitude of techniques to speed up the development process. Among these techniques is code completion, a productivity improvement technique widely used by developers to explore APIs and automatically complete a word being typed by providing a progressively refined list of candidate words (or recommendations). Still called auto-completion, it reduces incorrect calls to APIs. Several techniques have been developed to obtain the list of candidates. Some methods use the history of the code, others neural networks or artificial intelligence; some exploit the program’s structure through AST. Often the recommendation list is long, and finding suitable candidates comes at a cost. In this work, we propose a strategy that improves the accuracy of recommendation list offered by code completion. We present a sorting approach based on the popularity and importance of the elements (suggestions) of the list by analyzing the usage data of classes, methods, and variables of projects in the same development environment. We implemented our sorting strategy in Pharo (IDE and language), an immersive modern programming environment to show its applicability. The empirical evaluation results of this strategy show that our approach improves the quality of the suggestions.
Language: English
Open Access status: diamond
OpenAlex ID: W4285299411
FWCI: 0.248
Cites: 18
Cited by: 3
Related to: 10