Duplicate code is a
computer programming term for a sequence of
source code that occurs more than once, either within a program or across different programs owned or maintained by the same entity. Duplicate code is generally considered
undesirable for a number of reasons. A minimum requirement is usually applied to the quantity of code that must appear in a sequence for it to be considered duplicate rather than coincidentally similar. Sequences of duplicate code are sometimes known as
code clones or just
clones, the automated process of finding duplications in source code is called
clone detection.