LeakScope: Android Lifecycle & Memory Leak Violations
About this report: This issue was automatically generated by LeakScope, a static analysis tool for Android lifecycle violations and memory leaks built on the Soot framework. This is part of an ongoing academic research study targeting ICSE 2027. No immediate action is required — we would greatly appreciate your feedback on whether these findings are accurate.
Summary
LeakScope detected 34 potential issue(s) across 2 detector type(s):
| Severity |
Count |
| 🔴 High |
2 |
| 🟡 Medium |
0 |
| 🟢 Low (improvement opportunity) |
32 |
| Detector |
Count |
Severity |
Description |
FragmentViewFieldRetentionLeak |
2 |
🔴 High |
Fragment stores View references in instance fields not cleared in onDestroyView() |
ViewBindingOpportunity |
32 |
🟢 Low |
Manual findViewById() calls — ViewBinding migration opportunity |
Detailed Findings
🔴 FragmentViewFieldRetentionLeak
Fragment stores View references in instance fields not cleared in onDestroyView()
Finding #1 — AdvancedFragment
Fragment View Field Retention Leak Detected
Class: io.github.alexmofer.projectx.business.others.ftp.advanced.AdvancedFragment
Issue:
- Fragment stores View references in instance fields
- These fields are not cleared when the view is destroyed
- onDestroyView() is missing
Leaked Fields:
• mVPort : android.widget.EditText (assigned in onViewCreated)
• mVAuto : android.widget.CheckBox (assigned in onViewCreated)
• mVUri : android.widget.Button (assigned in onViewCreated)
Why this is dangerous:
- Fragment views are destroyed/recreated on config changes
- Retained View references prevent garbage collection
- Leaked Views hold references to Activity Context
- Can cause OutOfMemoryError with repeated Fragment transactions
Recommended Fix:
Override onDestroyView() and clear all View/Binding fields:
@Override
public void onDestroyView() {
super.onDestroyView();
mVPort = null;
mVAuto = null;
mVUri = null;
}
Finding #2 — LegacyFragment
Fragment View Field Retention Leak Detected
Class: io.github.alexmofer.projectx.business.others.ftp.legacy.LegacyFragment
Issue:
- Fragment stores View references in instance fields
- These fields are not cleared when the view is destroyed
- onDestroyView() is missing
Leaked Fields:
• mVPort : android.widget.EditText (assigned in onViewCreated)
• mVAuto : android.widget.CheckBox (assigned in onViewCreated)
• mVPath : android.widget.Button (assigned in onViewCreated)
Why this is dangerous:
- Fragment views are destroyed/recreated on config changes
- Retained View references prevent garbage collection
- Leaked Views hold references to Activity Context
- Can cause OutOfMemoryError with repeated Fragment transactions
Recommended Fix:
Override onDestroyView() and clear all View/Binding fields:
@Override
public void onDestroyView() {
super.onDestroyView();
mVPort = null;
mVAuto = null;
mVPath = null;
}
🟢 ViewBindingOpportunity
Manual findViewById() calls — ViewBinding migration opportunity
Finding #3 — TextDrawableActivity
View Binding Migration Opportunity
Class: io.github.alexmofer.projectx.business.drawables.textdrawable.TextDrawableActivity
Type: Activity
Current Pattern: Manual view lookup
findViewById() Calls:
• findViewById in onCreate
• findViewById in onCreate
Benefits of View Binding:
- Eliminates boilerplate findViewById() calls
- Compile-time type safety for view references
- Reduced null pointer exceptions
- Cleaner, more maintainable code
Note: This is a code modernization suggestion, not a memory leak
Finding #4 — SmoothInputLayoutActivity
View Binding Migration Opportunity
Class: io.github.alexmofer.projectx.business.widgets.smoothinputlayout.SmoothInputLayoutActivity
Type: Activity
Current Pattern: Manual view lookup
findViewById() Calls:
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
Benefits of View Binding:
- Eliminates boilerplate findViewById() calls
- Compile-time type safety for view references
- Reduced null pointer exceptions
- Cleaner, more maintainable code
Note: This is a code modernization suggestion, not a memory leak
Finding #5 — RetrofitActivity
View Binding Migration Opportunity
Class: io.github.alexmofer.projectx.business.others.retrofithelper.RetrofitActivity
Type: Activity
Current Pattern: Manual view lookup
findViewById() Calls:
• findViewById in onCreate
• findViewById in onCreate
Benefits of View Binding:
- Eliminates boilerplate findViewById() calls
- Compile-time type safety for view references
- Reduced null pointer exceptions
- Cleaner, more maintainable code
Note: This is a code modernization suggestion, not a memory leak
Finding #6 — WrapLayoutActivity
View Binding Migration Opportunity
Class: io.github.alexmofer.projectx.business.widgets.wraplayout.WrapLayoutActivity
Type: Activity
Current Pattern: Manual view lookup
findViewById() Calls:
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
Benefits of View Binding:
- Eliminates boilerplate findViewById() calls
- Compile-time type safety for view references
- Reduced null pointer exceptions
- Cleaner, more maintainable code
Note: This is a code modernization suggestion, not a memory leak
Finding #7 — RecyclePagerActivity
View Binding Migration Opportunity
Class: io.github.alexmofer.projectx.business.widgets.recyclepager.RecyclePagerActivity
Type: Activity
Current Pattern: Manual view lookup
findViewById() Calls:
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
Benefits of View Binding:
- Eliminates boilerplate findViewById() calls
- Compile-time type safety for view references
- Reduced null pointer exceptions
- Cleaner, more maintainable code
Note: This is a code modernization suggestion, not a memory leak
Finding #8 — MultifunctionalRecyclerViewActivity
View Binding Migration Opportunity
Class: io.github.alexmofer.projectx.business.widgets.multifunctionalrecyclerview.MultifunctionalRecyclerViewActivity
Type: Activity
Current Pattern: Manual view lookup
findViewById() Calls:
• findViewById in onCreate
Benefits of View Binding:
- Eliminates boilerplate findViewById() calls
- Compile-time type safety for view references
- Reduced null pointer exceptions
- Cleaner, more maintainable code
Note: This is a code modernization suggestion, not a memory leak
Finding #9 — HeaderFooterGridViewActivity
View Binding Migration Opportunity
Class: io.github.alexmofer.projectx.business.widgets.headerfootergridview.HeaderFooterGridViewActivity
Type: Activity
Current Pattern: Manual view lookup
findViewById() Calls:
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
Benefits of View Binding:
- Eliminates boilerplate findViewById() calls
- Compile-time type safety for view references
- Reduced null pointer exceptions
- Cleaner, more maintainable code
Note: This is a code modernization suggestion, not a memory leak
Finding #10 — GridDrawableActivity
View Binding Migration Opportunity
Class: io.github.alexmofer.projectx.business.drawables.griddrawable.GridDrawableActivity
Type: Activity
Current Pattern: Manual view lookup
findViewById() Calls:
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
Benefits of View Binding:
- Eliminates boilerplate findViewById() calls
- Compile-time type safety for view references
- Reduced null pointer exceptions
- Cleaner, more maintainable code
Note: This is a code modernization suggestion, not a memory leak
Finding #11 — OpenTypeActivity
View Binding Migration Opportunity
Class: io.github.alexmofer.projectx.business.others.opentype.OpenTypeActivity
Type: Activity
Current Pattern: Manual view lookup
findViewById() Calls:
• findViewById in onCreate
Benefits of View Binding:
- Eliminates boilerplate findViewById() calls
- Compile-time type safety for view references
- Reduced null pointer exceptions
- Cleaner, more maintainable code
Note: This is a code modernization suggestion, not a memory leak
Finding #12 — FtpActivity
View Binding Migration Opportunity
Class: io.github.alexmofer.projectx.business.others.ftp.FtpActivity
Type: Activity
Current Pattern: Manual view lookup
findViewById() Calls:
• findViewById in onCreate
Benefits of View Binding:
- Eliminates boilerplate findViewById() calls
- Compile-time type safety for view references
- Reduced null pointer exceptions
- Cleaner, more maintainable code
Note: This is a code modernization suggestion, not a memory leak
Finding #13 — IndicatorTabStripActivity
View Binding Migration Opportunity
Class: io.github.alexmofer.projectx.business.widgets.indicatortabstrip.IndicatorTabStripActivity
Type: Activity
Current Pattern: Manual view lookup
findViewById() Calls:
• findViewById in onCreate
• findViewById in onCreate
Benefits of View Binding:
- Eliminates boilerplate findViewById() calls
- Compile-time type safety for view references
- Reduced null pointer exceptions
- Cleaner, more maintainable code
Note: This is a code modernization suggestion, not a memory leak
Finding #14 — FontActivity
View Binding Migration Opportunity
Class: io.github.alexmofer.projectx.business.others.font.FontActivity
Type: Activity
Current Pattern: Manual view lookup
findViewById() Calls:
• findViewById in onCreate
Benefits of View Binding:
- Eliminates boilerplate findViewById() calls
- Compile-time type safety for view references
- Reduced null pointer exceptions
- Cleaner, more maintainable code
Note: This is a code modernization suggestion, not a memory leak
Finding #15 — MultifunctionalImageViewActivity
View Binding Migration Opportunity
Class: io.github.alexmofer.projectx.business.widgets.multifunctionalimageview.MultifunctionalImageViewActivity
Type: Activity
Current Pattern: Manual view lookup
findViewById() Calls:
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
Benefits of View Binding:
- Eliminates boilerplate findViewById() calls
- Compile-time type safety for view references
- Reduced null pointer exceptions
- Cleaner, more maintainable code
Note: This is a code modernization suggestion, not a memory leak
Finding #16 — LoadingDrawableActivity
View Binding Migration Opportunity
Class: io.github.alexmofer.projectx.business.drawables.loadingdrawable.LoadingDrawableActivity
Type: Activity
Current Pattern: Manual view lookup
findViewById() Calls:
• findViewById in setCirclingDrawable
• findViewById in setDoubleCircleDrawable
• findViewById in setMaterialProgressDrawable
Benefits of View Binding:
- Eliminates boilerplate findViewById() calls
- Compile-time type safety for view references
- Reduced null pointer exceptions
- Cleaner, more maintainable code
Note: This is a code modernization suggestion, not a memory leak
Finding #17 — CryptoActivity
View Binding Migration Opportunity
Class: io.github.alexmofer.projectx.business.others.crypto.CryptoActivity
Type: Activity
Current Pattern: Manual view lookup
findViewById() Calls:
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
Benefits of View Binding:
- Eliminates boilerplate findViewById() calls
- Compile-time type safety for view references
- Reduced null pointer exceptions
- Cleaner, more maintainable code
Note: This is a code modernization suggestion, not a memory leak
Finding #18 — FloatingActionModeActivity
View Binding Migration Opportunity
Class: io.github.alexmofer.projectx.business.others.floatingactionmode.FloatingActionModeActivity
Type: Activity
Current Pattern: Manual view lookup
findViewById() Calls:
• findViewById in onCreate
Benefits of View Binding:
- Eliminates boilerplate findViewById() calls
- Compile-time type safety for view references
- Reduced null pointer exceptions
- Cleaner, more maintainable code
Note: This is a code modernization suggestion, not a memory leak
Finding #19 — MainActivity
View Binding Migration Opportunity
Class: io.github.alexmofer.projectx.business.main.MainActivity
Type: Activity
Current Pattern: Manual view lookup
findViewById() Calls:
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
Benefits of View Binding:
- Eliminates boilerplate findViewById() calls
- Compile-time type safety for view references
- Reduced null pointer exceptions
- Cleaner, more maintainable code
Note: This is a code modernization suggestion, not a memory leak
Finding #20 — DrawableRatingBarActivity
View Binding Migration Opportunity
Class: io.github.alexmofer.projectx.business.widgets.drawableratingbar.DrawableRatingBarActivity
Type: Activity
Current Pattern: Manual view lookup
findViewById() Calls:
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
Benefits of View Binding:
- Eliminates boilerplate findViewById() calls
- Compile-time type safety for view references
- Reduced null pointer exceptions
- Cleaner, more maintainable code
Note: This is a code modernization suggestion, not a memory leak
Finding #21 — LegacyPathSelectActivity
View Binding Migration Opportunity
Class: io.github.alexmofer.projectx.business.others.ftp.legacy.LegacyPathSelectActivity
Type: Activity
Current Pattern: Manual view lookup
findViewById() Calls:
• findViewById in create
• findViewById in onCreate
• findViewById in onCreate
Benefits of View Binding:
- Eliminates boilerplate findViewById() calls
- Compile-time type safety for view references
- Reduced null pointer exceptions
- Cleaner, more maintainable code
Note: This is a code modernization suggestion, not a memory leak
Finding #22 — BrowserActivity
View Binding Migration Opportunity
Class: io.github.alexmofer.projectx.business.browser.BrowserActivity
Type: Activity
Current Pattern: Manual view lookup
findViewById() Calls:
• findViewById in onCreate
Benefits of View Binding:
- Eliminates boilerplate findViewById() calls
- Compile-time type safety for view references
- Reduced null pointer exceptions
- Cleaner, more maintainable code
Note: This is a code modernization suggestion, not a memory leak
Finding #23 — GradientTabStripActivity
View Binding Migration Opportunity
Class: io.github.alexmofer.projectx.business.widgets.gradienttabstrip.GradientTabStripActivity
Type: Activity
Current Pattern: Manual view lookup
findViewById() Calls:
• findViewById in onCreate
• findViewById in onCreate
Benefits of View Binding:
- Eliminates boilerplate findViewById() calls
- Compile-time type safety for view references
- Reduced null pointer exceptions
- Cleaner, more maintainable code
Note: This is a code modernization suggestion, not a memory leak
Finding #24 — ZxingScanViewActivity
View Binding Migration Opportunity
Class: io.github.alexmofer.projectx.business.widgets.zxingscanview.ZxingScanViewActivity
Type: Activity
Current Pattern: Manual view lookup
findViewById() Calls:
• findViewById in onCreate
• findViewById in onCreate
Benefits of View Binding:
- Eliminates boilerplate findViewById() calls
- Compile-time type safety for view references
- Reduced null pointer exceptions
- Cleaner, more maintainable code
Note: This is a code modernization suggestion, not a memory leak
Finding #25 — MultiActionTextViewActivity
View Binding Migration Opportunity
Class: io.github.alexmofer.projectx.business.widgets.multiactiontextview.MultiActionTextViewActivity
Type: Activity
Current Pattern: Manual view lookup
findViewById() Calls:
• findViewById in onCreate
Benefits of View Binding:
- Eliminates boilerplate findViewById() calls
- Compile-time type safety for view references
- Reduced null pointer exceptions
- Cleaner, more maintainable code
Note: This is a code modernization suggestion, not a memory leak
Finding #26 — OpenTypeListActivity
View Binding Migration Opportunity
Class: io.github.alexmofer.projectx.business.others.opentypelist.OpenTypeListActivity
Type: Activity
Current Pattern: Manual view lookup
findViewById() Calls:
• findViewById in onCreate
Benefits of View Binding:
- Eliminates boilerplate findViewById() calls
- Compile-time type safety for view references
- Reduced null pointer exceptions
- Cleaner, more maintainable code
Note: This is a code modernization suggestion, not a memory leak
Finding #27 — AboutActivity
View Binding Migration Opportunity
Class: io.github.alexmofer.projectx.business.about.AboutActivity
Type: Activity
Current Pattern: Manual view lookup
findViewById() Calls:
• findViewById in onCreate
Benefits of View Binding:
- Eliminates boilerplate findViewById() calls
- Compile-time type safety for view references
- Reduced null pointer exceptions
- Cleaner, more maintainable code
Note: This is a code modernization suggestion, not a memory leak
Finding #28 — CircleProgressBarActivity
View Binding Migration Opportunity
Class: io.github.alexmofer.projectx.business.widgets.circleprogressbar.CircleProgressBarActivity
Type: Activity
Current Pattern: Manual view lookup
findViewById() Calls:
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById i
… (truncated for brevity)
Finding #29 — StateLayoutActivity
View Binding Migration Opportunity
Class: io.github.alexmofer.projectx.business.widgets.statelayout.StateLayoutActivity
Type: Activity
Current Pattern: Manual view lookup
findViewById() Calls:
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
Benefits of View Binding:
- Eliminates boilerplate findViewById() calls
- Compile-time type safety for view references
- Reduced null pointer exceptions
- Cleaner, more maintainable code
Note: This is a code modernization suggestion, not a memory leak
Finding #30 — ClipboardActivity
View Binding Migration Opportunity
Class: io.github.alexmofer.projectx.business.others.clipboard.ClipboardActivity
Type: Activity
Current Pattern: Manual view lookup
findViewById() Calls:
• findViewById in pasteData
• findViewById in pasteFile
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
Benefits of View Binding:
- Eliminates boilerplate findViewById() calls
- Compile-time type safety for view references
- Reduced null pointer exceptions
- Cleaner, more maintainable code
Note: This is a code modernization suggestion, not a memory leak
Finding #31 — PrinterActivity
View Binding Migration Opportunity
Class: io.github.alexmofer.projectx.business.others.printer.PrinterActivity
Type: Activity
Current Pattern: Manual view lookup
findViewById() Calls:
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
Benefits of View Binding:
- Eliminates boilerplate findViewById() calls
- Compile-time type safety for view references
- Reduced null pointer exceptions
- Cleaner, more maintainable code
Note: This is a code modernization suggestion, not a memory leak
Finding #32 — LineDrawableActivity
View Binding Migration Opportunity
Class: io.github.alexmofer.projectx.business.drawables.linedrawable.LineDrawableActivity
Type: Activity
Current Pattern: Manual view lookup
findViewById() Calls:
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
Benefits of View Binding:
- Eliminates boilerplate findViewById() calls
- Compile-time type safety for view references
- Reduced null pointer exceptions
- Cleaner, more maintainable code
Note: This is a code modernization suggestion, not a memory leak
Finding #33 — TagTabStripActivity
View Binding Migration Opportunity
Class: io.github.alexmofer.projectx.business.widgets.tagtabstrip.TagTabStripActivity
Type: Activity
Current Pattern: Manual view lookup
findViewById() Calls:
• findViewById in onCreate
Benefits of View Binding:
- Eliminates boilerplate findViewById() calls
- Compile-time type safety for view references
- Reduced null pointer exceptions
- Cleaner, more maintainable code
Note: This is a code modernization suggestion, not a memory leak
Finding #34 — CornerDrawableActivity
View Binding Migration Opportunity
Class: io.github.alexmofer.projectx.business.drawables.cornerdrawable.CornerDrawableActivity
Type: Activity
Current Pattern: Manual view lookup
findViewById() Calls:
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
• findViewById in onCreate
Benefits of View Binding:
- Eliminates boilerplate findViewById() calls
- Compile-time type safety for view references
- Reduced null pointer exceptions
- Cleaner, more maintainable code
Note: This is a code modernization suggestion, not a memory leak
How to respond to this issue:
- If a finding is a true positive: consider applying the recommended fix and closing this issue.
- If a finding is a false positive: please leave a comment explaining why — your feedback directly improves our research.
- If you have questions: reply here or open a discussion.
This report was generated by LeakScope as part of the ICSE 2027 research artifact. Tool analyzes compiled APKs using Soot static analysis on ProjectX.
LeakScope: Android Lifecycle & Memory Leak Violations
Summary
LeakScope detected 34 potential issue(s) across 2 detector type(s):
FragmentViewFieldRetentionLeakViewBindingOpportunityDetailed Findings
🔴
FragmentViewFieldRetentionLeakFragment stores View references in instance fields not cleared in onDestroyView()
Finding #1 —
AdvancedFragmentFinding #2 —
LegacyFragment🟢
ViewBindingOpportunityManual findViewById() calls — ViewBinding migration opportunity
Finding #3 —
TextDrawableActivityFinding #4 —
SmoothInputLayoutActivityFinding #5 —
RetrofitActivityFinding #6 —
WrapLayoutActivityFinding #7 —
RecyclePagerActivityFinding #8 —
MultifunctionalRecyclerViewActivityFinding #9 —
HeaderFooterGridViewActivityFinding #10 —
GridDrawableActivityFinding #11 —
OpenTypeActivityFinding #12 —
FtpActivityFinding #13 —
IndicatorTabStripActivityFinding #14 —
FontActivityFinding #15 —
MultifunctionalImageViewActivityFinding #16 —
LoadingDrawableActivityFinding #17 —
CryptoActivityFinding #18 —
FloatingActionModeActivityFinding #19 —
MainActivityFinding #20 —
DrawableRatingBarActivityFinding #21 —
LegacyPathSelectActivityFinding #22 —
BrowserActivityFinding #23 —
GradientTabStripActivityFinding #24 —
ZxingScanViewActivityFinding #25 —
MultiActionTextViewActivityFinding #26 —
OpenTypeListActivityFinding #27 —
AboutActivityFinding #28 —
CircleProgressBarActivityFinding #29 —
StateLayoutActivityFinding #30 —
ClipboardActivityFinding #31 —
PrinterActivityFinding #32 —
LineDrawableActivityFinding #33 —
TagTabStripActivityFinding #34 —
CornerDrawableActivityHow to respond to this issue:
This report was generated by LeakScope as part of the ICSE 2027 research artifact. Tool analyzes compiled APKs using Soot static analysis on ProjectX.