A burglar has been jailed for four years and he was caught by DNA left at the scene when he was punched by the owner of the home he had broken into.