Very often, defect in software is also called "bug".
Based on Wikipedia, the invention of the term "bug" is attributed to Grace Hopper who had publicized in 1947 the cause of a malfunction in an early computer to a moth that trapped in the machine. The moth had been removed carefully and tapped to a log book with the notation "First actual case of bug being found". Although Grace Hopper or the person who find the insect might not have coined the term "bug", it has been suggested that they had coined the related term "debug". Since then, defects or errors in software become known as bug".