主动调试单页Web应用程序中的内存泄漏错误

IF 5.6 1区 计算机科学 Q1 COMPUTER SCIENCE, SOFTWARE ENGINEERING
Arooba Shahoor;Satbek Abdyldayev;Hyeongi Hong;Jooyong Yi;Dongsun Kim
{"title":"主动调试单页Web应用程序中的内存泄漏错误","authors":"Arooba Shahoor;Satbek Abdyldayev;Hyeongi Hong;Jooyong Yi;Dongsun Kim","doi":"10.1109/TSE.2025.3571192","DOIUrl":null,"url":null,"abstract":"Developing modern web applications often relies on web-based application frameworks such as React, Vue.js, and Angular. Although the frameworks accelerate the development of web applications with several useful and predefined components, they are inevitably vulnerable to unmanaged memory consumption as the frameworks often produce monolithic web pages, so-called, Single Page Applications (SPAs), in which no page refresh actions are made during navigation. Web applications can be alive for hours and days with behavior loops, in such cases, even a single memory leak in an SPA can cause performance degradation on the client side. However, recent debugging techniques for web applications focus on memory leak detection, which requires manual tasks and produces imprecise results, rather than proactively repairing memory leaks. We propose <sc>LeakPair</small>, a technique to proactively repair memory leaks in SPAs rather than following a classical and reactive debugging process. 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. Thus, the proactive technique can significantly reduce the time and effort necessary to fix the memory leaks. To generate effective patches, <sc>LeakPair</small> follows the idea of pattern-based program repair since the automated repair strategy shows successful results in many recent studies. We extensively evaluate the technique on 60 open-source projects without using explicit leak detection. The patches generated by our technique are also submitted to the projects as pull requests (PRs). The results of PRs show that <sc>LeakPair</small> 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 <sc>LeakPair</small> can generate non-intrusive patches for memory leaks. Furthermore, we compare the performance of <sc>LeakPair</small> with that of GPT-4 as recent studies show that large language models are successful with program repair tasks. Our results show that our technique outperforms the language model.","PeriodicalId":13324,"journal":{"name":"IEEE Transactions on Software Engineering","volume":"51 7","pages":"1969-1995"},"PeriodicalIF":5.6000,"publicationDate":"2025-03-16","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Proactive Debugging of Memory Leakage Bugs in Single Page Web Applications\",\"authors\":\"Arooba Shahoor;Satbek Abdyldayev;Hyeongi Hong;Jooyong Yi;Dongsun Kim\",\"doi\":\"10.1109/TSE.2025.3571192\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Developing modern web applications often relies on web-based application frameworks such as React, Vue.js, and Angular. Although the frameworks accelerate the development of web applications with several useful and predefined components, they are inevitably vulnerable to unmanaged memory consumption as the frameworks often produce monolithic web pages, so-called, Single Page Applications (SPAs), in which no page refresh actions are made during navigation. Web applications can be alive for hours and days with behavior loops, in such cases, even a single memory leak in an SPA can cause performance degradation on the client side. However, recent debugging techniques for web applications focus on memory leak detection, which requires manual tasks and produces imprecise results, rather than proactively repairing memory leaks. We propose <sc>LeakPair</small>, a technique to proactively repair memory leaks in SPAs rather than following a classical and reactive debugging process. 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. Thus, the proactive technique can significantly reduce the time and effort necessary to fix the memory leaks. To generate effective patches, <sc>LeakPair</small> follows the idea of pattern-based program repair since the automated repair strategy shows successful results in many recent studies. We extensively evaluate the technique on 60 open-source projects without using explicit leak detection. The patches generated by our technique are also submitted to the projects as pull requests (PRs). The results of PRs show that <sc>LeakPair</small> 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 <sc>LeakPair</small> can generate non-intrusive patches for memory leaks. Furthermore, we compare the performance of <sc>LeakPair</small> with that of GPT-4 as recent studies show that large language models are successful with program repair tasks. Our results show that our technique outperforms the language model.\",\"PeriodicalId\":13324,\"journal\":{\"name\":\"IEEE Transactions on Software Engineering\",\"volume\":\"51 7\",\"pages\":\"1969-1995\"},\"PeriodicalIF\":5.6000,\"publicationDate\":\"2025-03-16\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"IEEE Transactions on Software Engineering\",\"FirstCategoryId\":\"94\",\"ListUrlMain\":\"https://ieeexplore.ieee.org/document/11006504/\",\"RegionNum\":1,\"RegionCategory\":\"计算机科学\",\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"Q1\",\"JCRName\":\"COMPUTER SCIENCE, SOFTWARE ENGINEERING\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"IEEE Transactions on Software Engineering","FirstCategoryId":"94","ListUrlMain":"https://ieeexplore.ieee.org/document/11006504/","RegionNum":1,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"COMPUTER SCIENCE, SOFTWARE ENGINEERING","Score":null,"Total":0}
引用次数: 0

摘要

开发现代web应用程序通常依赖于基于web的应用程序框架,如React、Vue.js和Angular。尽管这些框架通过一些有用的和预定义的组件加速了web应用程序的开发,但它们不可避免地容易受到非托管内存消耗的影响,因为这些框架经常产生单一的web页面,即所谓的单页面应用程序(spa),其中在导航期间没有进行页面刷新操作。带有行为循环的Web应用程序可以存活数小时甚至数天,在这种情况下,即使SPA中的单个内存泄漏也会导致客户端性能下降。然而,最近的web应用程序调试技术主要集中在内存泄漏检测上,这需要手动任务,并且产生不精确的结果,而不是主动修复内存泄漏。我们提出了LeakPair,这是一种主动修复spa中的内存泄漏的技术,而不是遵循传统的反应性调试过程。考虑到内存泄漏主要是非功能性错误,并且修复它们可能不会改变应用程序的行为,该技术被设计为主动生成补丁来修复内存泄漏,而不需要进行泄漏检测,而泄漏检测通常是繁重而乏味的。因此,主动技术可以显著减少修复内存泄漏所需的时间和精力。为了生成有效的补丁,LeakPair遵循基于模式的程序修复的思想,因为自动修复策略在最近的许多研究中显示出成功的结果。我们在60个开源项目中广泛评估了该技术,但没有使用显式泄漏检测。我们的技术生成的补丁也作为拉取请求(pull request, pr)提交给项目。pr的结果表明,LeakPair可以生成有效的补丁来减少开发人员可接受的内存消耗。此外,我们在应用补丁后执行了项目给出的测试套件,结果表明补丁没有造成任何功能的破坏;这可能意味着LeakPair可以为内存泄漏生成非侵入性补丁。此外,我们比较了LeakPair与GPT-4的性能,因为最近的研究表明,大型语言模型在程序修复任务中是成功的。我们的结果表明,我们的技术优于语言模型。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
Proactive Debugging of Memory Leakage Bugs in Single Page Web Applications
Developing modern web applications often relies on web-based application frameworks such as React, Vue.js, and Angular. Although the frameworks accelerate the development of web applications with several useful and predefined components, they are inevitably vulnerable to unmanaged memory consumption as the frameworks often produce monolithic web pages, so-called, Single Page Applications (SPAs), in which no page refresh actions are made during navigation. Web applications can be alive for hours and days with behavior loops, in such cases, even a single memory leak in an SPA can cause performance degradation on the client side. However, recent debugging techniques for web applications focus on memory leak detection, which requires manual tasks and produces imprecise results, rather than proactively repairing memory leaks. We propose LeakPair, a technique to proactively repair memory leaks in SPAs rather than following a classical and reactive debugging process. 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. Thus, the proactive technique can significantly reduce the time and effort necessary to fix the memory leaks. 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 extensively evaluate the technique on 60 open-source projects without using explicit leak detection. The patches generated by our technique are also submitted to the projects as pull requests (PRs). The results of PRs 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. Furthermore, we compare the performance of LeakPair with that of GPT-4 as recent studies show that large language models are successful with program repair tasks. Our results show that our technique outperforms the language model.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
IEEE Transactions on Software Engineering
IEEE Transactions on Software Engineering 工程技术-工程:电子与电气
CiteScore
9.70
自引率
10.80%
发文量
724
审稿时长
6 months
期刊介绍: IEEE Transactions on Software Engineering seeks contributions comprising well-defined theoretical results and empirical studies with potential impacts on software construction, analysis, or management. The scope of this Transactions extends from fundamental mechanisms to the development of principles and their application in specific environments. Specific topic areas include: a) Development and maintenance methods and models: Techniques and principles for specifying, designing, and implementing software systems, encompassing notations and process models. b) Assessment methods: Software tests, validation, reliability models, test and diagnosis procedures, software redundancy, design for error control, and measurements and evaluation of process and product aspects. c) Software project management: Productivity factors, cost models, schedule and organizational issues, and standards. d) Tools and environments: Specific tools, integrated tool environments, associated architectures, databases, and parallel and distributed processing issues. e) System issues: Hardware-software trade-offs. f) State-of-the-art surveys: Syntheses and comprehensive reviews of the historical development within specific areas of interest.
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信