Concepedia

Publication | Open Access

Mining succinct and high-coverage API usage patterns from source code

192

Citations

19

References

2013

Year

TLDR

Developers often need to discover API usage patterns, but existing documentation is sparse and mining approaches produce many redundant patterns without quality metrics, hindering practical adoption. This paper introduces two quality metrics—succinctness and coverage—and proposes the Usage Pattern Miner (UP‑Miner) to extract succinct, high‑coverage API usage patterns from source code. UP‑Miner was evaluated on a large Microsoft codebase. Results show UP‑Miner outperforms the MAPO baseline and Microsoft developers report its usefulness in practice.

Abstract

During software development, a developer often needs to discover specific usage patterns of Application Programming Interface (API) methods. However, these usage patterns are often not well documented. To help developers to get such usage patterns, there are approaches proposed to mine client code of the API methods. However, they lack metrics to measure the quality of the mined usage patterns, and the API usage patterns mined by the existing approaches tend to be many and redundant, posing significant barriers for being practical adoption. To address these issues, in this paper, we propose two quality metrics (succinctness and coverage) for mined usage patterns, and further propose a novel approach called Usage Pattern Miner (UP-Miner) that mines succinct and high-coverage usage patterns of API methods from source code. We have evaluated our approach on a large-scale Microsoft codebase. The results show that our approach is effective and outperforms an existing representative approach MAPO. The user studies conducted with Microsoft developers confirm the usefulness of the proposed approach in practice.

References

YearCitations

Page 1