Improving Code Completion in Pharo Using N-gram Language Models

Show simple item record

dc.contributor.author Romaniuk, Myroslava
dc.date.accessioned 2024-02-15T09:44:09Z
dc.date.available 2024-02-15T09:44:09Z
dc.date.issued 2020
dc.identifier.citation Romaniuk, Myroslava. Improving Code Completion in Pharo Using N-gram Language Models / Romaniuk, Myroslava; Supervisor: Oleksandr Zaitsev, Marcus Denker; Ukrainian Catholic University, Department of Computer Sciences. – Lviv: 2020. – 39 p. uk
dc.identifier.uri https://er.ucu.edu.ua/handle/1/4520
dc.language.iso en uk
dc.title Improving Code Completion in Pharo Using N-gram Language Models uk
dc.type Preprint uk
dc.status Публікується вперше uk
dc.description.abstracten Code completion is one of the essential features of any IDE and it significantly im- proves the developer experience and productivity. Good code completion can both speed up the development process, as well as aid the developer in API exploration. On the other hand, having a slow or inaccurate completion can be very cumbersome. Thus, it is important to find a way to make it as effective as possible. The current implementation of code completion in the Pharo IDE is based on the abstract syntax tree (AST) of source code. The AST allows us to learn the semantic role and the kind of tokens (e.g. class name, method name, literal, et cetera) and to suggest contextually relevant completions. However, the current implementation has no efficient way to sort the completion candidates, which means that sometimes the user must scroll through a long list of proposed completions to find the one that they need. In this work, I study how code completion can be improved by sorting comple- tions in such a way that most frequently used tokens appear first. To that end, I implement a sorting plugin based on the n-gram language model. I use quantitative and qualitative evaluation techniques to compare the perfor- mance of the n-gram (unigram and bigram) and alphabetic sorters. As a result of the evaluation, the unigram sorter was shown to have the best performance. The sorting strategies implemented are part of a Pharo IDE plugin. It is open source and is available at https://github.com/myroslavarm/CompletionSorting. uk


Files in this item

This item appears in the following Collection(s)

Show simple item record

Search


Browse

My Account