aws-samples / aws-dev-fabric-for-sql-server
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
  • 46% duplication:
    • 1,637 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 765 duplicated lines
  • 65 duplicates
system46% (765 lines)
Duplication per Extension
yaml45% (649 lines)
py58% (116 lines)
Duplication per Component (primary)
data-plane/fargate-sql-service64% (219 lines)
control-plane/custom-resources72% (182 lines)
control-plane/storage-manager78% (173 lines)
control-plane/custom-resources/src_custom_resources81% (116 lines)
data-plane21% (67 lines)
control-plane2% (8 lines)
control-plane/custom-resources/src_macro0% (0 lines)

Duplication Between Components (50+ lines)

G control-plane/storage-manager control-plane/storage-manager data-plane/fargate-sql-service data-plane/fargate-sql-service control-plane/storage-manager--data-plane/fargate-sql-service 373 control-plane/custom-resources control-plane/custom-resources control-plane/custom-resources--control-plane/storage-manager 75 control-plane/custom-resources--data-plane/fargate-sql-service 75 control-plane/custom-resources/src_custom_resources control-plane/custom-resources/src_custom_resources control-plane/custom-resources--control-plane/custom-resources/src_custom_resources 232

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 65 duplicates...
Size#FoldersFilesLinesCode
88 x 2 control-plane/custom-resources
control-plane/custom-res...es/src_custom_resources
custom-resources.yaml
subnets_checker.py
77:197 (35%)
4:124 (100%)
view
63 x 2 control-plane/storage-manager
data-plane/fargate-sql-service
storage-manager.yaml
fargate-sql-service.yaml
196:260 (28%)
329:393 (18%)
view
28 x 2 control-plane/custom-resources
control-plane/custom-res...es/src_custom_resources
custom-resources.yaml
unique_id.py
250:285 (11%)
4:39 (100%)
view
24 x 2 data-plane
data-plane
data-plane.yaml
data-plane.yaml
189:212 (7%)
219:242 (7%)
view
22 x 2 control-plane/custom-resources
control-plane/custom-resources
custom-resources.yaml
custom-resources.yaml
39:60 (8%)
289:310 (8%)
view
22 x 2 control-plane/custom-resources
control-plane/custom-resources
custom-resources.yaml
custom-resources.yaml
201:222 (8%)
289:310 (8%)
view
22 x 2 control-plane/custom-resources
control-plane/custom-resources
custom-resources.yaml
custom-resources.yaml
39:60 (8%)
201:222 (8%)
view
20 x 2 control-plane/storage-manager
data-plane/fargate-sql-service
storage-manager.yaml
fargate-sql-service.yaml
163:186 (9%)
277:300 (5%)
view
16 x 2 control-plane/custom-resources
control-plane/custom-resources
custom-resources.yaml
custom-resources.yaml
180:197 (6%)
268:285 (6%)
view
16 x 2 control-plane/custom-resources
control-plane/custom-res...es/src_custom_resources
custom-resources.yaml
unique_id.py
180:197 (6%)
22:39 (57%)
view
16 x 2 control-plane/custom-res...es/src_custom_resources
control-plane/custom-res...es/src_custom_resources
subnets_checker.py
unique_id.py
107:124 (18%)
22:39 (57%)
view
16 x 2 control-plane/custom-resources
control-plane/custom-res...es/src_custom_resources
custom-resources.yaml
subnets_checker.py
268:285 (6%)
107:124 (18%)
view
15 x 2 control-plane/storage-manager
data-plane/fargate-sql-service
storage-manager.yaml
fargate-sql-service.yaml
7:25 (6%)
22:40 (4%)
view
14 x 2 control-plane/storage-manager
data-plane/fargate-sql-service
storage-manager.yaml
fargate-sql-service.yaml
103:116 (6%)
193:206 (4%)
view
13 x 2 control-plane/storage-manager
data-plane/fargate-sql-service
storage-manager.yaml
fargate-sql-service.yaml
74:90 (5%)
126:142 (3%)
view
13 x 2 control-plane/storage-manager
data-plane/fargate-sql-service
storage-manager.yaml
fargate-sql-service.yaml
118:130 (5%)
208:220 (3%)
view
11 x 2 control-plane/storage-manager
data-plane/fargate-sql-service
storage-manager.yaml
fargate-sql-service.yaml
137:147 (5%)
227:237 (3%)
view
11 x 2 control-plane/storage-manager
data-plane/fargate-sql-service
storage-manager.yaml
fargate-sql-service.yaml
137:147 (5%)
244:254 (3%)
view
11 x 2 data-plane
data-plane/fargate-sql-service
data-plane.yaml
fargate-sql-service.yaml
166:177 (3%)
93:104 (3%)
view
11 x 2 data-plane/fargate-sql-service
data-plane/fargate-sql-service
fargate-sql-service.yaml
fargate-sql-service.yaml
227:237 (3%)
244:254 (3%)
view