Inferring Likely Invariants for Bug Detection