In each pair, the first sentence refers wholly to the future. The second sentences refer both to the immediate past ["if he has made a mistake"] and the future ["he will try to correct it].
In both pairs of sentences, it's a matter of personal taste as to whether or not a comma is necessary. The author may have decided one way when drafting the first pair, then changed his mind when drafting the second pair - and forgot to go back and amend the first pair.
Student or Learner