Duplicate Code

This smell occurs when same code structure is duplicated to multiple places within a software system. Fowler defined it as follows: "If you see the same code structure in more than one place, you can be sure that your program will be better if you find a way to unify them."

Related smells: Duplicate Abstraction Unfactored Hierarchy Cut and Paste Programming

Reference

M. Fowler, “Refactoring: Improving the Design of Existing Code”. Addison-Wesley, 1999.


Implementation Smells

Home

All rights reserved (c) Tushar Sharma 2017-23.