A resource leak occurs when a program fails to release finite resources such as sockets, file descriptors, database connections, etc. While sound static analysis tools can detect all leaks, automatically repairing them remains challenging. Prior work took the output of a detection tool and attempted to repair only leaks of a hard-coded list of library resource types. This approach limits the scope of repairable leaks: real-world code uses resource wrappers that store a resource in a field and must themselves be closed.
This paper makes four key contributions to improve resource leak repair in the presence of wrappers. (1) It integrates inference of resource management specifications into the repair pipeline, enabling extant fixing approaches to reason about wrappers. (2) It transforms programs into variants that are easier to analyze, making inference, detection, and fixing tools more effective; for instance, it makes detection tools report problems closer to the root cause, often in a client of a resource wrapper rather than within the wrapper class itself. (3) A novel Field Containment Analysis reasons more precisely about resource lifetimes, enabling repair of more leaks involving resources stored in fields. (4) It introduces a new repair pattern and more precise reasoning to better handle resources stored in non-final fields.
Prior work fixed 41% of resource leak warnings in the NJR benchmark suite; our implementation Arodnap fixes 69%.
Wed 19 NovDisplayed time zone: Seoul change
11:00 - 12:30 | |||
11:00 10mTalk | Automated Repair of Ambiguous Problem Descriptions for LLM-Based Code Generation Research Papers Haoxiang Jia Peking University, Robbie Morris University College London, He Ye University College London (UCL), Federica Sarro University College London, Sergey Mechtaev Peking University | ||
11:10 10mTalk | Fixing Broken Graphs: LLM-Powered Automatic Code Optimization for DNN Programs Research Papers Haotian Wang Nankai University, Yicheng Sui Nankai University, Yudong Xie Nankai University, Yicong Liu Nankai University, Yufei Sun Nankai University, Changqing Shi Nankai University, Yuzhi Zhang Nankai University | ||
11:20 10mTalk | SemGuard: Real-Time Semantic Evaluator for Correcting LLM-Generated Code Research Papers Qinglin Wang Shandong Normal University, Zhihong Sun Shandong Normal University, Ruyun Wang Institute of Information Engineering, Chinese Academy of Sciences, Tao Huang Shandong Normal University, Zhi Jin Peking University, Ge Li Peking University, Chen Lyu Shandong Normal University | ||
11:30 10mTalk | Amur: Fixing Multi-Resource Leaks Guided by Resource Flow Analysis Research Papers | ||
11:40 10mTalk | Automated Repair of OpenID Connect Programs Research Papers Tamjid Al Rahat UCLA, Yanju Chen University of California, San Diego, Yu Feng University of California at Santa Barbara, Yuan Tian | ||
11:50 10mTalk | FlakyGuard: Automatically Fixing Flaky Tests at Industry Scale Research Papers Chengpeng Li University of Texas at Austin, Farnaz Behrang Uber Technologies, August Shi The University of Texas at Austin, Peng Liu Uber Technologies | ||
12:00 10mTalk | LLMPort: Cross-file Patch Porting via Task Decomposition and Self-correction Research Papers Bofei Chen Fudan University, Lei Zhang Fudan University, Peng Deng Fudan University, Nan Wang Fudan University, Haoyu Xu Fudan University, Mingda Guo Fudan Universityv, Yuan Zhang Fudan University, Min Yang Fudan University | ||
12:10 10mTalk | Repairing Leaks in Resource Wrappers Research Papers Sanjay Malakar University of California, Riverside, Martin Kellogg New Jersey Institute of Technology, Michael D. Ernst University of Washington, Manu Sridharan University of California at Riverside Pre-print | ||
12:20 10mTalk | Automatic Fixing of Missing Dependency Errors Research Papers Jun Lyu Nanjing University, He Zhang Nanjing University, Lanxin Yang Nanjing University, Yue Li Nanjing University, Chenxing Zhong Nanjing University, Manuel Rigger National University of Singapore | ||