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

  • Authors:
  • Jue Wang;Yingnong Dang;Hongyu Zhang;Kai Chen;Tao Xie;Dongmei Zhang

  • Affiliations:
  • Tsinghua University, China;Microsoft Research, China;Tsinghua University, China;Peking University, China;North Carolina State University, USA;Microsoft Research, China

  • Venue:
  • Proceedings of the 10th Working Conference on Mining Software Repositories
  • Year:
  • 2013

Quantified Score

Hi-index 0.00

Visualization

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.