# An Automatic Software Defect Repair Method Based on Multi-Objective Genetic Programming
###### Abstract
This leads to an increase in the number of evolution iterations and more complex calculations, thereby affecting the entire process of defect repair. [PERSON] et al. (2020) introduced a repair method that mitigates the impact of fault localization results by considering multiple candidate fault locations simultaneously during population initialization, generating candidate patches to address inaccurate fault localization. Furthermore, when obtaining repair materials, methods such as code similarity are often used. However, without effective filtering and classification, a large number of ineffective repair materials are searched, resulting in slow search processes and low repair success rates. [PERSON] (2020) proposed an automatic repair tool, ConFix (context-based fix), which directly applies historical manual repair templates. It extracts relevant context information based on the location of the modified code on the code's abstract syntax tree, reducing unnecessary code modifications by an average of 48% according to experimental results. [PERSON] et al. (2020) proposed ARJANMT, which creates candidate repair statements by leveraging the redundancy assumption and sequence-to-sequence learning of correct patches, and inputs them into a multi-objective evolutionary search algorithm to find test-suite-adequate patches. In addition to these heuristic-based approaches, program repair based on code similarity has also gained attention. For example, the repair method ssFix (2020) proposed by [PERSON] et al. also searches for code similar to the defective code from the code repository as the original components for repair patches. During the patch generation phase, instead of directly reusing similar code, ssFix utilizes Change Distiller to extract the differences between the defective code and the similar code, and applies the changes one by one. ssFix's low granularity of code reuse effectively enhances its patch generation capability. [PERSON] et al. (2020) argue that code modules with similar functionality exhibit high similarity in code style. Based on this idea, they proposed an automatic repair tool called SimFix. It searches for similar code within the project using both code structural features and code semantic features. Then, it compares the differences between the erroneous code and the similar code, extracting fine-grained code modification operations. Compared to ssFix, its repair accuracy is almost doubled. [PERSON] et al. (2020) proposed RSCSRepair, which calculatessimilarity using custom and system identifiers. [PERSON] et al. [16] proposed recommending repair patches for student-submitted homework code based on correct code. They implemented a repair tool called Refactory. The difference between this method and the above approaches is that it incorporates a code refactoring component to make semantically similar code as structurally similar as possible, which facilitates subsequent code matching. However, the application scenario is tailored for student submissions, requiring different implementations of the same function code. In industrial development environments, identical function code does not always exist, limiting its applicability. Although search-based automatic program repair methods [17; 18] and code similarity-based repair methods have improved the efficiency and accuracy of software defect repair to some extent, these approaches still have certain limitations. First, search-based methods rely on single-objective optimization algorithms, which often overlook diversity when selecting repair materials and generating patches [6]. This can result in lower-quality patches and even lead to overfitting. Second, while code similarity methods generate patches by searching for similar code in existing code repositories, which effectively improves the accuracy of patch generation, the search process is often time-consuming and less efficient when dealing with complex code structures [5].