Scientific journal paper Q1
Stepwise API usage assistance using n-gram language models
André Santos (Santos, A. L.); Gonçalo Prendi (Prendi, G.); Hugo Sousa (Sousa, H.); Ricardo Ribeiro (Ribeiro, R.);
Journal Title
Journal of Systems and Software
Year (definitive publication)
2017
Language
English
Country
United States of America
More Information
Web of Science®

Times Cited: 6

(Last checked: 2024-07-21 14:21)

View record in Web of Science®


: 0.3
Scopus

Times Cited: 10

(Last checked: 2024-07-20 21:15)

View record in Scopus


: 0.3
Google Scholar

Times Cited: 19

(Last checked: 2024-07-18 00:49)

View record in Google Scholar

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.
Acknowledgements
--
Keywords
API,Usability,N-grams,Code completion,IDE
  • Computer and Information Sciences - Natural Sciences
Funding Records
Funding Reference Funding Entity
UID/CEC/50021/2013 Fundação para a Ciência e a Tecnologia

With the objective to increase the research activity directed towards the achievement of the United Nations 2030 Sustainable Development Goals, the possibility of associating scientific publications with the Sustainable Development Goals is now available in Ciência-IUL. These are the Sustainable Development Goals identified by the author(s) for this publication. For more detailed information on the Sustainable Development Goals, click here.