Active Learning of Discriminative Subgraph Patterns for API Misuse Detection

04/21/2022
by   Hong Jin Kang, et al.
0

A common cause of bugs and vulnerabilities are the violations of usage constraints associated with Application Programming Interfaces (APIs). API misuses are common in software projects, and while there have been techniques proposed to detect such misuses, studies have shown that they fail to reliably detect misuses while reporting many false positives. One limitation of prior work is the inability to reliably identify correct patterns of usage. Many approaches confuse a usage pattern's frequency for correctness. Due to the variety of alternative usage patterns that may be uncommon but correct, anomaly detection-based techniques have limited success in identifying misuses. We address these challenges and propose ALP (Actively Learned Patterns), reformulating API misuse detection as a classification problem. After representing programs as graphs, ALP mines discriminative subgraphs. While still incorporating frequency information, through limited human supervision, we reduce the reliance on the assumption relating frequency and correctness. The principles of active learning are incorporated to shift human attention away from the most frequent patterns. Instead, ALP samples informative and representative examples while minimizing labeling effort. In our empirical evaluation, ALP substantially outperforms prior approaches on both MUBench, an API Misuse benchmark, and a new dataset that we constructed from real-world software projects.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
08/27/2021

An Experimental Analysis of Graph-Distance Algorithms for Comparing API Usages

Modern software development heavily relies on the reuse of functionaliti...
research
12/01/2017

A Systematic Evaluation of API-Misuse Detectors

Application Programming Interfaces (APIs) often have usage constraints, ...
research
03/22/2021

Comprehensive Integration of API Usage Patterns

Nowadays, developers often reuse existing APIs to implement their progra...
research
12/01/2017

A Systematic Evaluation of Static API-Misuse Detectors

Application Programming Interfaces (APIs) often have usage constraints, ...
research
08/01/2020

Guided Pattern Mining for API Misuse Detection by Change-Based Code Analysis

Lack of experience, inadequate documentation, and sub-optimal API design...
research
06/04/2023

Crypto-ransomware Detection through Quantitative API-based Behavioral Profiling

With crypto-ransomware's unprecedented scope of impact and evolving leve...
research
08/03/2022

API Usage Recommendation via Multi-View Heterogeneous Graph Representation Learning

Developers often need to decide which APIs to use for the functions bein...

Please sign up or login with your details

Forgot password? Click here to reset