Automated Change Rule Inference for Distance-Based API Misuse Detection

07/14/2022
by   Sebastian Nielebock, et al.
0

Developers build on Application Programming Interfaces (APIs) to reuse existing functionalities of code libraries. Despite the benefits of reusing established libraries (e.g., time savings, high quality), developers may diverge from the API's intended usage; potentially causing bugs or, more specifically, API misuses. Recent research focuses on developing techniques to automatically detect API misuses, but many suffer from a high false-positive rate. In this article, we improve on this situation by proposing ChaRLI (Change RuLe Inference), a technique for automatically inferring change rules from developers' fixes of API misuses based on API Usage Graphs (AUGs). By subsequently applying graph-distance algorithms, we use change rules to discriminate API misuses from correct usages. This allows developers to reuse others' fixes of an API misuse at other code locations in the same or another project. We evaluated the ability of change rules to detect API misuses based on three datasets and found that the best mean relative precision (i.e., for testable usages) ranges from 77.1 0.007 ChaRLI and our misuse detection are helpful complements to existing API misuse detectors.

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
02/16/2021

Automatic Detection of Five API Documentation Smells: Practitioners' Perspectives

The learning and usage of an API is supported by official documentation....
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
03/22/2021

Comprehensive Integration of API Usage Patterns

Nowadays, developers often reuse existing APIs to implement their progra...
research
05/11/2021

Dealing with Variability in API Misuse Specification

APIs are the primary mechanism for developers to gain access to external...
research
12/28/2020

API Misuse Detection An Immune System inspired Approach

APIs are essential ingredients for developing complex software systems. ...
research
09/09/2019

Sindarin: A Versatile Scripting API for the Pharo Debugger

Debugging is one of the most important and time consuming activities in ...

Please sign up or login with your details

Forgot password? Click here to reset