Automatic Fixing of Programs with Contracts