Mining effective temporal specifications from heterogeneous API data

  • Authors:
  • Qian Wu;Guang-Tai Liang;Qian-Xiang Wang;Hong Mei

  • Affiliations:
  • Institute of Software, School of Electronics Engineering and Computer Science, Peking University, Beijing, China;Institute of Software, School of Electronics Engineering and Computer Science, Peking University, Beijing, China;Institute of Software, School of Electronics Engineering and Computer Science, Peking University, Beijing, China;Institute of Software, School of Electronics Engineering and Computer Science, Peking University, Beijing, China

  • Venue:
  • Journal of Computer Science and Technology - Special issue on Natural Language Processing
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

Temporal specifications for Application Programming Interfaces (APIs) serve as an important basis for many defect detection tools. As these specifications are often not well documented, various approaches have been proposed to automatically mine specifications typically from API library source code or from API client programs. However, the library-based approaches take substantial computational resources and produce rather limited useful specifications, while the client-based approaches suffer from high false positive rates. To address the issues of existing approaches, we propose a novel specification mining approach, called MineHEAD, which exploits heterogeneous API data, including information from API client programs as well as API library source code and comments, to produce effective specifications for defect detection with low cost. In particular, MineHEAD first applies client-based specification mining to produce a collection of candidate specifications, and then exploits the related library source code and comments to identify and refine the real specifications from the candidates. Our evaluation results on nine open source projects show that MineHEAD produces effective specifications with average precision of 97.2%.