  This paper introduces the "Search, Align, and Repair" data-driven program
repair framework to automate feedback generation for introductory programming
exercises. Distinct from existing techniques, our goal is to develop an
efficient, fully automated, and problem-agnostic technique for large or
MOOC-scale introductory programming courses. We leverage the large amount of
available student submissions in such settings and develop new algorithms for
identifying similar programs, aligning correct and incorrect programs, and
repairing incorrect programs by finding minimal fixes. We have implemented our
technique in the SARFGEN system and evaluated it on thousands of real student
attempts from the Microsoft-DEV204.1X edX course and the Microsoft CodeHunt
platform. Our results show that SARFGEN can, within two seconds on average,
generate concise, useful feedback for 89.7% of the incorrect student
submissions. It has been integrated with the Microsoft-DEV204.1X edX class and
deployed for production use.
