aws-samples / aws-jp-iot-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
  • 50% duplication:
    • 475 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 238 duplicated lines
  • 10 duplicates
system50% (238 lines)
Duplication per Extension
py50% (238 lines)
Duplication per Component (primary)
aws-iot-greengrass-for-beginners/sensor79% (109 lines)
aws-iot-greengrass-for-beginners/alert74% (109 lines)
aws-iot-events-for-beginners16% (20 lines)
aws-iot-greengrass-for-beginners/lambda0% (0 lines)
aws-iot-core-raspberrypi-gpio0% (0 lines)
amazon-kinesis-video-streams-workshop-jp0% (0 lines)

Duplication Between Components (50+ lines)

G aws-iot-greengrass-for-beginners/alert aws-iot-greengrass-for-beginners/alert aws-iot-greengrass-for-beginners/sensor aws-iot-greengrass-for-beginners/sensor aws-iot-greengrass-for-beginners/alert--aws-iot-greengrass-for-beginners/sensor 218

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 10 longest duplicates.
See data for all 10 duplicates...
Size#FoldersFilesLinesCode
25 x 2 aws-iot-greengrass-for-beginners/alert
aws-iot-greengrass-for-beginners/sensor
main.py
main.py
65:92 (17%)
66:93 (18%)
view
21 x 2 aws-iot-greengrass-for-beginners/alert
aws-iot-greengrass-for-beginners/sensor
main.py
main.py
108:132 (14%)
109:133 (15%)
view
20 x 2 aws-iot-greengrass-for-beginners/alert
aws-iot-greengrass-for-beginners/sensor
main.py
main.py
134:162 (13%)
135:162 (14%)
view
19 x 2 aws-iot-greengrass-for-beginners/alert
aws-iot-greengrass-for-beginners/sensor
main.py
main.py
211:246 (13%)
193:228 (13%)
view
16 x 2 aws-iot-greengrass-for-beginners/alert
aws-iot-greengrass-for-beginners/sensor
main.py
main.py
25:59 (10%)
26:60 (11%)
view
11 x 2 aws-iot-events-for-beginners
aws-iot-greengrass-for-beginners/alert
main.py
main.py
191:210 (9%)
227:246 (7%)
view
11 x 2 aws-iot-events-for-beginners
aws-iot-greengrass-for-beginners/sensor
main.py
main.py
191:210 (9%)
209:228 (8%)
view
9 x 2 aws-iot-events-for-beginners
aws-iot-greengrass-for-beginners/sensor
main.py
main.py
57:66 (7%)
82:91 (6%)
view
9 x 2 aws-iot-events-for-beginners
aws-iot-greengrass-for-beginners/alert
main.py
main.py
57:66 (7%)
81:90 (6%)
view
8 x 2 aws-iot-greengrass-for-beginners/alert
aws-iot-greengrass-for-beginners/sensor
main.py
main.py
94:105 (5%)
95:106 (5%)
view
Duplicated Units
The list of top 2 duplicated units.
See data for all 2 unit duplicates...
Size#FoldersFilesLinesCode
19 x 2 aws-iot-greengrass-for-beginners/alert
aws-iot-greengrass-for-beginners/sensor
main.py
main.py
0:0 
0:0 
view
14 x 2 aws-iot-greengrass-for-beginners/alert
aws-iot-greengrass-for-beginners/sensor
main.py
main.py
0:0 
0:0 
view