DRY: Knowledge Has One Source
DRY is often translated as a ban on repeating lines of code. That's too crude. The problem arises not from similar lines but when one business rule is written in several places and each has to be changed separately. DRY is about a single source of knowledge, not the uniqueness of text.
Hence an important corollary: two similar fragments aren't necessarily one piece of knowledge. They may look the same today by chance but evolve for different reasons tomorrow. A phone check in two forms is one piece of knowledge (the format is set by a company rule), while similar amount checks in a discount and a delivery are different, because different owners stand behind them.
A single source is for knowledge, not for characters. If a rule changes, all its copies must change together - so bring them into one place. If the fragments can diverge, their similarity is still only skin-deep.
Telling one from the other is what the lab helps with: it asks the right question instead of the temptation to "glue the similar."
Duplicated knowledge or similar code?
Duplicated knowledge: bring the rule into one source. This is meaningful DRY.
When is DRY actually needed?
The temptation to merge the similar is especially strong when the abstraction looks beautiful. That's where the next principle - AHA - is needed.