Other definitions
A failure occurs when the program acts in a way inconsistent with its specification
A fault occurs when an internal system state is incorrect (even if it doesn’t lead to a failure)
A defect is the piece of code that led to a fault (and then usually a failure)
An error is the human mistake that led to the defect