While implementing software projects, developers do not reinvent the wheel but try to reuse existing API calls and source code. In recent years, the problems related to recommending APIs and code snippets have been intensively investigated. Although current approaches have achieved encouraging performance, there is still the need to improve the recommendation process's effectiveness and efficiency. In this work, we reformulate the problem of API recommendations by proposing learning and recommending API sequences relevant to a given coding context. We present LUPE, a novel approach to API and code recommendation, exploiting cutting-edge deep learning techniques. Thanks to the underlying Encoder–Decoder architecture specialized in transforming sequences, LUPE can effectively learn the order in which invocations occur. The approach has been evaluated on two Android datasets and compared with GAPI and FACER, two state-of-the-art API recommender systems. Being fed with augmented training data, our conceived approach can obtain a high prediction accuracy, and produce a perfect match in several cases, hence outperforming the baselines.

Fitting missing API puzzles with machine translation techniques

Di Penta M.
2023-01-01

Abstract

While implementing software projects, developers do not reinvent the wheel but try to reuse existing API calls and source code. In recent years, the problems related to recommending APIs and code snippets have been intensively investigated. Although current approaches have achieved encouraging performance, there is still the need to improve the recommendation process's effectiveness and efficiency. In this work, we reformulate the problem of API recommendations by proposing learning and recommending API sequences relevant to a given coding context. We present LUPE, a novel approach to API and code recommendation, exploiting cutting-edge deep learning techniques. Thanks to the underlying Encoder–Decoder architecture specialized in transforming sequences, LUPE can effectively learn the order in which invocations occur. The approach has been evaluated on two Android datasets and compared with GAPI and FACER, two state-of-the-art API recommender systems. Being fed with augmented training data, our conceived approach can obtain a high prediction accuracy, and produce a perfect match in several cases, hence outperforming the baselines.
2023
API recommendation
Encoder–Decoder LSTM
Machine translation
Source code recommendation
File in questo prodotto:
Non ci sono file associati a questo prodotto.

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/20.500.12070/58659
Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus 2
  • ???jsp.display-item.citation.isi??? 1
social impact