一句话:提出 Catcher,结合静态异常传播分析与搜索式测试生成,高效检测客户端中可导致崩溃的 API 误用。
API 通常带有隐式使用约束,违反约束(API 误用)可能导致软件崩溃。现有检测工具大多误报率很高。本文提出 Catcher,将静态异常传播分析与自动搜索式测试用例生成相结合,以有效且高效地定位客户端应用中易崩溃的 API 误用。作者在 21 个 Java 应用上评估,针对 Java 平台 API 的误用。结果表明,Catcher 生成的测试用例可发现 243 个导致崩溃的唯一 API 误用;其中 77 个是传统基于覆盖率的测试生成器 EvoSuite 未能检测到的。此外,Catcher 为已识别误用生成测试用例的平均速度比 EvoSuite 快八倍。最后,Catcher 触发的大部分异常对开发者是意外的,既未在源码中处理,也未在客户端应用文档中列出。
Application Programming Interfaces (APIs) typically come with (implicit) usage constraints. The violations of these constraints (API misuses) can lead to software crashes. Even though there are several tools that can detect API misuses, most of them suffer from a very high rate of false positives. We introduce Catcher, a novel API misuse detection approach that combines static exception propagation analysis with automatic search-based test case generation to effectively and efficiently pinpoint crash-prone API misuses in client applications. We validate Catcher against 21 Java applications, targeting misuses of the Java platform's API. Our results indicate that Catcher is able to generate test cases that uncover 243 (unique) API misuses that result in crashes. Our empirical evaluation shows that Catcher can detect a large number of misuses (77 cases) that would remain undetected by the traditional coverage-based test case generator EvoSuite. Additionally, on average, Catcher is eight times faster than EvoSuite in generating test cases for the identified misuses. Finally, we find that the majority of the exceptions triggered by Catcher are unexpected to developers, i.e., not only unhandled in the source code but also not listed in the documentation of the client applications.
@inproceedings{paperbot5375,
title = {Effective and efficient API misuse detection via exception propagation and search-based testing},
author = {Maria Kechagia and Xavier Devroey and Annibale Panichella and Georgios Gousios and Arie van Deursen},
booktitle = {ISSTA},
year = {2019},
doi = {10.1145/3293882.3330552}
}