paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Static asynchronous component misuse detection for Android applications

Android 应用中静态异步组件误用检测
FSE Proceedings of the 28th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering2020匹配度 2/10 · 该论文是 Android AsyncTask 误用的经典过程间静态分析,虽涉及静态分析与工业落地,但不涉及机器学习、LLM/Agent、浮点程序分析或贝叶斯程序分析,与用户当前核心方向仅存在方法论上的弱关联。引用 8 inbox
Linjie Pan, Baoquan Cui, Hao Liu, Jiwei Yan, Siqi Wang, Jun Yan, Jian Zhang
crossref: 2026-09-12

AI 速览

一句话:提出流、上下文、对象与字段敏感的过程间静态分析,检测 Android 应用中 AsyncTask 的五类误用。

针对 Android 智能手机资源受限背景下 AsyncTask 被广泛使用却易遭误用的问题,本文通过调研官方文档和技术论坛总结了五类 AsyncTask 误用模式。为自动检测这些模式,作者提出一种流、上下文、对象和字段敏感的过程间静态分析方法,包括 typestate 分析、引用分析和循环分析,并依据预定义检测规则判定误用。该方法实现为工具 AsyncChecker,在自建基准 AsyncBench 和 1,759 个真实应用上评估。AsyncChecker 在 1,417 个真实应用中(80.6%)发现 17,946 个误用 AsyncTask 实例,精确率 97.2%、召回率 89.8%、F-measure 0.93,并比现有工具能检测更多异步问题。开发者经 GitHub 确认并修复了部分问题。

问题
Android 中 AsyncTask 组件使用广泛但易被误用,可能降低响应性甚至导致崩溃;现有工具难以全面检测其异步误用。
方法
作者总结五类 AsyncTask 误用模式,提出流、上下文、对象和字段敏感的过程间静态分析,结合 typestate、引用和循环分析,并根据预定义规则检测误用,实现为 AsyncChecker。
评估
在自建基准 AsyncBench 和 1,759 个真实 Android 应用上评估 AsyncChecker,报告误用检测数量、精确率、召回率和 F-measure,并与现有工具比较。
原文摘要(Abstract)

Facing the limited resource of smartphones, asynchronous programming significantly improves the performance of Android applications. Android provides several packaged components to ease the development of asynchronous programming. Among them, the AsyncTask component is widely used by developers since it is easy to implement. However, the abuse of AsyncTask component can decrease responsiveness and even lead to crashes. By investigating the Android Developer Documentation and technical forums, we summarize five misuse patterns about AsyncTask. To detect them, we propose a flow, context, object and field-sensitive inter-procedural static analysis approach. Specifically, the static analysis includes typestate analysis, reference analysis and loop analysis. Based on the AsyncTask-related information obtained during static analysis, we check the misuse according to predefined detection rules. The proposed approach is implemented into a tool called AsyncChecker. We evaluate AsyncChecker on a self-designed benchmark suite called AsyncBench and 1,759 real-world apps. AsyncChecker finds 17,946 misused AsyncTask instances in 1,417 real-world apps (80.6%). The precision, recall and F-measure of AsyncChecker on real-world applications are 97.2%, 89.8% and 0.93, respectively. Compared with existing tools, AsyncChecker can detect more asynchronous problems. We report the misuse problems to developers via GitHub. Several developers have confirmed and fixed the problems found by AsyncChecker. The result implies that our approach is effective and developers do take the misuse of AsyncTask as a serious problem.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot5721,
  title = {Static asynchronous component misuse detection for Android applications},
  author = {Linjie Pan and Baoquan Cui and Hao Liu and Jiwei Yan and Siqi Wang and Jun Yan and Jian Zhang},
  booktitle = {FSE},
  year = {2020},
  doi = {10.1145/3368089.3409699}
}