Loading…
Synthesising Linear API Usage Examples for API Documentation
Code examples are essential resources for learning application programming interfaces (APIs). The shortage of such examples can be a major learning obstacle for API users. Writing and maintaining effective API usage examples can also be an effort-intensive and repetitive process for API developers b...
Saved in:
Main Authors: | , , |
---|---|
Format: | Conference Proceeding |
Language: | English |
Subjects: | |
Online Access: | Request full text |
Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
Summary: | Code examples are essential resources for learning application programming interfaces (APIs). The shortage of such examples can be a major learning obstacle for API users. Writing and maintaining effective API usage examples can also be an effort-intensive and repetitive process for API developers because API users ideally want such examples to be simple, standalone, and linear. To address these challenges, several approaches have been proposed to automatically extract API code examples from various resources and embed them into official API documents; however, little emphasis has been placed on addressing the underlying issue directly and helping API developers write and maintain API usage examples. In this paper, we present a new approach for automatically synthesising linear code examples from less repetitive versions by in-lining reusable utility methods. The proposed approach aims to benefit API developers in terms of productivity and maintainability, as well as API users in terms of API learnability and comprehension. We have implemented the proposed approach in a prototype for the Java programming language, which we also discuss in this paper. |
---|---|
ISSN: | 2576-3148 |
DOI: | 10.1109/ICSME55016.2022.00084 |