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 6 potential issue(s) across 3 detector type(s):
| Severity |
Count |
| 🔴 High |
1 |
| 🟡 Medium |
1 |
| 🟢 Low (improvement opportunity) |
4 |
| Detector |
Count |
Severity |
Description |
ThreadedUIReference |
1 |
🔴 High |
Worker thread captures Activity/Fragment/View reference |
ServiceResourceManagementIssueDetector |
1 |
🟡 Medium |
Service may never stop — missing stopSelf() call |
ViewBindingOpportunity |
4 |
🟢 Low |
Manual findViewById() calls — ViewBinding migration opportunity |
Detailed Findings
🔴 ThreadedUIReference
Worker thread captures Activity/Fragment/View reference
Finding #1 — TransfersActivity\n// (Full source code omitted for brevity)\n"
{
"text_input": "package slowscript.warpinator;\n\n// Class: slowscript.warpinator.TransfersActivity\n// (Full source code omitted for brevity)\n",
"output": "Yes",
"project": "TransfersActivity",
"explanation": "Scenario 1: Worker thread holds UI object reference\nClass: slowscript.warpinator.TransfersActivity\nMethod: void onActivityResult(int,int,android.content.Intent)\nStatement: $r13 \u003d new java.lang.Thread\nCaptured UI objects:\n - r0 : slowscript.warpinator.TransfersActivity\nRisk: UI object will be kept in memory until thread completes\nFix: Use WeakReference or avoid passing UI objects to worker threads\n"
}
{
"text_input": "package slowscript.warpinator;\n\n// Class: slowscript.warpinator.TransfersActivity\n// (Full source code omitted for brevity)\n",
"output": "Yes",
"project": "TransfersActivity",
"explanation": "Scenario 1: Worker thread holds UI object reference\nClass: slowscript.warpinator.TransfersActivity\nMethod: void onActivityResult(int,int,a
… (truncated for brevity)
🟡 ServiceResourceManagementIssueDetector
Service may never stop — missing stopSelf() call
Finding #2 — MainService
ℹ� Best Practice: Service relies on stopSelf(). For robustness, also call stopForeground(true) in onDestroy().
Class: slowscript.warpinator.MainService
Method: N/A
🟢 ViewBindingOpportunity
Manual findViewById() calls — ViewBinding migration opportunity
Finding #3 — TransfersActivity
View Binding Migration Opportunity
Class: slowscript.warpinator.TransfersActivity
Type: Activity
Current Pattern: Manual view lookup
findViewById() Calls:
• findViewById in lambda$onCreate$6
• 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
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 — ShareActivity
View Binding Migration Opportunity
Class: slowscript.warpinator.ShareActivity
Type: Activity
Current Pattern: Manual view lookup
findViewById() Calls:
• 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 — AboutActivity
View Binding Migration Opportunity
Class: slowscript.warpinator.AboutActivity
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 — MainActivity
View Binding Migration Opportunity
Class: slowscript.warpinator.MainActivity
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 onOptionsItemSelected
• findViewById in onOptionsItemSelected
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 warpinator-android.
LeakScope: Android Lifecycle & Memory Leak Violations
Summary
LeakScope detected 6 potential issue(s) across 3 detector type(s):
ThreadedUIReferenceServiceResourceManagementIssueDetectorViewBindingOpportunityDetailed Findings
🔴
ThreadedUIReferenceWorker thread captures Activity/Fragment/View reference
Finding #1 —
TransfersActivity\n// (Full source code omitted for brevity)\n"🟡
ServiceResourceManagementIssueDetectorService may never stop — missing stopSelf() call
Finding #2 —
MainService🟢
ViewBindingOpportunityManual findViewById() calls — ViewBinding migration opportunity
Finding #3 —
TransfersActivityFinding #4 —
ShareActivityFinding #5 —
AboutActivityFinding #6 —
MainActivityHow 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 warpinator-android.