Abstract:
Memory leaks in Java applications can degrade performance and even cause system crashes,
which seriously challenge developers. Most of the existing memory leak detection tools rely
on dynamic analysis, which is time consuming and computationally expensive. To deal with
the efficiency challenge, this project ""MemoryWise"" aims at the development of a static
analysis-based approach for detecting potential memory leaks in Java code and providing a
proactive tool for developers to maintain application performance.
MemoryWise is a static analysis and machine learning based approach to detect patterns
related to memory leaks. First, preprocessing is applied to a dataset of Java code samples that
are labelled with memory leak issues to extract features relevant to the code. Then it trains a
machine learning model to interpret these features in predicting potential memory leaks. The
model was developed and evaluated using classification algorithms with the prime goal of
accuracy optimization and reduction in false positives.
Preliminary testing of the prototype has provided early insight but also exposed areas needing
improvement in both accuracy and detection reliability. The proof of concept confirms the
ability in the detection of potential memory leaks but still needs tuning to reduce false
positives and improve overall performance. These results will lead the further improvements
and validation of the model, with the goal of optimizing MemoryWise for practical
application in Java.