After applying the brakes in a sudden situation, the automatic emergency braking came on but the car didn't stop. The brake pedal was pushed all the way to the floor board but the car didn't stop and crashed into the vehicle in front. This happened once before but didn't end in a crash. This was a total brake failure.