Unfortunately I don't think Patrick87's is fully correct. It is important to understand what is meant by "bug" in the question. I assume that "bugs" include errors affecting the types and errors that don't.
It is fundamental to note that under the correspondence, theorems relate only to type characteristics of a program, not values characteristics. So program statements such as x := x + 1
and x := x + 2
are completely equivalent from the theorem view. It is important to realise that in the normal interpretation these are just abstract theorems, these are not theorems about the program (for example about its correctness).
So from this it's easy to see that a lot (maybe most) bugs won't affect the corresponding theorems at all. For example if we have a financial program and we want to calculate net profit from gross profit, it could be correct to write NetProfit := GrossProfit * 0.8
. But we might enter a bug and calculate the tax instead NetProfit := GrossProfit * 0.2
. It has no effect on types so it has no effect on the correspondance. Many, many real bugs are like this: off-by-one errors, overflow errors, misunderstanding a subroutine's behaviour, numeric and string typos...
For bugs that do affect the correspondence, it depends whether they result in a valid theorem or not. If it results in a valid theorem, it's more likely that your program will compile, run without crashing etc. However, it means you got one of the types wrong, an example is if you want to put 2 numbers together, like 1 and 3 -> 13. But you forget to convert them to strings, so instead you get 1 and 3 -> 4. On the other hand, if it does not result in a valid theorem, then it means you probably got something seriously wrong, and the program won't compile, or it will get stuck in an endless loop, or something like that.
To summarise, if you have a program with a corresponding theorem that is valid, that doesn't tell you much. The program can still have bugs. On the other hand, if you are trying to make a program that doesn't have a corresponding theorem, then then that is a good indication you are probably going wrong. So it depends on the kind of bug, most don't show up at all.