aws / aws-iot-device-sdk-cpp
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
  • 4% duplication:
    • 7,449 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 331 duplicated lines
  • 56 duplicates
system4% (331 lines)
Duplication per Extension
cpp4% (256 lines)
hpp3% (63 lines)
in8% (12 lines)
Duplication per Component (primary)
src/mqtt11% (164 lines)
include/mqtt7% (51 lines)
network/OpenSSL8% (40 lines)
network/MbedTLS8% (26 lines)
cli5% (14 lines)
src/discovery4% (12 lines)
network/WebSocket1% (12 lines)
ROOT15% (12 lines)
cmake0% (0 lines)
doxygen0% (0 lines)
src0% (0 lines)
src/util0% (0 lines)
src/jobs0% (0 lines)
src/shadow0% (0 lines)
common0% (0 lines)
network0% (0 lines)
include0% (0 lines)
include/discovery0% (0 lines)
include/util0% (0 lines)
include/jobs0% (0 lines)
include/shadow0% (0 lines)

Duplication Between Components (50+ lines)

G include/mqtt include/mqtt src/mqtt src/mqtt include/mqtt--src/mqtt 66 network/MbedTLS network/MbedTLS network/OpenSSL network/OpenSSL network/MbedTLS--network/OpenSSL 51

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 56 duplicates...
Size#FoldersFilesLinesCode
9 x 2 src/mqtt
src/mqtt
Client.cpp
GreengrassMqttClient.cpp
61:69 (4%)
66:74 (11%)
view
8 x 2 network/OpenSSL
network/OpenSSL
OpenSSLConnection.cpp
OpenSSLConnection.cpp
85:92 (1%)
101:108 (1%)
view
8 x 2 network/MbedTLS
network/MbedTLS
MbedTLSConnection.cpp
MbedTLSConnection.cpp
33:40 (3%)
58:65 (3%)
view
8 x 2 network/MbedTLS
network/OpenSSL
MbedTLSConnection.cpp
OpenSSLConnection.cpp
59:66 (3%)
102:109 (1%)
view
7 x 2 include/mqtt
include/mqtt
Connect.hpp
Connect.hpp
86:92 (5%)
128:134 (5%)
view
7 x 2 cli
cli
cli.cpp
cli.cpp
65:71 (3%)
81:87 (3%)
view
7 x 2 src/mqtt
src/mqtt
Client.cpp
GreengrassMqttClient.cpp
73:79 (3%)
78:84 (8%)
view
7 x 2 network/MbedTLS
network/OpenSSL
MbedTLSConnection.cpp
OpenSSLConnection.cpp
34:40 (2%)
86:92 (1%)
view
7 x 2 include/mqtt
include/mqtt
Client.hpp
GreengrassMqttClient.hpp
64:70 (8%)
147:153 (16%)
view
7 x 2 network/OpenSSL
network/OpenSSL
OpenSSLConnection.cpp
OpenSSLConnection.cpp
90:96 (1%)
119:125 (1%)
view
7 x 2 src/mqtt
src/mqtt
Client.cpp
Client.cpp
61:67 (3%)
83:89 (3%)
view
7 x 2 src/mqtt
src/mqtt
Connect.cpp
Connect.cpp
49:55 (1%)
136:142 (1%)
view
7 x 2 include/mqtt
include/mqtt
Client.hpp
GreengrassMqttClient.hpp
64:70 (8%)
66:72 (16%)
view
7 x 2 include/mqtt
include/mqtt
GreengrassMqttClient.hpp
GreengrassMqttClient.hpp
66:72 (16%)
147:153 (16%)
view
7 x 2 src/mqtt
src/mqtt
Client.cpp
GreengrassMqttClient.cpp
83:89 (3%)
66:72 (8%)
view
7 x 2 src/mqtt
src/mqtt
Packet.cpp
Packet.cpp
218:226 (5%)
231:239 (5%)
view
7 x 2 network/MbedTLS
network/OpenSSL
MbedTLSConnection.cpp
OpenSSLConnection.cpp
59:65 (2%)
86:92 (1%)
view
7 x 2 network/MbedTLS
network/OpenSSL
MbedTLSConnection.cpp
OpenSSLConnection.cpp
34:40 (2%)
102:108 (1%)
view
6 x 2 include/mqtt
include/mqtt
Connect.hpp
Connect.hpp
85:90 (4%)
108:113 (4%)
view
6 x 2 include/mqtt
src/mqtt
Connect.hpp
Connect.cpp
86:91 (4%)
136:141 (1%)
view
Duplicated Units
The list of top 2 duplicated units.
See data for all 2 unit duplicates...
Size#FoldersFilesLinesCode
9 x 2 src/util
src/util
JsonParser.cpp
JsonParser.cpp
108:120 
122:134 
view
9 x 2 src/mqtt
src/mqtt
Packet.cpp
Packet.cpp
217:228 
230:241 
view