Loading...
LLM4Leaks: Android memory leak detection using large language models
Shoaib, Muhammad Faraz ; Shah Rouniyar, Atish ; Tashfeen, Muhammad Tehmasib Ali
Shoaib, Muhammad Faraz
Shah Rouniyar, Atish
Tashfeen, Muhammad Tehmasib Ali
Citations
Altmetric:
Files
Loading...
Shoaib_2026.pdf
Adobe PDF, 85.43 KB
Other Names
Location
Time Period
Advisors
Original Date
Digitization Date
Issue Date
2026-03-24
Type
Abstract
Genre
Keywords
Subjects (LCSH)
Citation
Abstract
Memory leaks remain a persistent challenge in Android applications, leading to degraded performance, increased energy consumption, and poor user experience. As mobile technologies increasingly support businesses, healthcare systems, public services, and educational institutions across Kansas and the United States, improving software reliability is critical for strengthening digital infrastructure. Although Android's official documentation outlines scenarios that can cause memory leaks, large-scale empirical validation of these constraints remains limited. In this work, we present a comprehensive study of memory leak patterns across thousands of real-world Android applications using a hybrid approach that combines static analysis and machine learning. We identified and formalized 12 memory leak constraints derived from official Android guidelines, capturing both temporary and permanent leak scenarios. Based on these constraints, we developed LeakScope, a hybrid detector that combines constraint-aware static analysis with fine-tuned LLMs to detect violations. To evaluate the approach at scale, we analyzed over 10,000 open-source Android projects from GitHub, of which 627 successfully compiled. Across these projects, we identified more than 1,000 potential memory leak violations, which were manually validated to construct a high-quality labeled dataset of 520 leaks. Using this dataset, we fine-tuned large language models (LLMs) to classify and predict memory leak scenarios. Preliminary results from initial fine-tuning show that fine-tuned LLMs achieve approximately 90% classification accuracy, demonstrating strong potential as a complementary approach to traditional static analysis. Retraining on the fully validated dataset is ongoing and expected to further improve performance. By advancing automated detection of mobile software reliability issues, this research supports innovation in artificial intelligence and software engineering, strengthening the growing technology ecosystem within Kansas and beyond.
Table of Contents
Description
Poster project completed at Wichita State University, School of Computing
Presented at the 23rd Annual Capitol Graduate Research Summit, Topeka, KS, March 24, 2026.
Presented at the 23rd Annual Capitol Graduate Research Summit, Topeka, KS, March 24, 2026.
Publisher
Wichita State University
