Page 136 - 《软件学报》2026年第6期
P. 136
软件学报 ISSN 1000-9825, CODEN RUXUEW E-mail: jos@iscas.ac.cn
2026,37(6):2455−2476 [doi: 10.13328/j.cnki.jos.007468] [CSTR: 32375.14.jos.007468] http://www.jos.org.cn
©中国科学院软件研究所版权所有. Tel: +86-10-62562563
*
组件感知的安卓应用崩溃自动复现方法
刘姝琪 1,2 , 周 宇 1,2 , 杨慧文 1,2
1
(南京航空航天大学 计算机科学与技术学院, 江苏 南京 211106)
2
(高安全系统的软件开发与验证技术工信部重点实验室 (南京航空航天大学), 江苏 南京 211106)
通信作者: 周宇, E-mail: zhouyu@nuaa.edu.cn
摘 要: Android 应用开发人员需要快速、准确地复现错误报告以保障应用质量. 然而, 现有方法通常仅依赖堆栈
跟踪中提供的崩溃信息生成事件序列, 难以准确定位崩溃页面, 无法为动态探索提供有效指导以触发崩溃. 为解决
这一问题, 提出一种组件感知的安卓应用崩溃自动复现方法 CReDroid, 能够结合崩溃报告的标题信息和堆栈跟踪
来有效地复现崩溃. 首先, CReDroid 通过动态探索被测应用构建组件转换图 (component transition graph, CTG), 结
合堆栈跟踪的动态异常信息与 CTG 的静态组件交互信息, 精确定位目标崩溃组件; 其次, 基于崩溃报告标题中的
关键操作与 CTG 中的可达路径, 设计自适应评分策略, 利用当前页面所属组件与崩溃组件的上下文关系为 GUI 控
件分配选择优先级分数, 并通过强化学习全局优化动态探索过程, 有效减轻预测过程中的不准确性. 在 74 个崩溃
报告上评估了 CReDroid 的性能, 并与当前先进的崩溃复现工具 CrashTranslator、ReCDroid、ReproBot 以及广泛
使用的自动化测试工具 Monkey 和 APE 进行对比实验. 实验结果显示, CReDroid 成功复现了 57 个崩溃报告, 分别
比 CrashTranslator、ReCDroid、ReproBot、Monkey 和 APE 多复现 13、25、27、30 和 17 个. 此外, 在成功复现相
同崩溃的情况下, CReDroid 的平均用时较 CrashTranslator、ReCDroid、ReproBot、Monkey 和 APE 分别减少
26.71%、94.96%、71.65%、84.72% 和 88.56%.
关键词: 崩溃复现; 组件感知; 堆栈跟踪; 报告标题
中图法分类号: TP311
中文引用格式: 刘姝琪, 周宇, 杨慧文. 组件感知的安卓应用崩溃自动复现方法. 软件学报, 2026, 37(6): 2455–2476. http://www.jos.
org.cn/1000-9825/7468.htm
英文引用格式: Liu SQ, Zhou Y, Yang HW. Component-aware Automatic Crash Reproduction Method for Android Applications. Ruan
Jian Xue Bao/Journal of Software, 2026, 37(6): 2455–2476 (in Chinese). http://www.jos.org.cn/1000-9825/7468.htm
Component-aware Automatic Crash Reproduction Method for Android Applications
1,2
1,2
LIU Shu-Qi , ZHOU Yu , YANG Hui-Wen 1,2
1
(College of Computer Science and Technology, Nanjing University of Aeronautics and Astronautics, Nanjing 211106, China)
2
(Key Laboratory for Safety-critical Software Development and Verification (Nanjing University of Aeronautics and Astronautics), Ministry
of Industry and Information Technology, Nanjing 211106, China)
Abstract: Android application developers need to quickly and accurately reproduce error reports to ensure application quality. However,
existing methods often rely solely on crash information provided in stack traces to generate event sequences, making it difficult to
accurately locate the crash page and offer effective guidance for dynamic exploration to trigger the crash. To address this issue, this study
proposes a component-aware automatic crash reproduction method for Android applications, called CReDroid, which effectively reproduces
the crash by leveraging both the title and stack trace of the crash report. First, CReDroid dynamically explores the application under test to
construct a component transition graph (CTG) and combines the dynamic exception information from the stack traces with the static
* 基金项目: 国家自然科学基金 (62372232); 中央高校基本科研业务费专项资金 (NG2023005)
收稿时间: 2025-01-07; 修改时间: 2025-02-17, 2025-04-16; 采用时间: 2025-05-09; jos 在线出版时间: 2025-09-10
CNKI 网络首发时间: 2025-09-11

