arrow
Return

Mining API usage scenarios from stack overflow

delete2020-06-01
delete26
delete
OA
AI
G
Gias Uddin *
F
Foutse Khomh
C
Chanchal K. Roy
DOI:10.1016/j.infsof.2020.106277delete
deleteOriginal
deleteShare
deleteSave
View PDF
Abstract

Abstract

En 中文
Context: APIs play a central role in software development. The seminal research of Carroll et al. [15] on minimal manual and subsequent studies by Shull et al. [79] showed that developers prefer task-based API documentation instead of traditional hierarchical official documentation (e.g., Javadoc). The Q&A format in Stack Overflow offers developers an interface to ask and answer questions related to their development tasks. Objective: With a view to produce API documentation, we study automated techniques to mine API usage scenarios from Stack Overflow. Method: We propose a framework to mine API usage scenarios from Stack Overflow. Each task consists of a code example, the task description, and the reactions of developers towards the code example. First, we present an algorithm to automatically link a code example in a forum post to an API mentioned in the textual contents of the forum post. Second, we generate a natural language description of the task by summarizing the discussions around the code example. Third, we automatically associate developers reactions (i.e., positive and negative opinions) towards the code example to offer information about code quality. Results: We evaluate the algorithms using three benchmarks. We compared the algorithms against seven baselines. Our algorithms outperformed each baseline. We developed an online tool by automatically mining API usage scenarios from Stack Overflow. A user study of 31 software developers shows that the participants preferred the mined usage scenarios in Opiner over API official documentation. The tool is available online at: http://opiner.polymtl.ca/. Conclusion: With a view to produce API documentation, we propose a framework to automatically mine API usage scenarios from Stack Overflow, supported by three novel algorithms. We evaluated the algorithms against a total of eight state of the art baselines. We implement and deploy the framework in our proof-of-concept online tool, Opiner.
Keywords:
API
Mining
Usage
Documentation
Bootstrapping cookbooks for APIs from crowd knowledge on Stack Overflow
err2019-07-01
err16
errOAAI
errSouza, Lucas B. L.; Campos, Eduardo C.; Madeira, Fernanda; Paixao, Klerisson; Rocha, Adriano M.; Maia, Marcelo de Almeida
errShare
errSave
Generating API tags for tutorial fragments from Stack Overflow
err2021-05-08
err11
PREAI
errWu, Di; Jing, Xiao-Yuan; Zhang, Hongyu; Li, Bing; Xie, Yu; Xu, Baowen
errShare
errSave
errShare
errSave
Enriching API Documentation with Code Samples and Usage Scenarios from Crowd Knowledge
err2021-06-01
err20
PREAI
errZhang, Jingxuan; Jiang, He; Ren, Zhilei; Zhang, Tao; Huang, Zhiqiu
errShare
errSave

Journal

Information and Software Technology cover
Information and Software Technology
IF:
4.3
Papers:
3.8K
Citations:
9.5K

Organization

M
mcgill university
Scholars:
3.1K
Papers: 1.3K
Citations: 3.6W
Cited Papers

Cited Papers

Prompter
err2015-08-30
err32
PREAI
errPonzanelli, Luca; Bavota, Gabriele; Di Penta, Massimiliano; Oliveto, Rocco; Lanza, Michele
errShare
errSave
Understanding How and Why Developers Seek and Analyze API-Related Opinions
err2021-04-01
err16
errOAAI
errUddin, Gias; Baysal, Olga; Guerrouj, Latifa; Khomh, Foutse
errShare
errSave
errShare
errSave
errShare
errSave
Lacrimal Bone Thickness at the Lacrimal Sac Fossa
err1996-08-01
err0
PREAI
errJouko Hartikainen; Heikki J Aho; Heikki Seppä; Reidar Grenman
errShare
errSave
errShare
errSave
researcher View more