Logical fallacy

A logical fallacy can be any one of a number of formal or informal mistakes in a deductive proof.

Note that an argument can be fallacious but still correct. For instance:

All fish live in the water.

All trout live in the water.

Therefore all trout are fish.

The premises are true and the conclusion is true, but the conclusion is not a validinference from the premises. To see why, notice that we could use identical reasoning to prove that "all whales are fish" (of course, whales are mammals not fish).

One of the premises is factually incorrect (which one depends on your definition of the word bug) and the conclusion is also untrue. However, the conclusion is an accurate deduction based on these premises. Validity and soundness are also discussed in the article Validity vs. soundness.