arrow
返回

Enriching API Documentation with Code Samples and Usage Scenarios from Crowd Knowledge

delete2021-06-01
delete20
PRE
AI
J
Jingxuan Zhang
H
He Jiang *
Z
Zhilei Ren
T
Tao Zhang
黄
黄志球 (Zhiqiu Huang)
DOI:10.1109/TSE.2019.2919304delete
delete原文链接
delete原文求助
delete分享
delete收藏
摘要

摘要

En 中文
As one key resource to learn Application Programming Interfaces (APIs), a lot of API reference documentation lacks code samples with usage scenarios, thus heavily hindering developers from programming with APIs. Although researchers have investigated how to enrich API documentation with code samples from general code search engines, two main challenges remain to be resolved, including the quality challenge of acquiring high-quality code samples and the mapping challenge of matching code samples to usage scenarios. In this study, we propose a novel approach named ADECK towards enriching API documentation with code samples and corresponding usage scenarios by leveraging crowd knowledge from Stack Overflow, a popular technical Question and Answer (Q&A) website attracting millions of developers. Given an API related Q&A pair, a code sample in the answer is extensively evaluated by developers and targeted towards resolving the question under the specified usage scenario. Hence, ADECK can obtain high-quality code samples and map them to corresponding usage scenarios to address the above challenges. Extensive experiments on the Java SE and Android API documentation show that the number of code-sample-illustrated API types in the ADECK-enriched API documentation is 3.35 and 5.76 times as many as that in the raw API documentation. Meanwhile, the quality of code samples obtained by ADECK is better than that of code samples by the baseline approach eXoaDocs in terms of correctness, conciseness, and usability, e.g., the average correctness values of representative code samples obtained by ADECK and eXoaDocs are 4.26 and 3.28 on a 5-point scale in the enriched Java SE API documentation. In addition, an empirical study investigating the impacts of different types of API documentation on the productivity of developers shows that, compared against the raw and the eXoaDocs-enriched API documentation, the ADECK-enriched API documentation can help developers complete 23.81 and 14.29 percent more programming tasks and reduce the average completion time by 9.43 and 11.03 percent.
Keyword:
Documentation
Programming
Java
Knowledge engineering
Search engines
Productivity
Task analysis
API documentation
code sample
usage scenario
stack overflow
crowd knowledge
AI总结

AI总结

对已上传原文的论文进行重点信息的提取,主要内容包括:简要概述、研究摘要、背景介绍、关键亮点、图文解析、展望与总结。

期刊

IEEE Transactions on Software Engineering 封面图
IEEE Transactions on Software Engineering
IF:
5.6
论文数:
2.9K
被引数:
1.1W

机构

H
Harbin Engineering University
学者数:
1.9W
论文数: 1.3W
被引数: 1.3W
D
Dalian University of Technology
学者数:
6.0W
论文数: 4.4W
被引数: 5.5W
引用论文

引用论文

err分享
err收藏
err
IF0
err
err0
PREAI
err
err分享
err收藏
Dual Hole Transport Layers Heterojunction and Band Alignment Engineered Mo:BiVO4 Photoanodes for Efficient Water Splitting (Small 37/2024)
err2024-09-13
err0
PREAI
errGuilin Wang; Tongxin Tang; Kai‐Hang Ye; Xin Ding; Junwei Chen; WenHao Zou; Yushen Xiao; JieYu Li; Long Zhao; Chaojie Chen; Sitong Ge; Lei Li; Xiujuan Wei; Chao Chen; Yang Cao; Zhan Lin; Shanqing Zhang
err分享
err收藏
How API Documentation Fails
err2015-07-01
err136
PREAI
errUddin, Gias; Robillard, Martin P.
err分享
err收藏
Unusual Photoisomerization Pathway in a Near-Infrared Light Absorbing Enzymerhodopsin
err2022-10-06
err0
PREAI
errMasahiro Sugiura; Kazuki Ishikawa; Kota Katayama; Yuji Sumii; Rei Abe-Yoshizumi; Satoshi P. Tsunoda; Yuji Furutani; Norio Shibata; Leonid S. Brown; Hideki Kandori
err分享
err收藏
Eosinophil-expressed galectin-3 regulates cell trafficking and migration
err2013-01-01
err0
errOAAI
errXiao Na Ge; Sung Gil Ha; Fu-Tong Liu; Savita P. Rao; P. Sriramarao
err分享
err收藏
err分享
err收藏
学者 查看更多内容