ARIST: An Effective API Argument Recommendation Approach
- URL: http://arxiv.org/abs/2306.06620v1
- Date: Sun, 11 Jun 2023 08:41:37 GMT
- Title: ARIST: An Effective API Argument Recommendation Approach
- Authors: Son Nguyen, Cuong Tran Manh, Kien T. Tran, Tan M. Nguyen, Thu-Trang
Nguyen, Kien-Tuan Ngo and Hieu Dinh Vo
- Abstract summary: We propose ARIST, a novel automated argument recommendation approach which suggests arguments by predicting developers' expectations.
In ARIST, the LMs and the recommending features are used to suggest the promising candidates identified by PA.
Our evaluation on a large dataset of real-world projects shows that ARIST improves the state-of-the-art approach by 19% and 18% in top-1 precision.
- Score: 5.809490691177338
- License: http://creativecommons.org/licenses/by-nc-nd/4.0/
- Abstract: Learning and remembering to use APIs are difficult. Several techniques have
been proposed to assist developers in using APIs. Most existing techniques
focus on recommending the right API methods to call, but very few techniques
focus on recommending API arguments. In this paper, we propose ARIST, a novel
automated argument recommendation approach which suggests arguments by
predicting developers' expectations when they define and use API methods. To
implement this idea in the recommendation process, ARIST combines program
analysis (PA), language models (LMs), and several features specialized for the
recommendation task which consider the functionality of formal parameters and
the positional information of code elements (e.g., variables or method calls)
in the given context. In ARIST, the LMs and the recommending features are used
to suggest the promising candidates identified by PA. Meanwhile, PA navigates
the LMs and the features working on the set of the valid candidates which
satisfy syntax, accessibility, and type-compatibility constraints defined by
the programming language in use. Our evaluation on a large dataset of
real-world projects shows that ARIST improves the state-of-the-art approach by
19% and 18% in top-1 precision and recall for recommending arguments of
frequently-used libraries. For general argument recommendation task, i.e.,
recommending arguments for every method call, ARIST outperforms the baseline
approaches by up to 125% top-1 accuracy. Moreover, for newly-encountered
projects, ARIST achieves more than 60% top-3 accuracy when evaluating on a
larger dataset. For working/maintaining projects, with a personalized LM to
capture developers' coding practice, ARIST can productively rank the expected
arguments at the top-1 position in 7/10 requests.
Related papers
- A Systematic Evaluation of Large Code Models in API Suggestion: When, Which, and How [53.65636914757381]
API suggestion is a critical task in modern software development.
Recent advancements in large code models (LCMs) have shown promise in the API suggestion task.
arXiv Detail & Related papers (2024-09-20T03:12:35Z) - Compositional API Recommendation for Library-Oriented Code Generation [23.355509276291198]
We propose CAPIR, which adopts a "divide-and-conquer" strategy to recommend APIs for coarse-grained requirements.
We present two challenging benchmarks, RAPID (Recommend APIs based on Documentation) and LOCG (Library-Oriented Code Generation)
Experimental results on these benchmarks, demonstrate the effectiveness of CAPIR in comparison to existing baselines.
arXiv Detail & Related papers (2024-02-29T18:27:27Z) - APIGen: Generative API Method Recommendation [16.541442856821]
APIGen is a generative API recommendation approach through enhanced in-context learning (ICL)
APIGen searches for similar posts to the programming queries from the lexical, syntactical, and semantic perspectives.
With the reasoning process, APIGen makes recommended APIs better meet the programming requirement of queries.
arXiv Detail & Related papers (2024-01-29T02:35:42Z) - Parameter-Efficient Conversational Recommender System as a Language
Processing Task [52.47087212618396]
Conversational recommender systems (CRS) aim to recommend relevant items to users by eliciting user preference through natural language conversation.
Prior work often utilizes external knowledge graphs for items' semantic information, a language model for dialogue generation, and a recommendation module for ranking relevant items.
In this paper, we represent items in natural language and formulate CRS as a natural language processing task.
arXiv Detail & Related papers (2024-01-25T14:07:34Z) - A Survey on Query-based API Recommendation [12.999521865816185]
Application Programming Interfaces (APIs) are designed to help developers build software more effectively.
To understand this research domain, we have surveyed to analyze API recommendation studies published in the last 10 years.
arXiv Detail & Related papers (2023-12-17T06:39:10Z) - Leveraging Large Language Models to Improve REST API Testing [51.284096009803406]
RESTGPT takes as input an API specification, extracts machine-interpretable rules, and generates example parameter values from natural-language descriptions in the specification.
Our evaluations indicate that RESTGPT outperforms existing techniques in both rule extraction and value generation.
arXiv Detail & Related papers (2023-12-01T19:53:23Z) - APICom: Automatic API Completion via Prompt Learning and Adversarial
Training-based Data Augmentation [6.029137544885093]
API recommendation is the process of assisting developers in finding the required API among numerous candidate APIs.
Previous studies mainly modeled API recommendation as the recommendation task, and developers may not yet be able to find what they need.
Motivated by the neural machine translation research domain, we can model this problem as the generation task.
We propose a novel approach APICom based on prompt learning, which can generate API related to the query according to the prompts.
arXiv Detail & Related papers (2023-09-13T15:31:50Z) - Large Language Models are Zero-Shot Rankers for Recommender Systems [76.02500186203929]
This work aims to investigate the capacity of large language models (LLMs) to act as the ranking model for recommender systems.
We show that LLMs have promising zero-shot ranking abilities but struggle to perceive the order of historical interactions.
We demonstrate that these issues can be alleviated using specially designed prompting and bootstrapping strategies.
arXiv Detail & Related papers (2023-05-15T17:57:39Z) - Recommendation as Instruction Following: A Large Language Model
Empowered Recommendation Approach [83.62750225073341]
We consider recommendation as instruction following by large language models (LLMs)
We first design a general instruction format for describing the preference, intention, task form and context of a user in natural language.
Then we manually design 39 instruction templates and automatically generate a large amount of user-personalized instruction data.
arXiv Detail & Related papers (2023-05-11T17:39:07Z) - Embedding Code Contexts for Cryptographic API Suggestion:New
Methodologies and Comparisons [9.011910726620536]
We present a new neural network-based approach, Multi-HyLSTM for API recommendation.
We use program analysis to guide the API embedding and recommendation.
In an analysis of 245 test cases, compared with the commercial tool Codota, we achieve a top-1 recommendation accuracy of 88.98%.
arXiv Detail & Related papers (2021-03-15T22:27:57Z) - Low-Resource Domain Adaptation for Compositional Task-Oriented Semantic
Parsing [85.35582118010608]
Task-oriented semantic parsing is a critical component of virtual assistants.
Recent advances in deep learning have enabled several approaches to successfully parse more complex queries.
We propose a novel method that outperforms a supervised neural model at a 10-fold data reduction.
arXiv Detail & Related papers (2020-10-07T17:47:53Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.