aws-quickstart / quickstart-aws-utility-meter-data-analytics-platform
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:
    • 4,511 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,295 duplicated lines
  • 181 duplicates
system28% (1,295 lines)
Duplication per Extension
yaml34% (1,012 lines)
py18% (283 lines)
Duplication per Component (primary)
templates42% (599 lines)
templates/prediction28% (257 lines)
templates/glue25% (156 lines)
assets/glue/scripts37% (141 lines)
assets/functions/ml_pipeline19% (98 lines)
meter-data13% (28 lines)
assets/functions/meter_forecast14% (16 lines)
assets0% (0 lines)
assets/functions/adapter0% (0 lines)
assets/functions/redshift0% (0 lines)
assets/functions0% (0 lines)
assets/functions/get_anomaly0% (0 lines)
assets/functions/outage_info0% (0 lines)
geo-data0% (0 lines)
cis-data0% (0 lines)

Duplication Between Components (50+ lines)

G templates/prediction templates/prediction templates templates templates/prediction--templates 259 templates/glue templates/glue templates/glue--templates/prediction 55 templates/glue--templates 167

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 181 duplicates...
Size#FoldersFilesLinesCode
52 x 2 templates
templates
copy-demo-data.yaml
copy-scripts.yaml
64:117 (42%)
69:122 (40%)
view
51 x 2 templates
templates
main.template.yaml
workload.template.yaml
189:243 (22%)
356:410 (12%)
view
34 x 2 assets/glue/scripts
assets/glue/scripts
transform_raw_to_clean.py
transform_raw_to_clean_london.py
17:78 (41%)
14:74 (42%)
view
30 x 2 templates/glue
templates
glue-wfl-aggregation.yaml
redshift.yaml
144:174 (12%)
314:344 (7%)
view
27 x 2 templates
templates
copy-demo-data.yaml
copy-scripts.yaml
28:54 (22%)
33:59 (20%)
view
23 x 2 templates/prediction
templates
prediction-api.yaml
redshift.yaml
17:39 (11%)
370:392 (5%)
view
23 x 2 templates/prediction
templates
ml-pipeline.yaml
redshift.yaml
560:582 (4%)
370:392 (5%)
view
23 x 2 templates/prediction
templates/prediction
ml-pipeline.yaml
prediction-api.yaml
560:582 (4%)
17:39 (11%)
view
18 x 2 templates/prediction
templates
prediction-api.yaml
redshift.yaml
91:108 (9%)
163:180 (4%)
view
15 x 2 templates/glue
templates/glue
glue-wfl-aggregation.yaml
glue-wfl-aggregation.yaml
69:84 (6%)
96:111 (6%)
view
14 x 2 templates
templates
main.template.yaml
workload.template.yaml
163:178 (6%)
330:345 (3%)
view
12 x 2 templates
templates
adapter.yaml
redshift.yaml
74:85 (8%)
371:382 (3%)
view
12 x 2 templates
templates/prediction
adapter.yaml
ml-pipeline.yaml
74:85 (8%)
561:572 (2%)
view
12 x 2 templates
templates/prediction
adapter.yaml
ml-pipeline.yaml
144:155 (8%)
510:521 (2%)
view
12 x 2 templates
templates/prediction
adapter.yaml
prediction-api.yaml
74:85 (8%)
18:29 (6%)
view
11 x 2 templates
templates
workload.template.yaml
workload.template.yaml
58:68 (2%)
172:182 (2%)
view
11 x 2 templates
templates
workload.template.yaml
workload.template.yaml
58:68 (2%)
194:204 (2%)
view
11 x 2 templates
templates
workload.template.yaml
workload.template.yaml
194:204 (2%)
216:226 (2%)
view
11 x 2 templates
templates
workload.template.yaml
workload.template.yaml
194:204 (2%)
234:244 (2%)
view
11 x 2 templates
templates/prediction
adapter.yaml
prediction-api.yaml
146:156 (7%)
99:109 (5%)
view
Duplicated Units
The list of top 4 duplicated units.
See data for all 4 unit duplicates...
Size#FoldersFilesLinesCode
9 x 2 assets/functions/ml_pipeline/prepare_batch
assets/functions/meter_forecast
app.py
app.py
0:0 
0:0 
view
8 x 2 assets/glue/scripts
assets/glue/scripts
transform_raw_to_clean_london.py
transform_raw_to_clean.py
0:0 
0:0 
view
11 x 2 assets/glue/scripts
assets/glue/scripts
transform_raw_to_clean_london.py
transform_raw_to_clean.py
0:0 
0:0 
view
7 x 3 assets/glue/scripts
assets/glue/scripts
assets/glue/scripts
business_aggregate_monthly.py
business_aggregate_weekly.py
business_aggregate_daily.py
0:0 
0:0 
0:0 
view