Duplicate Code.
Two code fragments look almost identical.
##Signs and Symptoms
Two code fragments look almost identical.

##Reasons for the Problem
Duplication usually occurs when multiple programmers are working on different parts of the same program at the same time. Since they’re working on different tasks, they may be unaware their colleague has already written similar code that could be repurposed for their own needs.
There’s also more subtle duplication, when specific parts of code look different but actually perform the same job. This kind of duplication can be hard to find and fix.
Sometimes duplication is purposeful. When rushing to meet deadlines and the existing code is “almost right” for the job, novice programmers may not be able to resist the temptation of copying and pasting the relevant code. And in some cases, the programmer is simply too lazy to de-clutter.
##Payoff
-
Merging duplicate code simplifies the structure of your code and makes it shorter.
-
Simplification + shortness = code that’s easier to simplify and cheaper to support.
