An Automated Program Repair Method Using Atomic Replacement for Java Programs

Thi Huyen Tram Nguyen, Van-Hoan Nguyen, Hoang-Viet Tran, Phạm Ngọc Hùng · 2022 RIVF International Conference on Computing and Communication Technologies (RIVF) · 2022

Automated program repair is one important research area in software engineering which includes methods for automatically fixing programs. This paper proposes a method for fixing bugs related to variable misuses, wrong methods and operators in Java programs. Program repairing includes two stages: fault localization and fix generation. In the fault localization stage, suspicious bug locations were identified with the support of a well-known library named GZoltar. After determining the bug location, the fix generation stage is executed. The proposed method focuses on the fix generation stage. The key idea of this method is to generate patches using atomic replacement in an abstract syntax tree. An implemented tool, named AtomRepair supporting the proposed method and experimental results are presented and discussed. The tool was evaluated on Defects4J benchmark and compared with CapGen and FixMiner tools. The results show that the tool can generate correct patches to fix 25/28 bugs with an accuracy of 89.3%, higher than that of CapGen with 84% and FixMiner with 81.3%.

Read the paper · More papers on PaperTik