Comprehensive Integration of API Usage Patterns

03/22/2021
by   Qi Shen, et al.
0

Nowadays, developers often reuse existing APIs to implement their programming tasks. A lot of API usage patterns are mined to help developers learn API usage rules. However, there are still many missing variables to be synthesized when developers integrate the patterns into their programming context. To deal with this issue, we propose a comprehensive approach to integrate API usage patterns in this paper. We first perform an empirical study by analyzing how API usage patterns are integrated in real-world projects. We find the expressions for variable synthesis is often non-trivial and can be divided into 5 syntax types. Based on the observation, we promote an approach to help developers interactively complete API usage patterns. Compared to the existing code completion techniques, our approach can recommend infrequent expressions accompanied with their real-world usage examples according to the user intent. The evaluation shows that our approach could assist users to integrate APIs more efficiently and complete the programming tasks faster than existing works.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
07/14/2022

Automated Change Rule Inference for Distance-Based API Misuse Detection

Developers build on Application Programming Interfaces (APIs) to reuse e...
research
11/15/2017

Programming Bots by Synthesizing Natural Language Expressions into API Invocations

At present, bots are still in their preliminary stages of development. M...
research
08/09/2023

Is unsafe an Achilles' Heel? A Comprehensive Study of Safety Requirements in Unsafe Rust Programming

Rust is an emerging, strongly-typed programming language focusing on eff...
research
11/03/2020

Exempla Gratis (E.G.): Code Examples for Free

Modern software engineering often involves using many existing APIs, bot...
research
05/16/2023

The Good, the Bad, and the Missing: Neural Code Generation for Machine Learning Tasks

Machine learning (ML) has been increasingly used in a variety of domains...
research
04/21/2022

Active Learning of Discriminative Subgraph Patterns for API Misuse Detection

A common cause of bugs and vulnerabilities are the violations of usage c...
research
01/27/2020

The Apiza Corpus: API Usage Dialogues with a Simulated Virtual Assistant

Virtual assistant technology has the potential to make a significant imp...

Please sign up or login with your details

Forgot password? Click here to reset