NXT brick not executing programs correctly
There are a few options for the cause of the error. It could be at the microprocessor level, meaning that the execution of the program is wrong, or it could be at the motor driver port, meaning that the NXT tries to drive the motor attached to the specific port but can't due to some electrical failure.

The first option can be eliminated by using other forms of output (e.g. screen) instead or along with the motors, the second can be analyzed by swapping motor ports and testing them individually.

However, in any case you probably won't be able to repair it yourself, so you should contact Lego instead if the existence of the error is certain.