Please use this identifier to cite or link to this item: http://hdl.handle.net/10071/14222
Author(s): Santos, A. L.
Prendi, G.
Sousa, H.
Ribeiro, R.
Date: 2017
Title: Stepwise API usage assistance using n-gram language models
Volume: 131
Pages: 461 - 474
ISSN: 0164-1212
DOI (Digital Object Identifier): 10.1016/j.jss.2016.06.063
Keywords: API
Usability
N-grams
Code completion
IDE
Abstract: Reusing software involves learning third-party APIs, a process that is often time-consuming and error-prone. Recommendation systems for API usage assistance based on statistical models built from source code corpora are capable of assisting API users through code completion mechanisms in IDEs. A valid sequence of API calls involving different types may be regarded as a well-formed sentence of tokens from the API vocabulary. In this article we describe an approach for recommending subsequent tokens to complete API sentences using n-gram language models built from source code corpora. The provided system was integrated in the code completion facilities of the Eclipse IDE, providing contextualized completion proposals for Java taking into account the nearest lines of code. The approach was evaluated against existing client code of four widely used APIs, revealing that in more than 90% of the cases the expected subsequent token is within the 10-top-most proposals of our models. The high score provides evidence that the recommendations could help on API learning and exploration, namely through the assistance on writing valid API sentences.
Peerreviewed: yes
Access type: Open Access
Appears in Collections:CTI-RI - Artigos em revistas científicas internacionais com arbitragem científica

Files in This Item:
File Description SizeFormat 
paper.pdfPré-print773,17 kBAdobe PDFView/Open


FacebookTwitterDeliciousLinkedInDiggGoogle BookmarksMySpaceOrkut
Formato BibTex mendeley Endnote Logotipo do DeGóis Logotipo do Orcid 

Items in DSpace are protected by copyright, with all rights reserved, unless otherwise indicated.