APP-Miner: Detecting API Misuses via Automatically Mining API Path Patterns
Authors:
- 19 May 2024
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- p. 4034-4052
Abstract
Extracting API patterns from the source code has been extensively employed to detect API misuses. However, recent studies manually provide pattern templates as prerequisites, requiring prior software knowledge and limiting their extraction scope. This paper presents APP-Miner (API path pattern miner), a novel static analysis framework for extracting API path patterns via a frequent subgraph mining technique without pattern templates. The critical insight is that API patterns usually consist of APIs’ data-related operations and are commonplace. Therefore, we define API paths as the control flow graphs composed of APIs’ data-related operations, and thereby the maximum frequent subgraphs of the API paths are the probable API path patterns. We implemented APP-Miner and extensively evaluated it on four widely used open-source software: Linux kernel, OpenSSL, FFmpeg, and Apache httpd. We found 116, 35, 3, and 3 new API misuses from the above systems, respectively. Moreover, we gained 19 CVEs.Keywords
Funding Information
- National Natural Science Foundation of China
- China Postdoctoral Science Foundation
This publication has 32 references indexed in Scilit:
- A pattern-based approach to parametric specification mining2013
- Hector: Detecting Resource-Release Omission Faults in error-handling code for systems software2013
- Extending static analysis by mining project-specific rules2012
- Alattin: mining alternative patterns for defect detectionAutomated Software Engineering, 2011
- Automatic Generation of Object Usage Specifications from Large Method Traces2009
- Inferring Resource Specifications from Natural Language API Documentation2009
- Mining exception-handling rules as sequence association rules2009
- Efficient mining of frequent subgraphs in the presence of isomorphism2004
- gSpan: graph-based substructure pattern mining2003
- Complete Mining of Frequent Patterns from Graphs: Mining Graph DataMachine Learning, 2003