• Cite Icon12
  • https://doi.org/10.1002/spe.2906Copy DOI Icon

APISonar: Mining API usage examples

Show More
  • Abstract
  • Literature Map
  • References
  • Citations
  • Similar Papers
Abstract

Abstract Developers spend a significant part of their time searching for code examples on the web. Often, they look for Application Programming Interface (API) usage examples, that is, how to use APIs provided by libraries and frameworks. For this purpose, several programming websites are available. Some programming websites provide manually created examples: unfortunately, as millions of APIs are available nowadays, they do not cover the majority of the APIs. To alleviate this limitation, other programming websites focus on automatically mining API usage examples from code repositories. To the best of our knowledge, however, these solutions are still very limited: they often present poor, duplicated, and similar API usage examples. In this article, we propose an approach, APISonar, to automatically mine API usage examples from code repositories. Our approach aims to overcome the limitations of current solutions: we focus on presenting readable and reusable API usage examples. We analyze millions of source files provided by 4486 software projects hosted on GitHub. Based on this data, we extract 11 million API usage examples about 1.5 million distinct APIs. We evaluate APISonar by assessing its quality and usage. We show that APISonar is a competitive solution, providing the best API examples in terms of readability and reusability, as compared with popular programming websites. Moreover, despite being a novel website, APISonar attracted a significant amount of users in a short period (3.7K users from 119 countries during 5 months). APISonar is available at www.apisonar.com.

Similar Papers
  • Conference Article
  • Citations3

Statistical API Completion Based on Code Relevance Mining

  • Feb 01, 2019
  • Chengpeng Wang +3
  • Conference Article
  • Citations2

Colloquy

  • Oct 21, 2020
  • João Antonio D M Bastos +2
  • Conference Article
  • Citations14

Evaluating forum discussions to inform the design of an API critic

  • Jun 01, 2012
  • Chandan R Rupakheti +1
  • Conference Article
  • Citations36

Temporal analysis of API usage concepts

  • Jun 01, 2012
  • Gias Uddin +2
  • Conference Article
  • Citations2

Using API-Embedding for API-Misuse Repair

  • Jun 27, 2020
  • Sebastian Nielebock +3
  • Conference Article
  • Citations2

Assessment of Three Dimensional CAD Models Using CAD Application Programming Interface

  • Nov 09, 2018
  • Sung-Hwan Joo
  • Book Chapter
  • Citations1

API Misuse Detection Based on Stacked LSTM

  • Jan 01, 2021
  • Lecture notes of the Institute for Computer Sciences, Social Informatics and Telecommunications Engineering
  • Shuyin Ouyang +3
  • Conference Article
  • Citations27

Recommending Proper API Code Examples for Documentation Purpose

  • Dec 01, 2011
  • Lee Wei Mar +2
  • Research Article

On-Demand API Non-Human-Reliant Tutorial Generation by LLM-Based Across-Language Knowledge Transfer

  • Feb 01, 2026
  • Wuhan University Journal of Natural Sciences
  • Zhiping Liu
  • Research Article
  • Citations16

Software Components and Product Variety in a Platform Ecosystem: A Dynamic Network Analysis of WordPress

  • Nov 18, 2022
  • Information Systems Research
  • Sungyong Um +3
  • Research Article
  • Citations1

Beyond Traditional WAFs: Behavioral Analytics for Advanced API Threat Detection and Response

  • May 15, 2025
  • European Journal of Computer Science and Information Technology
  • Naresh Kiran Kumar Reddy Yelkoti
  • Preprint Article
  • Citations7

Open-Source Multi-GPU-Accelerated QM/MM Simulations with AMBER and QUICK

  • Feb 16, 2021
  • ChemRxiv
  • Vinicius Cruzeiro +3
  • Single Report
  • Citations2

User Manual for EXODUS II Mesh Converter

  • Dec 09, 2014
  • E Shemon +1
  • Conference Article
  • Citations3

Relaxed

  • May 23, 2006
  • Jirka Kosek +1
  • Conference Article
  • Citations13

Compare and contrast: Visual exploration of source code examples

  • Sep 01, 2009
  • Rylan Cottrell +4
Cactus Communications logo

Copyright 2026 Cactus Communications. All rights reserved.