aws-samples / modern-application-integration-patterns
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
  • 73% duplication:
    • 1,309 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 960 duplicated lines
  • 175 duplicates
system73% (960 lines)
Duplication per Extension
yaml73% (960 lines)
Duplication per Component (primary)
language-detection-and-translation/api93% (440 lines)
language-detection-and-translation59% (199 lines)
product-feedback-form-processing/api95% (168 lines)
product-feedback-form-processing62% (153 lines)
product-feedback-form-processing/functions/create-case0% (0 lines)
ROOT0% (0 lines)

Duplication Between Components (50+ lines)

G language-detection-and-translation/api language-detection-and-translation/api product-feedback-form-processing/api product-feedback-form-processing/api language-detection-and-translation/api--product-feedback-form-processing/api 513 language-detection-and-translation language-detection-and-translation product-feedback-form-processing product-feedback-form-processing language-detection-and-translation--product-feedback-form-processing 238

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 175 duplicates...
Size#FoldersFilesLinesCode
64 x 2 language-detection-and-translation/api
language-detection-and-translation/api
skeleton-api.yaml
solution-api.yaml
4:68 (35%)
4:68 (21%)
view
63 x 2 product-feedback-form-processing/api
product-feedback-form-processing/api
skeleton-api.yaml
solution-api.yaml
4:66 (71%)
4:66 (71%)
view
45 x 2 language-detection-and-translation/api
product-feedback-form-processing/api
skeleton-api.yaml
solution-api.yaml
4:48 (25%)
4:48 (51%)
view
45 x 2 language-detection-and-translation/api
product-feedback-form-processing/api
skeleton-api.yaml
skeleton-api.yaml
4:48 (25%)
4:48 (51%)
view
45 x 2 language-detection-and-translation/api
language-detection-and-translation/api
skeleton-api.yaml
solution-api.yaml
113:163 (25%)
163:213 (15%)
view
45 x 2 language-detection-and-translation/api
product-feedback-form-processing/api
solution-api.yaml
solution-api.yaml
4:48 (15%)
4:48 (51%)
view
45 x 2 language-detection-and-translation/api
product-feedback-form-processing/api
solution-api.yaml
skeleton-api.yaml
4:48 (15%)
4:48 (51%)
view
30 x 2 language-detection-and-translation
product-feedback-form-processing
template.yaml
template.yaml
126:156 (9%)
131:161 (12%)
view
25 x 2 language-detection-and-translation
product-feedback-form-processing
template.yaml
template.yaml
18:45 (7%)
14:40 (10%)
view
24 x 2 language-detection-and-translation
language-detection-and-translation
template.yaml
template.yaml
137:160 (7%)
263:286 (7%)
view
21 x 2 language-detection-and-translation/api
language-detection-and-translation/api
solution-api.yaml
solution-api.yaml
65:86 (7%)
107:128 (7%)
view
20 x 2 language-detection-and-translation
product-feedback-form-processing
template.yaml
template.yaml
263:282 (6%)
142:161 (8%)
view
20 x 2 language-detection-and-translation/api
language-detection-and-translation/api
skeleton-api.yaml
solution-api.yaml
91:111 (11%)
141:161 (6%)
view
20 x 2 language-detection-and-translation/api
language-detection-and-translation/api
solution-api.yaml
solution-api.yaml
158:178 (6%)
210:230 (6%)
view
20 x 2 language-detection-and-translation/api
language-detection-and-translation/api
skeleton-api.yaml
skeleton-api.yaml
108:128 (11%)
160:180 (11%)
view
19 x 2 language-detection-and-translation
language-detection-and-translation
template.yaml
template.yaml
96:114 (5%)
222:240 (5%)
view
19 x 2 language-detection-and-translation/api
language-detection-and-translation/api
skeleton-api.yaml
solution-api.yaml
165:184 (10%)
215:234 (6%)
view
17 x 2 language-detection-and-translation
product-feedback-form-processing
template.yaml
template.yaml
106:123 (5%)
111:128 (6%)
view
17 x 2 language-detection-and-translation
product-feedback-form-processing
template.yaml
template.yaml
232:249 (5%)
235:252 (6%)
view
15 x 2 product-feedback-form-processing
product-feedback-form-processing
template.yaml
template.yaml
105:119 (6%)
229:243 (6%)
view