aws-samples / amazon-location-samples
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
  • 58% duplication:
    • 5,294 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 3,088 duplicated lines
  • 208 duplicates
system58% (3,088 lines)
Duplication per Extension
yml92% (2,260 lines)
html45% (184 lines)
tsx58% (137 lines)
yaml40% (127 lines)
py54% (126 lines)
js8% (92 lines)
vue50% (74 lines)
swift23% (64 lines)
css17% (24 lines)
Duplication per Component (primary)
maplibre-gl-js-vue-amplify92% (442 lines)
leaflet-vue-amplify85% (442 lines)
react-map-gl-amplify96% (339 lines)
react-map-gl-amplify-marker-tooltip-example83% (335 lines)
maplibre-gl-js-react-amplify91% (287 lines)
create-custom-map-style66% (274 lines)
react-map-gl-amplify-here-map81% (267 lines)
geocode-udf-lambda-aurora65% (145 lines)
geocode-udf-lambda-redshift59% (140 lines)
aurora-udfs50% (134 lines)
maplibre-js-react-iot-asset-tracking6% (60 lines)
maplibre-gl-js-react68% (48 lines)
maplibre-gl-js-amplify77% (42 lines)
maplibre-gl-js-amplify-marker-tooltip-example40% (41 lines)
tangram-es-ios40% (32 lines)
maplibre-native-ios34% (32 lines)
athena-udfs17% (13 lines)
tangram-js6% (9 lines)
maplibre-gl-js20% (6 lines)
tracking-ios0% (0 lines)
amazon-location-helpers0% (0 lines)

Duplication Between Components (50+ lines)

