Cooperative API Misuse Detection Using Correction Rules
Channel: Chair of Software Engineering
Date: 08/02/2021

Sebastian Nielebock, Robert Heumüller, Jacob Krüger, and Frank Ortmeier. 2020. "Cooperative API Misuse Detection Using Correction Rules. In 42nd International Conference on Software Engineering - New Ideas and Emerging Results Track (ICSE-NIER'20)

Application Programming Interfaces (APIs) grant developers access to the functionalities of code libraries. Due to missing knowledge of how an API is correctly used, developers can unintentionally misuse APIs, and thus introduce bugs. To tackle this issue, recent techniques aim to automatically infer specifications for correct API usage and detect misuses. Unfortunately, these techniques suffer from high false-positive rates, leading to many false alarms. While we believe that existing techniques will improve in the future, in this paper, we propose to investigate a different route: We assume that a developer manually detected and fixed an API misuse relating to a third-party library. Based on the change, we can infer a correction rule for the API misuse. Then, we can use this correction rule to detect the same and similar API misuses in the same or other projects. This represents a cooperative technique to transfer the knowledge of API-misuse fixes to other developers. We report promising insights on an implementation and empirical evidence on the applicability of our technique based on 43 real-world API misuses.

You find the paper at https://dx.doi.org/10.1145/3387940.3392171
Data Sets and scripts are available under https://bitbucket.org/SNielebock/icse-2020-nier-cooperative-api-misuse/