This site requires Cookies enabled in your browser for login.
Updating ...
WaterNet Home
WaterNet
for
pour le
Canada
Menu
WaterNet
Home
GWFO
Home
Catalogue
Master Index
Data
Centre
X
Find Data By Variable Find Data By Site, Facility, or Deployable Show Near-realtime Telemetry (7 day)
Collections
X
Defaults
Select All
Websites
X
Global Water Futures Observatories (GWFO) Global Water Futures (GWF) Global Institute for Water Security (GIWS) International Network of Alpine Research Catchment Hydrology
Legacy Research Programs
X
Changing Cold Regions Network (CCRN) Drought Research Initiative (DRI) International Network of Alpine Research Catchment Hydrology (Legacy Site) Improving Processes & Parameterization for Prediction in Cold Regions Hydrology (IP3) The Mackenzie Global Energy and Water Cycle Experiment (GEWEX) Study (MAGS)
Legacy sites
Map
Utilities
X
Account Settings Create a New Record Record List Alias List Editor
Edit Data Centre
Data Types
. . .
X
Clear
Select All
Advanced Search
Go to Top⇡
Related items loading ...
Fetching Chart ...
Publication Additional Information Download
Publication Type
Journal Article
Authorship
Uddin, G., Khomh, F., & Roy, C. K.
Title
Mining API usage scenarios from stack overflow
Year
2020
Publication Outlet
Information and Software Technology, 122, 106277
DOI
https://doi.org/10.1016/j.infsof.2020.106277
Citation
Uddin, G., Khomh, F., & Roy, C. K. (2020). Mining API usage scenarios from stack overflow. Information and Software Technology, 122, 106277. https://doi.org/10.1016/j.infsof.2020.106277
Abstract
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.
Program Affiliations
GWF: Global Water Futures
Publication Stage
Published
Download Links
https://doi.org/10.1016/j.infsof.2020.106277
© 2026 - WaterNet Version 2026-08-10
Global Water Futures Observatories
Powered by
G W F Net
T-2022-12-05-G2G1PI5G2Dr8kG1OMtbn8PfN3w Publication 1.0