aws-samples / devsecops-cicd
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
  • 67% duplication:
    • 3,902 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 2,616 duplicated lines
  • 120 duplicates
system67% (2,616 lines)
Duplication per Extension
yaml70% (1,893 lines)
html96% (384 lines)
yml71% (339 lines)
Duplication per Component (primary)
ROOT92% (1,036 lines)
workshop/templates55% (971 lines)
workshop/workshop-java-repo-vulnerable/src/main/resources/templates95% (224 lines)
workshop/workshop-java-repo84% (120 lines)
workshop/workshop-java-repo-vulnerable64% (105 lines)
workshop/workshop-java-repo/src/main/resources98% (80 lines)
workshop/workshop-java-repo-vulnerable/src/main/resources98% (80 lines)
lambda-functions0% (0 lines)
workshop/workshop-java-repo-vulnerable/src/main/java/com0% (0 lines)
workshop/workshop-java-repo/src/main/java/org0% (0 lines)

Duplication Between Components (50+ lines)

G ROOT ROOT workshop/templates workshop/templates ROOT--workshop/templates 1856 workshop/workshop-java-repo workshop/workshop-java-repo ROOT--workshop/workshop-java-repo 226 workshop/workshop-java-repo-vulnerable workshop/workshop-java-repo-vulnerable ROOT--workshop/workshop-java-repo-vulnerable 203 workshop/workshop-java-repo-vulnerable/src/main/resources/templates workshop/workshop-java-repo-vulnerable/src/main/resources/templates workshop/workshop-java-repo/src/main/resources workshop/workshop-java-repo/src/main/resources workshop/workshop-java-repo-vulnerable/src/main/resources/templates--workshop/workshop-java-repo/src/main/resources 297 workshop/workshop-java-repo-vulnerable/src/main/resources workshop/workshop-java-repo-vulnerable/src/main/resources workshop/workshop-java-repo-vulnerable/src/main/resources--workshop/workshop-java-repo-vulnerable/src/main/resources/templates 297 workshop/workshop-java-repo-vulnerable/src/main/resources--workshop/workshop-java-repo/src/main/resources 160 workshop/workshop-java-repo-vulnerable--workshop/workshop-java-repo 215

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 120 duplicates...
Size#FoldersFilesLinesCode
195 x 2 ROOT
workshop/templates
codepipeline-template.yaml
devsecops-codepipeline.yaml
474:687 (20%)
486:699 (20%)
view
162 x 2 ROOT
workshop/templates
codepipeline-template.yaml
devsecops-codepipeline.yaml
729:903 (16%)
741:915 (16%)
view
127 x 2 ROOT
workshop/templates
codepipeline-template.yaml
devsecops-codepipeline.yaml
904:1040 (13%)
917:1053 (13%)
view
100 x 2 ROOT
workshop/templates
codepipeline-template.yaml
devsecops-codepipeline.yaml
218:327 (10%)
224:333 (10%)
view
99 x 2 ROOT
workshop/templates
codepipeline-template.yaml
devsecops-codepipeline.yaml
55:158 (10%)
55:158 (10%)
view
70 x 2 workshop/workshop-java-r...ain/resources/templates
workshop/workshop-java-r...ain/resources/templates
hello.html
index.html
7:81 (90%)
3:77 (86%)
view
60 x 2 ROOT
workshop/workshop-java-repo
buildspec-sonarqube.yml
buildspec-sonarqube.yml
3:64 (100%)
3:64 (100%)
view
54 x 2 ROOT
workshop/templates
codepipeline-template.yaml
devsecops-codepipeline.yaml
330:385 (5%)
341:396 (5%)
view
51 x 2 workshop/workshop-java-r...ain/resources/templates
workshop/workshop-java-repo/src/main/resources
index.html
index.html
1:52 (62%)
1:52 (62%)
view
51 x 2 workshop/workshop-java-r...able/src/main/resources
workshop/workshop-java-r...ain/resources/templates
index.html
index.html
1:52 (62%)
1:52 (62%)
view
51 x 2 workshop/workshop-java-r...able/src/main/resources
workshop/workshop-java-repo/src/main/resources
index.html
index.html
1:52 (62%)
1:52 (62%)
view
49 x 2 workshop/workshop-java-r...ain/resources/templates
workshop/workshop-java-repo/src/main/resources
hello.html
index.html
7:56 (63%)
3:52 (60%)
view
49 x 2 workshop/workshop-java-r...able/src/main/resources
workshop/workshop-java-r...ain/resources/templates
index.html
hello.html
3:52 (60%)
7:56 (63%)
view
48 x 2 ROOT
workshop/templates
codepipeline-template.yaml
devsecops-codepipeline.yaml
161:216 (5%)
167:222 (4%)
view
45 x 2 workshop/workshop-java-r...ain/resources/templates
workshop/workshop-java-r...ain/resources/templates
index.html
welcome.html
28:77 (55%)
32:81 (59%)
view
45 x 2 workshop/workshop-java-r...ain/resources/templates
workshop/workshop-java-r...ain/resources/templates
hello.html
welcome.html
32:81 (58%)
32:81 (59%)
view
41 x 2 ROOT
workshop/workshop-java-repo-vulnerable
buildspec-sonarqube.yml
buildspec-sonarqube.yml
22:64 (68%)
28:70 (64%)
view
41 x 2 workshop/workshop-java-repo-vulnerable
workshop/workshop-java-repo
buildspec-sonarqube.yml
buildspec-sonarqube.yml
28:70 (64%)
22:64 (68%)
view
34 x 2 ROOT
workshop/templates
codepipeline-template.yaml
devsecops-codepipeline.yaml
14:47 (3%)
14:47 (3%)
view
29 x 2 workshop/workshop-java-r...ain/resources/templates
workshop/workshop-java-repo/src/main/resources
index.html
index.html
55:88 (35%)
55:88 (35%)
view