IfSQ logo

IfSQ


SPM-3—Copy/Paste Programming

Defect Indicators: A largely similar or identical section of code appears in two or more places in the program or set of programs.

Risks: Having to modify identical code in multiple places:

Assessment:

Remedy: Isolate a single copy of the code into a separate program (e.g., method, function, subroutine) and reuse it by calling it from the places in which it was used.

References:

Research Findings: