3.8 Proceedings Paper

Exposing Library API Misuses via Mutation Analysis

Publisher

IEEE
DOI: 10.1109/ICSE.2019.00093

Keywords

Mutation Analysis; Library API Misuses

Funding

  1. Hong Kong RGC/GRF Grant [16202917]
  2. MSRA Collaborative Research Award
  3. GPU Grant Program by NVIDIA
  4. National Natural Science Foundation of China [61802164]
  5. Science and Technology Innovation Committee Foundation of Shenzhen [ZDSYS201703031748284]
  6. Program for University Key Laboratory of Guangdong Province [2017KSYS008]
  7. United States NSF [1528133, 1618158]

Ask authors/readers for more resources

Misuses of library APIs are pervasive and often lead to software crashes and vulnerability issues. Various static analysis tools have been proposed to detect library API misuses. They often involve mining frequent patterns from a large number of correct API usage examples, which can be hard to obtain in practice. They also suffer from low precision due to an over-simplified assumption that a deviation from frequent usage patterns indicates a misuse. We make two observations on the discovery of API misuse patterns. First, API misuses can be represented as mutants of the corresponding correct usages. Second, whether a mutant will introduce a misuse can be validated via executing it against a test suite and analyzing the execution information. Based on these observations, we propose MUTAPI, the first approach to discovering API misuse patterns via mutation analysis. To effectively mimic API misuses based on correct usages, we first design eight effective mutation operators inspired by the common characteristics of API misuses. MUTAPI generates mutants by applying these imitation operators on a set of client projects and collects mutant-killing tests as well as the associated stack traces. Misuse patterns are discovered from the killed mutants that are prioritized according to their likelihood of causing API misuses based on the collected information. We applied MUTAPI on 16 client projects with respect to 73 popular Java APIs. The results show that MUTAPI is able to discover substantial API misuse patterns with a high precision of 0.73. It also achieves a recall of 0.49 on the MUBENCH benchmark, which outperforms the state-of-the-art techniques.

Authors

I am an author on this paper
Click your name to claim this paper and add it to your profile.

Reviews

Primary Rating

3.8
Not enough ratings

Secondary Ratings

Novelty
-
Significance
-
Scientific rigor
-
Rate this paper

Recommended

No Data Available
No Data Available