Autorepair: A New Machine Learning-Based Approach to Automated Software Repair
33 Pages Posted: 4 Nov 2024
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: Suggested Citation