aws-samples / codepipeline-lambda-docker-images
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
  • 28% duplication:
    • 5,358 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,526 duplicated lines
  • 392 duplicates
system28% (1,526 lines)
Duplication per Extension
yaml39% (1,296 lines)
py11% (230 lines)
Duplication per Component (primary)
ApplicationCode/cfn/stageB62% (376 lines)
ApplicationCode/cfn/stageA62% (370 lines)
CodePipelineTemplate25% (290 lines)
ApplicationCode/cfn/common-cloudformation27% (153 lines)
ApplicationCode/cfn/datasets26% (107 lines)
CommonLayerCode/datalake-library/python5% (90 lines)
ApplicationCode/dockerfiles/stage-b-postupdate-metadata63% (24 lines)
ApplicationCode/dockerfiles/stage-a-postupdate-metadata43% (18 lines)
ApplicationCode/dockerfiles/stage-a-process-object42% (14 lines)
ApplicationCode/dockerfiles/stage-b-process-data41% (14 lines)
ApplicationCode/dockerfiles/stage-b-crawl-data42% (12 lines)
ApplicationCode/dockerfiles/routing-lambda13% (12 lines)
ApplicationCode/dockerfiles/stage-a-preupdate-metadata27% (8 lines)
ApplicationCode/dockerfiles/stage-b-check-job29% (8 lines)
ApplicationCode/dockerfiles/stage-a-error46% (6 lines)
ApplicationCode/dockerfiles/stage-b-error46% (6 lines)
ApplicationCode/dockerfiles/stage-a-redrive31% (6 lines)
ApplicationCode/dockerfiles/stage-b-redrive24% (6 lines)
ApplicationCode/dockerfiles/redrive-lambda27% (6 lines)
ApplicationCode0% (0 lines)
ApplicationCode/dockerfiles/stage-a-routing0% (0 lines)
ApplicationCode/dockerfiles/stage-b-routing0% (0 lines)
CommonLayerCode0% (0 lines)

Duplication Between Components (50+ lines)

G ApplicationCode/cfn/stageA ApplicationCode/cfn/stageA ApplicationCode/cfn/stageB ApplicationCode/cfn/stageB ApplicationCode/cfn/stageA--ApplicationCode/cfn/stageB 702 ApplicationCode/cfn/common-cloudformation ApplicationCode/cfn/common-cloudformation ApplicationCode/cfn/common-cloudformation--ApplicationCode/cfn/stageA 102 ApplicationCode/cfn/common-cloudformation--ApplicationCode/cfn/stageB 102

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 392 duplicates...
Size#FoldersFilesLinesCode
30 x 2 ApplicationCode/cfn/stageA
ApplicationCode/cfn/stageB
template.yaml
template.yaml
618:647 (5%)
635:664 (4%)
view
26 x 2 ApplicationCode/cfn/stageA
ApplicationCode/cfn/stageB
template.yaml
template.yaml
5:30 (4%)
12:37 (4%)
view
24 x 2 ApplicationCode/cfn/stageA
ApplicationCode/cfn/stageB
template.yaml
template.yaml
131:158 (4%)
66:98 (3%)
view
23 x 2 ApplicationCode/cfn/stageA
ApplicationCode/cfn/stageA
template.yaml
template.yaml
130:156 (3%)
320:346 (3%)
view
22 x 2 ApplicationCode/cfn/stageA
ApplicationCode/cfn/stageB
template.yaml
template.yaml
321:346 (3%)
66:96 (3%)
view
21 x 2 ApplicationCode/cfn/stageA
ApplicationCode/cfn/stageA
template.yaml
template.yaml
130:154 (3%)
194:226 (3%)
view
21 x 2 ApplicationCode/cfn/stageA
ApplicationCode/cfn/stageA
template.yaml
template.yaml
194:226 (3%)
320:344 (3%)
view
20 x 2 ApplicationCode/cfn/stageA
ApplicationCode/cfn/stageB
template.yaml
template.yaml
195:226 (3%)
66:94 (3%)
view
19 x 2 ApplicationCode/cfn/stageA
ApplicationCode/cfn/stageB
template.yaml
template.yaml
138:156 (3%)
244:262 (3%)
view
19 x 2 ApplicationCode/cfn/stageB
ApplicationCode/cfn/stageB
template.yaml
template.yaml
78:96 (3%)
244:262 (3%)
view
19 x 2 ApplicationCode/cfn/stageA
ApplicationCode/cfn/stageB
template.yaml
template.yaml
328:346 (3%)
244:262 (3%)
view
17 x 2 ApplicationCode/cfn/stageA
ApplicationCode/cfn/stageB
template.yaml
template.yaml
32:48 (2%)
39:56 (2%)
view
17 x 2 ApplicationCode/cfn/stageA
ApplicationCode/cfn/stageB
template.yaml
template.yaml
202:226 (2%)
244:260 (2%)
view
16 x 2 CodePipelineTemplate
CodePipelineTemplate
codepipeline.yaml
codepipeline.yaml
78:93 (1%)
587:602 (1%)
view
14 x 2 ApplicationCode/dockerfi...ge-a-process-object/src
ApplicationCode/dockerfi...tage-b-process-data/src
lambda_function.py
lambda_function.py
16:42 (42%)
16:42 (41%)
view
14 x 2 ApplicationCode/cfn/stageA
ApplicationCode/cfn/stageB
template.yaml
template.yaml
281:294 (2%)
307:320 (2%)
view
14 x 2 ApplicationCode/cfn/datasets
ApplicationCode/cfn/datasets
template.yaml
template.yaml
342:355 (3%)
365:378 (3%)
view
13 x 2 ApplicationCode/cfn/stageA
ApplicationCode/cfn/stageA
template.yaml
template.yaml
282:294 (2%)
332:344 (2%)
view
13 x 2 ApplicationCode/cfn/stageB
ApplicationCode/cfn/stageB
template.yaml
template.yaml
82:94 (2%)
308:320 (2%)
view
13 x 2 ApplicationCode/cfn/stageB
ApplicationCode/cfn/stageB
template.yaml
template.yaml
137:149 (2%)
347:359 (2%)
view
Duplicated Units
The list of top 1 duplicated units.
See data for all 1 unit duplicate
Size#FoldersFilesLinesCode
6 x 2 ApplicationCode/dockerfi...ge-a-process-object/src
ApplicationCode/dockerfi...tage-b-process-data/src
lambda_function.py
lambda_function.py
0:0 
0:0 
view