DroidLeakGuard is a Python-based tool designed to assist Android developers and researchers in detecting and analyzing potential resource leaks in Android applications. By leveraging method signature analysis and natural language processing (NLP) techniques, it aims to identify patterns that suggest improper resource handling, such as unreleased SQLite cursors, unclosed InputStream objects, or forgotten WakeLock.release() calls.
-
Method Signature Analysis: Combines method names, classes, parameters, return types, and descriptions to form comprehensive method signatures for analysis.
-
NLP Integration: Utilizes the sentence-transformers library to semantically compare method descriptions, aiding in the detection of similar patterns that could lead to resource leaks.
-
Data-Driven Approach: Employs CSV datasets (method signature combinations.csv and method signature combinations_2.csv) to store and compare method signatures systematically.
-
Ease of Use: Designed to run seamlessly in Python environments, with compatibility for IDEs like PyCharm.
-
Static Code Analysis: Identify potential resource leaks during the development phase by analyzing method signatures and their usage patterns.
-
Educational Tool: Serve as a learning resource for understanding common resource management pitfalls in Android development.
-
Research: Facilitate studies in software engineering by providing a framework to analyze and compare method behaviors related to resource handling.
git clone https://github.com/bonna46/DroidLeakGuard.git
pip install sentence-transformers
Open main.py in your preferred Python environment (e.g., PyCharm) and execute the script to begin analysis.
Method + Class + Parameter + Return type + Method Description