Automating Program Verification And Repair Using Invariant Analysis And Test Input Generation