Most of the time coaches or trainers warns not to lock or fully extend the joints during a repetitions. This is not right. Once a repetition is done the muscles needs to be completely contracted during flexion and should be fully relaxed after the completion of the repetition. This will help in using the best of energy while flexion and allowing the wasted material to go out during the relaxations. Other wise the working muscles will get tired earlier with the partial movement or repetitions the muscles will get overtrained and the improvement will be hampered.
Exercises like barbell or dumbbell curls, squats, leg presses, front presses etc where the repetitions needs to be completed with full locking of joints, only then the working muscles get relaxed and ready for the next forceful reps. YES over extensions of the joint is not recommended. If the over lock of joints it will be sort of an over relaxations which is termed as stretching of the muscle. Means if we lock the elbows during biceps curls the it will stretching of the muscles. Where the muscles are lengthen and squeezed and relaxed. This will enable the muscles to fight more for the next reps. So locking of joint is ok but don't over relax the muscles during exercise movement. Keep a continued tension over the muscles and don't focus on the joint locking or unlocking. Its all naturally occurring and let the movements go naturally.