Program repair is the automated process of generating a patch—a small, correct modification—to a faulty program to make it satisfy a given specification. This specification is typically defined by a test suite, formal properties, or behavioral constraints. The core mechanism involves searching a space of possible code modifications, guided by the discrepancy between the program's current, buggy behavior and its intended, correct behavior. The goal is to produce a minimal, semantically correct change that resolves the defect without introducing regressions.
