Mobile apps are essential to our daily lives, making code quality a critical concern for developers. Behavioural code smells are characteristics in the source code that induce inappropriate code behaviour during execution, which negatively impact software quality in terms of performance, energy consumption, and memory.
Dynamic analysis has proven effective for detecting behavioral code defects in Android applications. Although it outperforms static analysis tools, it requires high coverage of code smell-related events, defined as specific instructions or method calls associated with inappropriate code behavior. In practice, this limitation results in a high rate of false negatives, leaving many instances of code defects undetected.
Large Language Models (LLM) have achieved notable advances across numerous research domains and offer significant potential for generating intelligent execution traces, particularly for detecting behavioural code smells in Android mobile applications. By intelligent execution trace, we mean a sequence of events generated by specific actions in a way that triggers the identification of a given behaviour.
In this work, the main contributions are : (1) DynamicsLLM, an enhanced tool built upon the state-of-the-art Dynamics approach, which leverages LLM to intelligently generate execution traces. (2) A hybrid approach designed to improve the coverage of code smell–related events, particularly for applications with a few number of activities. (3) A comprehensive evaluation of DynamicsLLM on 307 mobile applications from the open-source F-DROID dataset, including a comparison with the Dynamics tool. Our results show that, under a limited number of GUI actions, DynamicsLLM configured with 100% LLM covers up to three times more code smell–related events than Dynamics. The hybrid approach further improves LLM coverage by 22.6% for applications with a small number of activities. Moreover, 14% of code smell–related events that cannot be triggered by Dynamics are successfully triggered by our tool. (4) Finally, we introduce an exploration strategy based on UCB (Upper Confidence Bound), which achieves 12.9% additional coverage compared to the hybrid on medium-sized apps, while keeping competitive performance for the other categories.
| Date | 23 Mar 2026 |
|---|
| Original language | French |
|---|
| Awarding Institution | - École de technologie supérieure
|
|---|
| Supervisor | Naouel Moha (Supervisor) & Florent Avellaneda (Co-supervisor) |
|---|
Cherief, H. A. (Author),
Moha (Supervisor) & Avellaneda (Co-supervisor),
23 Mar 2026Student thesis: Master's thesis › Master in Engineering: Engineering