EnCus: Customizing Search Space for Automated Program Repair

Seongbin Kim, Sechang Jang, Jindae Kim, Jaechang Nam · 2025

The primary challenge faced by Automated Program Repair (APR) techniques in fixing buggy programs is the search space problem. To generate a patch, APR techniques must address three critical decisions: where to fix (location), how to fix (operation), and what to fix with (ingredient). In this study, we propose EnCus, a novel approach that customizes the search space of ingredients and mutation operators during patch generation. EnCus acts as an APR wingman, using an ensemble-based strategy to customize the search space. The search space is customized by extracting edit operations that are used to fix similar bug-introducing changes from existing patches. EnCus applies an ensemble of edit operations extracted from three open source project pools and three Abstract Syntax Tree (AST)-level code differencing tools. This ensemble provides complementary perspectives on the buggy context. To evaluate this approach, we integrate EnCus to an existing context-based APR tool, ConFix. Using EnCus, the extensive search space of ConFix is reduced to ten recommended patches. EnCus was evaluated on single-line Defects4J bugs, successfully generating 20 correct patches which performs comparably to state-of-the-art context-based APR techniques.

Read the paper · More papers on PaperTik