Visualizing API Usage Examples at Scale

Interactive Data VisualizationComputational Methods in HCISoftware Engineers & DevelopersHCI Researchers

Using existing APIs properly is a key challenge in programming, given that libraries and APIs are increasing in number and complexity. Programmers often search for online code examples in Q&A forums and read tutorials and blog posts to learn how to use a given API. However, there is often a massive number of related code examples and it is difficult for a user to understand the commonalities and variances among related examples, while being able to drill down to concrete details. We introduce an interactive visualization for exploring a large collection of code examples mined from open-source repositories at scale. This visualization summarizes hundreds of code examples in one synthetic code skeleton with statistical distributions for canonicalized statements and structures enclosing an API call. We implemented this interactive visualization for a set of Java APIs and found that, in a lab study, it helped users (1) answer significantly more API usage questions correctly and comprehensively and (2) explore how other programmers have used an unfamiliar API.

Quick Actions

Share

Share this page

ios_share

https://hci.top/en/papers/chi/7053/2018

AdRecommended

Learn AI Coding at CodeNow

At a Glance

Paper Snapshot

fact_check
dataset
Source
CHI
calendar_month
Year
2018
emoji_events
Award
No award tagged
group
Authors
4 authors
sell
Subtopics
Interactive Data Visualization, Computational Methods in HCI
work
Professions
Software Engineers & Developers, HCI Researchers
article
Content Status
Abstract only
hub
Related Papers
10 related papers