ASE 2024
Sun 27 October - Fri 1 November 2024 Sacramento, California, United States
Wed 30 Oct 2024 15:30 - 15:45 at Compagno - Program repair 2 Chair(s): Xing Hu

Regex-dependent string functions are string functions that take regular expressions (regexes) as parameters and are popular means of manipulating strings. They are frequently used for, e.g., string transformation and substring search. Despite the importance, writing these functions is far from easy. To rectify this situation, recent research made significant progress by proposing automated methods for synthesizing regexes based on Programming by Examples (PBE). However, there still is a gap between these methods and the goal of synthesizing regex-dependent string functions. First, the existing methods focus on whole-string matching, whereas most regex-dependent string functions adopt substring matching. Second, the existing methods focus only on the regex, but many commonly used regex-dependent string functions, such as replace and replaceAll, also take as parameter a replacement to specify how the substrings matched to the regex will be replaced.

This paper fills the gap by presenting the first PBE-based method for repairing regex-dependent string functions. Like the recent methods for regex synthesis, our algorithm builds on enumerative search with pruning and SMT constraint solving, but with extensions to support substring matching and replacement. The main challenge is the large search space. We address the challenge by novel ideas such as incorporation of origin information in examples to identify the locations of substrings to be matched, a new substring-context-aware pruning technique, and a novel use of SMT constraints to insert captures that can be referred from the replacement. Additionally, we identify novel necessary and sufficient conditions that can be used to detect and filter unrepairable instances. We implemented our algorithm as a prototype tool called R2-DS and evaluated it on real-world benchmarks. Results show that our algorithm efficiently repairs the bugs in the real world and finds high-quality repairs.

Wed 30 Oct

Displayed time zone: Pacific Time (US & Canada) change

15:30 - 16:30
Program repair 2Research Papers at Compagno
Chair(s): Xing Hu Zhejiang University
15:30
15m
Talk
Repairing Regex-Dependent String Functions
Research Papers
Nariyoshi Chida NTT Social Informatics Laboratories, Tachio Terauchi Waseda University
15:45
15m
Talk
FastFixer: An Efficient and Effective Approach for Repairing Programming Assignments
Research Papers
Fang Liu Beihang University, Zhenwei Liu Beihang University, Qianhui Zhao Beihang University, Jing Jiang Beihang University, Li Zhang Beihang University, Zian Sun Beihang University, Ge Li Peking University, Zhongqi Li Huawei Cloud Computing Technologies Co., Ltd., Yuchi Ma Huawei Cloud Computing Technologies
16:00
15m
Talk
Exploring Parameter-Efficient Fine-Tuning of Large Language Model on Automated Program Repair
Research Papers
Guochang Li Zhejiang University, Chen Zhi Zhejiang University, Jialiang Chen Zhejiang University, Junxiao Han , Shuiguang Deng Zhejiang University; Alibaba-Zhejiang University Joint Institute of Frontier Technologies
16:15
15m
Talk
Enhancing Automated Program Repair with Solution Design
Research Papers
Jiuang Zhao Beihang University, Donghao Yang Beihang University, Li Zhang Beihang University, Xiaoli Lian Beihang University, China, Zitian Yang Beihang University, Fang Liu Beihang University