LeakPair: Proactive Repairing of Memory Leaks in Single Page Web Applications

by   Arooba Shahoor, et al.

Modern web applications often resort to application development frameworks such as React, Vue.js, and Angular. While the frameworks facilitate the development of web applications with several useful components, they are inevitably vulnerable to unmanaged memory consumption since the frameworks often produce Single Page Applications (SPAs). Web applications can be alive for hours and days with behavior loops, in such cases, even a single memory leak in a SPA app can cause performance degradation on the client side. However, recent debugging techniques for web applications still focus on memory leak detection, which requires manual tasks and produces imprecise results. We propose LeakPair, a technique to repair memory leaks in single page applications. Given the insight that memory leaks are mostly non-functional bugs and fixing them might not change the behavior of an application, the technique is designed to proactively generate patches to fix memory leaks, without leak detection, which is often heavy and tedious. To generate effective patches, LeakPair follows the idea of pattern-based program repair since the automated repair strategy shows successful results in many recent studies. We evaluate the technique on more than 20 open-source projects without using explicit leak detection. The patches generated by our technique are also submitted to the projects as pull requests. The results show that LeakPair can generate effective patches to reduce memory consumption that are acceptable to developers. In addition, we execute the test suites given by the projects after applying the patches, and it turns out that the patches do not cause any functionality breakage; this might imply that LeakPair can generate non-intrusive patches for memory leaks.


ITER: Iterative Neural Repair for Multi-Location Patches

Automated program repair (APR) has achieved promising results, especiall...

Memory and Resource Leak Defects and their Repairs in Java Projects

Despite huge software engineering efforts and programming language suppo...

A Comprehensive Study of Code-removal Patches in Automated Program Repair

Automatic Program Repair (APR) techniques can promisingly help reducing ...

Elixir: Effective object-oriented program repair

This work is motivated by the pervasive use of method invocations in obj...

Keep the Conversation Going: Fixing 162 out of 337 bugs for 0.42 each using ChatGPT

Automated Program Repair (APR) aims to automatically generate patches fo...

Erratum: Leveraging Flexible Tree Matching to Repair Broken Locators in Web Automation Scripts

Web applications are constantly evolving to integrate new features and f...

Please sign up or login with your details

Forgot password? Click here to reset