Design patterns·The named ways it goes wrong
the bug was fixed in one of the four near-identical blocks, and reported again a month later from the other three.
Copy-paste programming
Also calledcopy and paste programming, duplicated code, clone and modify
Producing new code by duplicating existing code and editing it, so a defect or a rule change exists in several places. The duplication is not itself the sin — a little duplication is cheaper than a bad abstraction — the sin is duplication of a decision, which then has to be changed everywhere consistently. The tell is that the copies drift, and nobody knows which of them is the correct one.