| 引用本文: | 刘姝琪,周宇,杨慧文.组件感知的安卓应用崩溃自动复现方法.软件学报,2026,37(6):2455-2476 |
| |
|
| |
|
|
| 本文已被:浏览 669次 下载 740次 |
 码上扫一扫! |
|
|
| 组件感知的安卓应用崩溃自动复现方法 |
|
刘姝琪1,2, 周宇1,2, 杨慧文1,2
|
|
1.南京航空航天大学 计算机科学与技术学院, 江苏 南京 211106;2.高安全系统的软件开发与验证技术工信部重点实验室(南京航空航天大学), 江苏 南京 211106
|
|
| 摘要: |
| 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%. |
| 关键词: 崩溃复现 组件感知 堆栈跟踪 报告标题 |
| DOI:10.13328/j.cnki.jos.007468 |
| 分类号:TP311 |
| 基金项目:国家自然科学基金(62372232); 中央高校基本科研业务费专项资金(NG2023005) |
|
| Component-aware Automatic Crash Reproduction Method for Android Applications |
|
LIU Shu-Qi1,2, ZHOU Yu1,2, YANG Hui-Wen1,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 component interaction data from the CTG to accurately locate the target crash component. Second, based on the critical operations in the crash report title and the reachable paths in the CTG, CReDroid designs an adaptive strategy that uses the contextual relationship between the current page’s component and the crash component to assign priority scores to GUI widgets. The dynamic exploration process is globally optimized through reinforcement learning to effectively reduce inaccuracies in the prediction process. This study evaluates CReDroid using 74 crash reports and compares its performance with state-of-the-art crash reproduction tools, including CrashTranslator, ReCDroid, and ReproBot, as well as widely used automated testing tools, Monkey and APE. The experimental results show that CReDroid successfully reproduces 57 crash reports, which is 13, 25, 27, 30, and 17 more than CrashTranslator, ReCDroid, ReproBot, Monkey, and APE, respectively. Moreover, for the successfully reproduced crashes, CReDroid reduces the average reproduction time by 26.71%, 94.96%, 71.65%, 84.72%, and 88.56%, compared to CrashTranslator, ReCDroid, ReproBot, Monkey, and APE. |
| Key words: crash reproduction component awareness stack trace report title |
|
|
|
|