awslabs / aws-codepipeline-governance
Duplication

Places in code with 6 or more lines that are exactly the same.

Intro
  • For duplication, we look at places in code where there are 6 or more lines of code that are exactly the same.
  • Before duplication is calculated, the code is cleaned to remove empty lines, comments, and frequently duplicated constructs such as imports.
  • You should aim at having as little as possible (<5%) of duplicated code as high-level of duplication can lead to maintenance difficulties, poor factoring, and logical contradictions.
Learn more...
Duplication Overall
  • 51% duplication:
    • 1,104 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 573 duplicated lines
  • 27 duplicates
system51% (573 lines)
Duplication per Extension
yaml73% (573 lines)
Duplication per Component (primary)
cloudformation76% (524 lines)
scripts60% (25 lines)
cloudformation/stacksets38% (24 lines)
src0% (0 lines)

Duplication Between Components (50+ lines)

G cloudformation cloudformation scripts scripts cloudformation--scripts 69 cloudformation/stacksets cloudformation/stacksets cloudformation--cloudformation/stacksets 66

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 20 longest duplicates.
See data for all 27 duplicates...
Size#FoldersFilesLinesCode
63 x 2 cloudformation
cloudformation
codepipeline-example.yaml
codepipeline-sep-acc-example.yaml
65:131 (34%)
96:162 (28%)
view
49 x 2 cloudformation
cloudformation
function-sep-acc.yaml
function.yaml
59:115 (51%)
40:96 (63%)
view
44 x 2 cloudformation
cloudformation
codepipeline-example.yaml
codepipeline-sep-acc-example.yaml
133:176 (24%)
165:208 (20%)
view
26 x 2 cloudformation
cloudformation
function-sep-acc.yaml
function.yaml
15:47 (27%)
7:39 (33%)
view
14 x 2 cloudformation
cloudformation
codepipeline-example.yaml
codepipeline-sep-acc-example.yaml
179:192 (7%)
212:225 (6%)
view
14 x 2 cloudformation
cloudformation
codepipeline-example.yaml
codepipeline-sep-acc-example.yaml
43:56 (7%)
73:86 (6%)
view
14 x 2 cloudformation
cloudformation/stacksets
assumed-iam-role.yaml
ScanUpdateCodePipelineAssumedAccessRo...
32:45 (35%)
57:70 (22%)
view
14 x 2 cloudformation
cloudformation
codepipeline-example.yaml
codepipeline-sep-acc-example.yaml
7:21 (7%)
11:25 (6%)
view
13 x 2 cloudformation
cloudformation
codepipeline-example.yaml
sam-bootstrap.yaml
47:59 (7%)
15:27 (17%)
view
11 x 2 cloudformation
scripts
codepipeline-sep-acc-example.yaml
convert-2-dynamodb-item.yaml
212:222 (5%)
21:31 (32%)
view
11 x 2 cloudformation
scripts
codepipeline-example.yaml
convert-2-dynamodb-item.yaml
179:189 (6%)
21:31 (32%)
view
10 x 2 cloudformation
cloudformation
codepipeline-sep-acc-example.yaml
sam-bootstrap.yaml
77:86 (4%)
15:24 (13%)
view
10 x 2 cloudformation
cloudformation/stacksets
assumed-iam-role.yaml
ScanUpdateCodePipelineAssumedAccessRo...
18:27 (25%)
46:55 (15%)
view
9 x 2 cloudformation
cloudformation
codepipeline-example.yaml
sam-bootstrap.yaml
84:92 (4%)
42:50 (12%)
view
9 x 2 cloudformation
cloudformation
codepipeline-sep-acc-example.yaml
sam-bootstrap.yaml
115:123 (4%)
42:50 (12%)
view
8 x 2 cloudformation
scripts
codepipeline-sep-acc-example.yaml
convert-2-dynamodb-item.yaml
195:202 (3%)
5:12 (23%)
view
8 x 2 cloudformation
scripts
codepipeline-example.yaml
convert-2-dynamodb-item.yaml
163:170 (4%)
5:12 (23%)
view
8 x 2 cloudformation
cloudformation
codepipeline-sep-acc-example.yaml
sam-bootstrap.yaml
140:147 (3%)
75:82 (10%)
view
8 x 2 cloudformation
cloudformation
codepipeline-example.yaml
sam-bootstrap.yaml
109:116 (4%)
75:82 (10%)
view
7 x 2 cloudformation
cloudformation
codepipeline-example.yaml
codepipeline-sep-acc-example.yaml
57:63 (3%)
88:94 (3%)
view