Autorepair: A New Machine Learning-Based Approach to Automated Software Repair

33 Pages Posted: 4 Nov 2024

See all articles by Amir Ghanati

Amir Ghanati

Qazvin Islamic Azad University

saeed parsa

Iran University of Science and Technology

Habib Izadkhah

affiliation not provided to SSRN

Abstract

Context: Automatic program repair (APR) is a promising approach to fixing software bugs by generating and validating patches automatically. However, APR faces challenges like large search spaces, long processing times, and low accuracy in generating plausible patches.Objectives: This study introduces AutoRepair, a machine learning-based tool designed to enhance the efficiency and accuracy of APR by leveraging bug-fix patterns and feature characterization.Methods: AutoRepair characterizes 40 features from source code and uses them as learning samples for a Feedforward Neural Network (FNN) model. The model identifies the most suitable pattern to repair faulty blocks. Five new patterns are introduced to handle blocks not matching existing patterns, and patterns are prioritized by similarity to the faulty block. The top patterns are applied to generate patches.Results: Experiments on the Code4Bench dataset show that AutoRepair generates plausible patches more quickly than existing tools like GenProg, Kali, SPR, and Prophet. It successfully corrected patches from 69 real-world applications, reducing repair time by 20 minutes on average.Conclusion: AutoRepair offers a promising approach for improving APR by reducing search space and enhancing patch quality through machine learning and pattern prioritization.

Keywords: Automatic Software Repair, Bug Fixing, Software Repair, Machin Learning

Suggested Citation

Ghanati, Amir and parsa, saeed and Izadkhah, Habib, Autorepair: A New Machine Learning-Based Approach to Automated Software Repair. Available at SSRN: https://ssrn.com/abstract=5008904 or http://dx.doi.org/10.2139/ssrn.5008904

Amir Ghanati

Qazvin Islamic Azad University ( email )

Iran

Saeed Parsa (Contact Author)

Iran University of Science and Technology ( email )

Tehran
Iran

Habib Izadkhah

affiliation not provided to SSRN ( email )

No Address Available

Do you have a job opening that you would like to promote on SSRN?

Paper statistics

Downloads
22
Abstract Views
144
PlumX Metrics