Dead Code Definition
 Dead Code – parts of a computer program that are no longer executed when the program is running, which could result from modification of program logic, improvements in the design, or refactoring; however, they still exist in the source code. For better maintainability of codes, minimizing complexity of programs, and increasing performance it is mandatory to identify and remove them.
Dead code not only consumes useful resources but also increases mess in the system and might as well introduce pitfalls for bugs, if not addressed immediately it can cause this security vulnerability. Therefore, it makes future enhancements difficult and hampers comprehension of codes.
There are different ways such as using static code analysis tools, performing manual code reviews, or using code coverage analysis. Regular maintenance activities are recommended for keeping software updated thus making effective and easy-to-maintain codes even after several years have passed since their creation.