ALL-DUPL0003 · pasted_block_copy_count
Count repeated normalized implementation blocks.
This is a deterministic rule for all languages. Read its implementation.
Definition
Section titled “Definition”Measure one group of fragments the kernel matched on normalized tokens, where every identifier
became a placeholder and every literal became a placeholder for its kind, so a copy is still a
copy after its locals were renamed and its formatting was redone. Report the copies past the
first when the repeated run reaches minimum_token_length normalized tokens and covers at
least minimum_line_count lines. The value is the number of copies after the first. The
comparison survives cosmetic edits while remaining tied to one exact executable source range.
Whether two matches share knowledge is left to ALL-DUPL1001 or an explicit project ceiling.
The kernel admits implementation blocks from forty normalized tokens so it can retain compact pasted bodies. This rule defaults to sixty before calling one a defect, while four lines is what Symilar asks for by default. Raising the token floor is the honest way to ask for fewer findings, because the cost of matching on shape is that short pieces of implementation can look alike without sharing knowledge. A setting below forty is refused because the provider cannot supply complete evidence in that domain.
Continue with evidence and references, or open the examples.