Automatic API Usage Scenario Documentation from Technical Q A Sites

02/16/2021
by   Gias Uddin, et al.
0

The online technical Q A site Stack Overflow (SO) is popular among developers to support their coding and diverse development needs. To address shortcomings in API official documentation resources, several research has thus focused on augmenting official API documentation with insights (e.g., code examples) from SO. The techniques propose to add code examples/insights about APIs into its official documentation. Reviews are opinionated sentences with positive/negative sentiments. However, we are aware of no previous research that attempts to automatically produce API documentation from SO by considering both API code examples and reviews. In this paper, we present two novel algorithms that can be used to automatically produce API documentation from SO by combining code examples and reviews towards those examples. The first algorithm is called statistical documentation, which shows the distribution of positivity and negativity around the code examples of an API using different metrics (e.g., star ratings). The second algorithm is called concept-based documentation, which clusters similar and conceptually relevant usage scenarios. An API usage scenario contains a code example, a textual description of the underlying task addressed by the code example, and the reviews (i.e., opinions with positive and negative sentiments) from other developers towards the code example. We deployed the algorithms in Opiner, a web-based platform to aggregate information about APIs from online forums. We evaluated the algorithms by mining all Java JSON-based posts in SO and by conducting three user studies based on produced documentation from the posts.

READ FULL TEXT
research
02/17/2021

Mining API Usage Scenarios from Stack Overflow

We propose a framework to mine API usage scenarios from Stack Overflow. ...
research
02/16/2021

Understanding How and Why Developers Seek and Analyze API-related Opinions

With the advent and proliferation of online developer forums as informal...
research
09/07/2017

Resolving API Mentions in Informal Documents

Developer forums contain opinions and information related to the usage o...
research
02/16/2021

Automatic Detection of Five API Documentation Smells: Practitioners' Perspectives

The learning and usage of an API is supported by official documentation....
research
09/21/2018

Augmenting Input Method Language Model with user Location Type Information

Geo-tags from micro-blog posts have been shown to be useful in many data...
research
05/28/2019

Analyzing and Supporting Adaptation of Online Code Examples

Developers often resort to online Q&A forums such as Stack Overflow (SO)...
research
04/19/2022

Example-based Synthesis of Static Analysis Rules

Static Analysis tools have rules for several code quality issues and the...

Please sign up or login with your details

Forgot password? Click here to reset