Iterative mining of resource-releasing specifications

Qian Wu, Guangtai Liang, Qianxiang Wang, Tao Xie, Hong Mei

Research output: Chapter in Book/Report/Conference proceedingConference contribution

Abstract

Software systems commonly use resources such as network connections or external file handles. Once finish using the resources, the software systems must release these resources by explicitly calling specific resource-releasing API methods. Failing to release resources properly could result in resource leaks or even outright system failures. Existing verification techniques could analyze software systems to detect defects related to failing to release resources. However, these techniques require resource-releasing specifications for specifying which API method acquires/releases certain resources, and such specifications are not well documented in practice, due to the large amount of manual effort required to document them. To address this issue, we propose an iterative mining approach, called RRFinder, to automatically mining resource-releasing specifications for API libraries in the form of (resource-acquiring, resource-releasing) API method pairs. RRFinder first identifies resource-releasing API methods, for which RRFinder then identifies the corresponding resource-acquiring API methods. To identify resource-releasing API methods, RRFinder performs an iterative process including three steps: model-based prediction, call-graph-based propagation, and class-hierarchy-based propagation. From heterogeneous information (e.g., source code, natural language), the model-based prediction employs a classification model to predict the likelihood that an API method is a resource-releasing method. The call-graph-based and class-hierarchy-based propagation propagates the likelihood information across methods. We evaluated RRFinder on eight open source libraries, and the results show that RRFinder achieved an average recall of 94.0% with precision of 86.6% in mining resource-releasing specifications, and the mined specifications are useful in detecting resource leak defects.

Original languageEnglish (US)
Title of host publication2011 26th IEEE/ACM International Conference on Automated Software Engineering, ASE 2011, Proceedings
Pages233-242
Number of pages10
DOIs
StatePublished - Dec 1 2011
Externally publishedYes
Event2011 26th IEEE/ACM International Conference on Automated Software Engineering, ASE 2011 - Lawrence, KS, United States
Duration: Nov 6 2011Nov 10 2011

Publication series

Name2011 26th IEEE/ACM International Conference on Automated Software Engineering, ASE 2011, Proceedings

Other

Other2011 26th IEEE/ACM International Conference on Automated Software Engineering, ASE 2011
CountryUnited States
CityLawrence, KS
Period11/6/1111/10/11

Keywords

  • resource leak detection
  • resource-releasing specification
  • specification mining

ASJC Scopus subject areas

  • Software

Fingerprint Dive into the research topics of 'Iterative mining of resource-releasing specifications'. Together they form a unique fingerprint.

Cite this