AutoFix: Automated Fixing of Programs with Contracts

AutoFix is a tool for the automated repair of bugs in programs equipped with simple contracts (pre- and postconditions) written in the Eiffel programming language. It uses AutoTest to generate unit tests and contracts as testing oracles, which makes the fixing process completely automatic and generates fixes of high quality.

This page documents AutoFix 2015: the version of AutoFix incorporating the techniques developed between 2009 and 2015, and described in detail in the TSE 2014 and ICSE 2015 papers listed below. AutoFix 2015 is made available here for future reference. Henceforth, we refer to AutoFix 2015 simply as AutoFix.


AutoFix is a technique and tool for automated program repair. As program faults are discrepancies between the implementation and the specification (expressed as simple contracts), a fix may involve changes to the implementation, the specification, or even both. AutoFix exploits dynamic program analysis techniques to understand the fault cause, synthesize potential fixes to either the implementation or the contracts, and validate the synthesized fixes. In our experimental evaluations, AutoFix was able to automatically propose high-quality fixes to real world program faults.

High-quality fixes

We applied AutoFix to over 200 faults in four code bases, including both open-source software developed by professionals and student projects of various quality. AutoFix successfully fixed 86 (or 42%) of the faults; inspection shows that 51 of these fixes (for 25% of all faults) are genuine corrections with the same effect as those competent programmers would write. AutoFix was the first tool to achieve such high percentages of correct fixes on general-purpose software. More information about the experimental evaluation of AutoFix on implementation fixes can be found in our publication in TSE 2014.

AutoFix is able to produce high quality fixes to both the implementation and the specification.


AutoFix is part of the Eve integrated verification environment, the research branch of EiffelStudio.

User's manual

The user's manual of AutoFix is available here.



AutoFix was a joint project between the Chair of Software Engineering of ETH Zurich and the Software Engineering Chair of Saarland University. The AutoFix tool implementation was written by Yu Pei; Yi Wei contributed to an earlier prototype.