API recommendation based on Word Embeddings

Authors

  • Ana Martínez Saucedo Universidad Argentina de la Empresa, Argentina
  • Leonardo Henrique da Rocha Araujo Universidad Nacional del Centro de la provincia de Buenos Aires, Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET), Argentina
  • Guillermo Rodríguez Universidad Nacional del Centro de la provincia de Buenos Aires, Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET), Argentina

Keywords:

API recommendation, word embedding, microservices, software development

Abstract

In this new era where web services are trending and businesses constantly develop and expose APIs that can be used by third parties, finding one which fits a functional requirement is a daunting task. For this reason, websites such as ProgrammableWeb and APIs.guru offer a directory of API definitions that can be filtered and searched by developers. However, searching for APIs that conform to a requirement on those platforms is still a manual task, and searches are based on the inclusion or exclusion of query words in an API description that does not provide relevant results. For this reason, we have explored the application of word embeddings in the problem of API recommendation using Word2Vec, FastText and GloVe algorithms, as well as pre-trained domain-general and software engineering embeddings. We have constructed a dataset from APIs.guru and retrieved services descriptions to obtain their embeddings and calculate their similarity with a given query embedding. To this end, we created ten test queries with their relevant APIs using a subset of the original dataset. With a recall at 10 recommendations of 69.8% and a nDCG at 10 of 81.4%, we have obtained promising results which demonstrate embeddings can alleviate developers' searches for relevant APIs.

Downloads

Published

2023-07-04

Issue

Section

ASSE - Argentine Symposium on Software Engineering

How to Cite

Martínez Saucedo, A., da Rocha Araujo, L. H., & Rodríguez, G. (2023). API recommendation based on Word Embeddings. JAIIO, Jornadas Argentinas De Informática, 9(3). https://revistas.unlp.edu.ar/JAIIO/article/view/18226