API Misuse Detection An Immune System inspired Approach

12/28/2020
by   Maxime Gallais-Jimenez, et al.
0

APIs are essential ingredients for developing complex software systems. However, they are difficult to learn and to use. Thus, developers may misuse them, which results in various types of issues. In this paper, we explore the use of a bio-inspired approach (artificial immune system) to detect API misuses in client code. We built APIMMUNE, a novel API misuse detector. We collect normal usages of a given APIs from the set of client programs using the APIs, especially after some API usages were fixed in those programs. The normal API usages are considered as normal body cells. We transform them into normal-usage signatures. Then, artificial detectors are randomly generated by generating artificial deviations from these usages with the objective of being different from the normal usage signatures. The generated detectors have the ability to detect risky uses of APIs exactly as the immune system detects foreign cells of the organism. Moreover, for the detection purpose, only the artificial detectors are necessary, without the need to disclose the code used to generate them. Our approach was evaluated on the misuses dataset of three APIs as well as on known misuses from a state of the art APIs misuses benchmarking dataset. APIMMUNE was also compared to four state-of-the-art API misuse detection tools. The results show that APIMMUNE has good detection accuracy and performance, and it can complement pattern-based tools for uncommon misuses detection.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
07/14/2022

Automated Change Rule Inference for Distance-Based API Misuse Detection

Developers build on Application Programming Interfaces (APIs) to reuse e...
research
07/30/2022

Mining unit test cases to synthesize API usage examples

Software developers study and reuse existing source code to understand h...
research
12/01/2017

A Systematic Evaluation of API-Misuse Detectors

Application Programming Interfaces (APIs) often have usage constraints, ...
research
08/26/2019

Analyzing 2.3 Million Maven Dependencies to Reveal an Essential Core in APIs

This paper addresses the following question: does a small, essential, co...
research
12/01/2017

A Systematic Evaluation of Static API-Misuse Detectors

Application Programming Interfaces (APIs) often have usage constraints, ...
research
08/04/2023

MASC: A Tool for Mutation-Based Evaluation of Static Crypto-API Misuse Detectors

While software engineers are optimistically adopting crypto-API misuse d...
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...

Please sign up or login with your details

Forgot password? Click here to reset