arrow
Return

API usage templates via structural generalization

delete2024-04-01
delete0
delete
OA
AI
M
May Mahmoud
R
Robert J. Walker *
J
Jörg Denzinger
DOI:10.1016/j.jss.2024.111974delete
deleteOriginal
deleteShare
deleteSave
View PDF
Abstract

Abstract

En 中文
APIs matter in software development, but determining how to use them can be challenging. Developers often refer to a small set of API usage examples, analysing the information there to understand and adapt them to their own context. Generalization over many examples may aid in understanding commonalities and differences, reducing information overload while including greater variety. We propose ASGard, a novel approach that generates API usage templates from examples. Approximating the formal problem of E -generalization, ASGard generalizes all syntactic and some semantic information within the examples to arrive at pseudocode representations that retain the commonality of the usage examples but abstract the varying aspects. We evaluate the templates from our approach and the patterns generated from PAM and MUDetect (two existing tools for API data mining), using a total of 1954 API usage examples across 59 different APIs. We measure the quality of the resulting templates: ASGard's templates have superior completeness and compression. We perform a user study on ASGard with 12 participants to compare the use of these templates in solving programming tasks, compared to MUDetect. We find that participants solved the programming tasks in significantly less time with ASGard. Participants expressed a general preference for using ASGard templates.
Keywords:
API usage
Coding templates
E-generalization
FACER: An API usage-based code-example recommender for opportunistic reuse
err2021-08-18
err10
PREAI
errAbid, Shamsa; Shamail, Shafay; Basit, Hamid Abdul; Nadi, Sarah
errShare
errSave
Understanding the API usage in Java
err2016-05-01
err45
PREAI
errQiu, Dong; Li, Bixin; Leung, Hareton
errShare
errSave
MULAPI: Improving API method recommendation with API usage location
err2018-08-01
err38
PREAI
errXu, Congying; Sun, Xiaobing; Li, Bin; Lu, Xintong; Guo, Hongjing
errShare
errSave
Mining API usage scenarios from stack overflow
err2020-06-01
err26
errOAAI
errUddin, Gias; Khomh, Foutse; Roy, Chanchal K.
errShare
errSave
errShare
errSave

Journal

Journal of Systems and Software cover
Journal of Systems and Software
IF:
4.1
Papers:
5.5K
Citations:
1.0W

Organization

U
University of Calgary
Scholars:
2.1K
Papers: 912
Citations: 2.2W
Cited Papers

Cited Papers

err
IF0
err
err0
PREAI
err
errShare
errSave
Towards energy-autonomous wake-up receiver using Visible Light Communication
err2016-01-01
err0
errOAAI
errJoyce Sariol Ramos; Ilker Demirkol; Josep Paradells; Daniel Vossing; Karim M. Gad; Martin Kasemann
errShare
errSave
err
IF0
err
err0
PREAI
err
errShare
errSave
errShare
errSave
errShare
errSave
More time for judo matches? Analysis of type of techniques, time, scores, and penalties in the Tokyo 2020 Olympic Games
err2022-09-08
err0
errOAAI
errRafael Lima Kons; Marcus F. Agostinho; João Paulo Lopes-Silva; Danilo França Conceição dos Santos; Daniele Detanico; Emerson Franchini
errShare
errSave
A field study of API learning obstacles
err2010-12-14
err260
PREAI
errRobillard, Martin P.; DeLine, Robert
errShare
errSave
Building more usable APIs
err1998-01-01
err68
PREAI
errMcLellan, SG; Roesler, AW; Tempest, JT; Spinuzzi, CI
errShare
errSave
Automated API Property Inference Techniques
err2013-05-01
err144
errOAAI
errRobillard, Martin P.; Bodden, Eric; Kawrykow, David; Mezini, Mira; Ratchford, Tristan
errShare
errSave
researcher View more