Hello,
but I think that there could be 2-3 cases that occur frequently
Only when code is written by people who do not know how to code properly. Some qualified senior should be review code written by people who do not have proper skill.
When code is designed/written properly,
none of the things posted above happen.
Imagine, you receive source code from another team and you are not sure that data handling has been correctly done.
Any time code is to be turned over, proof of proper testing must also be turned over. If this is a change to some program, regression testing is also necessary (need to demonstrate that not only does the new code work, but the unchanged code also continues to work properly). If the code is
properly tested, any of these problems should be caught and corrected before the code moves on to anyone else.