G leaflet-vue-amplify leaflet-vue-amplify maplibre-gl-js-vue-amplify maplibre-gl-js-vue-amplify leaflet-vue-amplify--maplibre-gl-js-vue-amplify 884 react-map-gl-amplify-marker-tooltip-example react-map-gl-amplify-marker-tooltip-example leaflet-vue-amplify--react-map-gl-amplify-marker-tooltip-example 192 react-map-gl-amplify react-map-gl-amplify leaflet-vue-amplify--react-map-gl-amplify 192 maplibre-gl-js-react-amplify maplibre-gl-js-react-amplify leaflet-vue-amplify--maplibre-gl-js-react-amplify 192 react-map-gl-amplify-here-map react-map-gl-amplify-here-map leaflet-vue-amplify--react-map-gl-amplify-here-map 192 maplibre-gl-js-vue-amplify--react-map-gl-amplify-marker-tooltip-example 192 maplibre-gl-js-vue-amplify--react-map-gl-amplify 192 maplibre-gl-js-vue-amplify--react-map-gl-amplify-here-map 192 react-map-gl-amplify-marker-tooltip-example--react-map-gl-amplify 670 maplibre-gl-js-react-amplify--maplibre-gl-js-vue-amplify 192 maplibre-gl-js-react-amplify--react-map-gl-amplify-marker-tooltip-example 574 maplibre-gl-js-react-amplify--react-map-gl-amplify 574 maplibre-gl-js-react-amplify--react-map-gl-amplify-here-map 522 create-custom-map-style create-custom-map-style create-custom-map-style--leaflet-vue-amplify 192 create-custom-map-style--maplibre-gl-js-vue-amplify 192 create-custom-map-style--react-map-gl-amplify-marker-tooltip-example 512 create-custom-map-style--react-map-gl-amplify 512 create-custom-map-style--maplibre-gl-js-react-amplify 512 create-custom-map-style--react-map-gl-amplify-here-map 524 react-map-gl-amplify-here-map--react-map-gl-amplify-marker-tooltip-example 522 react-map-gl-amplify-here-map--react-map-gl-amplify 522 geocode-udf-lambda-aurora geocode-udf-lambda-aurora geocode-udf-lambda-redshift geocode-udf-lambda-redshift geocode-udf-lambda-aurora--geocode-udf-lambda-redshift 280 maplibre-gl-js-react maplibre-gl-js-react maplibre-gl-js-react--react-map-gl-amplify-marker-tooltip-example 72 maplibre-gl-js-react--react-map-gl-amplify 92 maplibre-gl-js-amplify-marker-tooltip-example maplibre-gl-js-amplify-marker-tooltip-example maplibre-gl-js-amplify maplibre-gl-js-amplify maplibre-gl-js-amplify-marker-tooltip-example--maplibre-gl-js-amplify 81 maplibre-native-ios maplibre-native-ios tangram-es-ios tangram-es-ios maplibre-native-ios--tangram-es-ios 64 aurora-udfs aurora-udfs aurora-udfs--geocode-udf-lambda-aurora 58

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 208 duplicates...
Size#FoldersFilesLinesCode
276 x 2 maplibre-gl-js-react-amp...h/maplibrereact022beae3
react-map-gl-amplify-mar...h/maplibrereact022beae3
maplibrereact022beae3-cloudformation-...
maplibrereact022beae3-cloudformation-...
2:418 (100%)
2:418 (100%)
view
276 x 2 maplibre-gl-js-react-amp...h/maplibrereact022beae3
react-map-gl-amplify/amp...h/maplibrereact022beae3
maplibrereact022beae3-cloudformation-...
maplibrereact022beae3-cloudformation-...
2:418 (100%)
2:418 (100%)
view
276 x 2 react-map-gl-amplify-mar...h/maplibrereact022beae3
react-map-gl-amplify/amp...h/maplibrereact022beae3
maplibrereact022beae3-cloudformation-...
maplibrereact022beae3-cloudformation-...
2:418 (100%)
2:418 (100%)
view
84 x 2 leaflet-vue-amplify/ampl...auth/leafletvue022beae3
maplibre-gl-js-vue-ampli...h/maplibrereact022beae3
leafletvue022beae3-cloudformation-tem...
maplibrereact022beae3-cloudformation-...
1:84 (21%)
1:84 (21%)
view
75 x 2 maplibre-gl-js-react-amp...h/maplibrereact022beae3
react-map-gl-amplify-her...uth/awsheredemo4fc859b5
maplibrereact022beae3-cloudformation-...
awsheredemo4fc859b5-cloudformation-te...
2:150 (27%)
2:150 (27%)
view
75 x 2 create-custom-map-style/...ecustommapstyle0000000x
react-map-gl-amplify-her...uth/awsheredemo4fc859b5
createcustommapstyle0000000x-cloudfor...
awsheredemo4fc859b5-cloudformation-te...
2:151 (27%)
2:150 (27%)
view
75 x 2 create-custom-map-style/...ecustommapstyle0000000x
react-map-gl-amplify-mar...h/maplibrereact022beae3
createcustommapstyle0000000x-cloudfor...
maplibrereact022beae3-cloudformation-...
2:151 (27%)
2:150 (27%)
view
75 x 2 react-map-gl-amplify-her...uth/awsheredemo4fc859b5
react-map-gl-amplify/amp...h/maplibrereact022beae3
awsheredemo4fc859b5-cloudformation-te...
maplibrereact022beae3-cloudformation-...
2:150 (27%)
2:150 (27%)
view
75 x 2 create-custom-map-style/...ecustommapstyle0000000x
maplibre-gl-js-react-amp...h/maplibrereact022beae3
createcustommapstyle0000000x-cloudfor...
maplibrereact022beae3-cloudformation-...
2:151 (27%)
2:150 (27%)
view
75 x 2 react-map-gl-amplify-her...uth/awsheredemo4fc859b5
react-map-gl-amplify-mar...h/maplibrereact022beae3
awsheredemo4fc859b5-cloudformation-te...
maplibrereact022beae3-cloudformation-...
2:150 (27%)
2:150 (27%)
view
75 x 2 create-custom-map-style/...ecustommapstyle0000000x
react-map-gl-amplify/amp...h/maplibrereact022beae3
createcustommapstyle0000000x-cloudfor...
maplibrereact022beae3-cloudformation-...
2:151 (27%)
2:150 (27%)
view
74 x 2 leaflet-vue-amplify/ampl...auth/leafletvue022beae3
maplibre-gl-js-vue-ampli...h/maplibrereact022beae3
leafletvue022beae3-cloudformation-tem...
maplibrereact022beae3-cloudformation-...
176:249 (19%)
176:249 (19%)
view
74 x 2 leaflet-vue-amplify/ampl...auth/leafletvue022beae3
maplibre-gl-js-vue-ampli...h/maplibrereact022beae3
leafletvue022beae3-cloudformation-tem...
maplibrereact022beae3-cloudformation-...
311:384 (19%)
311:384 (19%)
view
68 x 2 leaflet-vue-amplify/ampl...auth/leafletvue022beae3
react-map-gl-amplify-mar...h/maplibrereact022beae3
leafletvue022beae3-cloudformation-tem...
maplibrereact022beae3-cloudformation-...
2:69 (17%)
4:137 (24%)
view
68 x 2 create-custom-map-style/...ecustommapstyle0000000x
maplibre-gl-js-vue-ampli...h/maplibrereact022beae3
createcustommapstyle0000000x-cloudfor...
maplibrereact022beae3-cloudformation-...
4:138 (24%)
2:69 (17%)
view
68 x 2 create-custom-map-style/...ecustommapstyle0000000x
leaflet-vue-amplify/ampl...auth/leafletvue022beae3
createcustommapstyle0000000x-cloudfor...
leafletvue022beae3-cloudformation-tem...
4:138 (24%)
2:69 (17%)
view
68 x 2 maplibre-gl-js-vue-ampli...h/maplibrereact022beae3
react-map-gl-amplify-her...uth/awsheredemo4fc859b5
maplibrereact022beae3-cloudformation-...
awsheredemo4fc859b5-cloudformation-te...
2:69 (17%)
4:137 (24%)
view
68 x 2 maplibre-gl-js-vue-ampli...h/maplibrereact022beae3
react-map-gl-amplify/amp...h/maplibrereact022beae3
maplibrereact022beae3-cloudformation-...
maplibrereact022beae3-cloudformation-...
2:69 (17%)
4:137 (24%)
view
68 x 2 leaflet-vue-amplify/ampl...auth/leafletvue022beae3
react-map-gl-amplify-her...uth/awsheredemo4fc859b5
leafletvue022beae3-cloudformation-tem...
awsheredemo4fc859b5-cloudformation-te...
2:69 (17%)
4:137 (24%)
view
68 x 2 leaflet-vue-amplify/ampl...auth/leafletvue022beae3
react-map-gl-amplify/amp...h/maplibrereact022beae3
leafletvue022beae3-cloudformation-tem...
maplibrereact022beae3-cloudformation-...
2:69 (17%)
4:137 (24%)
view
Duplicated Units
The list of top 3 duplicated units.
See data for all 3 unit duplicates...
Size#FoldersFilesLinesCode
52 x 2 geocode-udf-lambda-redshift/Lambda
geocode-udf-lambda-aurora/Lambda
geocode.py
geocode.py
0:0 
0:0 
view
7 x 2 maplibre-js-react-iot-asset-tracking/scripts
maplibre-js-react-iot-asset-tracking/scripts
test.js
test.js
23:30 
32:39 
view
6 x 2 maplibre-gl-js-vue-amplify/src/store
leaflet-vue-amplify/src/store
index.js
index.js
3:9 
3:9 
view