If you need to make a change to the logic or functionality of the duplicated
code, you will need to identify all the places that need to be changed, which
can be time-consuming and error-prone. If there are multiple copies of the
same code, then you will also need to test each copy to ensure that the
functionality is correct. Duplicate code can be confusing for someone who is
trying to understand the logic and flow of the code if they come across multiple
identical or nearly identical blocks of code. The reader can then skim and
think something is identical when it actually isn't. This is particularly true
during review.
