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.