microsoft / Azure-Kinect-Sensor-SDK
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
  • 6% duplication:
    • 33,297 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 2,026 duplicated lines
  • 202 duplicates
system6% (2,026 lines)
Duplication per Extension
c8% (651 lines)
cpp3% (306 lines)
h5% (282 lines)
cmake7% (208 lines)
py6% (183 lines)
yml24% (166 lines)
cs5% (126 lines)
hpp8% (66 lines)
ps114% (32 lines)
csh9% (6 lines)
Duplication per Component (primary)
src/transformation13% (250 lines)
include/k4ainternal14% (197 lines)
src/python6% (195 lines)
ROOT21% (166 lines)
tools/k4aviewer2% (156 lines)
cmake/FindPython10% (116 lines)
src/color4% (95 lines)
scripts16% (80 lines)
src/csharp3% (72 lines)
src/allocator24% (64 lines)
cmake3% (56 lines)
src/depth21% (53 lines)
src/record2% (52 lines)
include/k4a5% (47 lines)
src/dynlib29% (46 lines)
src/sdk5% (41 lines)
src/image13% (40 lines)
src/calibration9% (40 lines)
src/deloader25% (39 lines)
src/firmware13% (39 lines)
include/k4arecord9% (39 lines)
cmake/toolchains38% (36 lines)
tools/k4arecorder5% (34 lines)
src/usbcommand3% (21 lines)
src/dewrapper5% (20 lines)
tools/updater2% (12 lines)
src/tewrapper4% (11 lines)
tools/k4afastcapture_streaming2% (9 lines)
cmake/FetchContent0% (0 lines)
doxygen0% (0 lines)
src/capturesync0% (0 lines)
src/color_mcu0% (0 lines)
src/depth_mcu0% (0 lines)
src/global0% (0 lines)
src/imu0% (0 lines)
src/logging0% (0 lines)
src/math0% (0 lines)
src/queue0% (0 lines)
src/rwlock0% (0 lines)
tools/deversion0% (0 lines)
tools/k4afastcapture_trigger0% (0 lines)

Duplication Between Components (50+ lines)

G include/k4ainternal include/k4ainternal src/transformation src/transformation include/k4ainternal--src/transformation 160 src/deloader src/deloader include/k4ainternal--src/deloader 73 src/depth src/depth src/firmware src/firmware src/depth--src/firmware 78 include/k4a include/k4a src/sdk src/sdk include/k4a--src/sdk 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 202 duplicates...
Size#FoldersFilesLinesCode
39 x 2 src/depth
src/firmware
depth.c
firmware.c
311:361 (16%)
322:372 (13%)
view
36 x 2 src/transformation
src/transformation
intrinsic_transformation.c
intrinsic_transformation.c
20:64 (14%)
238:282 (14%)
view
26 x 2 ROOT
ROOT
azure-pipelines.yml
azure-pipelines.yml
166:197 (3%)
472:503 (3%)
view
23 x 2 src/allocator
src/allocator
allocator.c
allocator.c
156:179 (8%)
226:250 (8%)
view
17 x 2 tools/k4aviewer/platform/linux
tools/k4aviewer/platform/windows
filesystem17.cpp
filesystem17.cpp
199:242 (17%)
191:234 (17%)
view
17 x 2 scripts
scripts
HmdKit.cs
HmdKit.cs
231:261 (5%)
304:334 (5%)
view
14 x 2 src/color
src/color
mfcamerareader.h
uvc_camerareader.h
88:106 (14%)
26:44 (32%)
view
14 x 2 src/record/sdk
src/sdk
dll_main.c
dll_main.c
26:52 (87%)
23:52 (93%)
view
14 x 2 ROOT
ROOT
azure-pipelines.yml
azure-pipelines.yml
615:632 (2%)
756:773 (2%)
view
13 x 2 include/k4ainternal
tools/k4arecorder
common.h
recorder.cpp
43:57 (11%)
16:30 (8%)
view
12 x 2 cmake/FindPython
cmake/FindPython
cmake
Support.cmake
Support.cmake
338:349 (1%)
399:410 (1%)
view
12 x 2 include/k4ainternal
src/transformation
transformation.h
rgbz.c
117:128 (6%)
791:802 (1%)
view
12 x 2 include/k4ainternal
src/deloader
deloader.h
deloader.cpp
45:56 (30%)
196:207 (7%)
view
12 x 2 src/dynlib
src/dynlib
dynlib_linux.c
dynlib_windows.c
49:68 (18%)
81:98 (13%)
view
12 x 2 src/record/sdk
src/record/sdk
playback.cpp
playback.cpp
488:504 (3%)
514:530 (3%)
view
11 x 2 src/dynlib
src/dynlib
dynlib_linux.c
dynlib_windows.c
88:106 (16%)
145:164 (12%)
view
11 x 2 src/calibration
src/calibration
calibration.c
calibration.c
383:399 (2%)
462:478 (2%)
view
11 x 2 include/k4ainternal
src/transformation
transformation.h
transformation.c
131:141 (6%)
675:685 (1%)
view
11 x 2 include/k4ainternal
src/tewrapper
tewrapper.h
tewrapper.c
29:39 (68%)
193:203 (4%)
view
10 x 2 src/dewrapper
src/dewrapper
dewrapper.c
dewrapper.c
318:328 (2%)
349:359 (2%)
view
Duplicated Units
The list of top 6 duplicated units.
See data for all 6 unit duplicates...
Size#FoldersFilesLinesCode
18 x 2 src/record/sdk
src/sdk
dll_main.c
dll_main.c
26:49 
23:46 
view
15 x 2 src/csharp/SDK
src/csharp/SDK
Capture.cs
Image.cs
229:247 
709:727 
view
14 x 2 tools/k4afastcapture_streaming
tools/k4arecorder
main.cpp
main.cpp
32:52 
43:63 
view
12 x 2 scripts
scripts
HmdKit.cs
HmdKit.cs
639:651 
660:672 
view
9 x 2 tools/k4aviewer/platform/linux
tools/k4aviewer/platform/windows
filesystem17.cpp
filesystem17.cpp
132:142 
121:131 
view
6 x 2 src/record/sdk
src/record/sdk
playback.cpp
playback.cpp
638:645 
647:654 
view