aws-samples / aws-greengrass-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
  • 59% duplication:
    • 498 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 298 duplicated lines
  • 6 duplicates
system59% (298 lines)
Duplication per Extension
py59% (298 lines)
Duplication per Component (primary)
traffic-light-example-python67% (230 lines)
iot-blog/image-classification-connector-and-feedback/part_250% (34 lines)
iot-blog/image-classification-connector-and-feedback/part_175% (34 lines)
ROOT0% (0 lines)
hello-world-python0% (0 lines)
hello-world-counter-python0% (0 lines)

Duplication Between Components (50+ lines)

G iot-blog/image-classification-connector-and-feedback/part_1 iot-blog/image-classification-connector-and-feedback/part_1 iot-blog/image-classification-connector-and-feedback/part_2 iot-blog/image-classification-connector-and-feedback/part_2 iot-blog/image-classification-connector-and-feedback/part_1--iot-blog/image-classification-connector-and-feedback/part_2 68

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 6 longest duplicates.
See data for all 6 duplicates...
Size#FoldersFilesLinesCode
74 x 2 traffic-light-example-python
traffic-light-example-python
lightController.py
trafficLight.py
55:153 (55%)
76:176 (52%)
view
26 x 2 iot-blog/image-classific...tor-and-feedback/part_1
iot-blog/image-classific...tor-and-feedback/part_2
beverageclassifier.py
beverageclassifier.py
43:80 (57%)
60:97 (38%)
view
23 x 2 traffic-light-example-python
traffic-light-example-python
lightController.py
trafficLight.py
155:186 (17%)
178:209 (16%)
view
9 x 2 traffic-light-example-python
traffic-light-example-python
lightController.py
trafficLight.py
190:206 (6%)
213:229 (6%)
view
9 x 2 traffic-light-example-python
traffic-light-example-python
lightController.py
trafficLight.py
23:46 (6%)
23:46 (6%)
view
8 x 2 iot-blog/image-classific...tor-and-feedback/part_1
iot-blog/image-classific...tor-and-feedback/part_2
beverageclassifier.py
beverageclassifier.py
87:96 (17%)
119:128 (11%)
view
Duplicated Units
The list of top 1 duplicated units.
See data for all 1 unit duplicate
Size#FoldersFilesLinesCode
27 x 2 iot-blog/image-classific...tor-and-feedback/part_2
iot-blog/image-classific...tor-and-feedback/part_1
beverageclassifier.py
beverageclassifier.py
0:0 
0:0 
view