H3
Duplication

Intro
  • For duplication, we look at places in code where there are six 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
  • 10% duplication:
    • 8,743 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 911 duplicated lines
  • 48 duplicates
system10% (911 lines)
Duplication per Extension
c10% (911 lines)
Duplication per Component (primary)
src/apps15% (788 lines)
src/h3lib3% (123 lines)
examples0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
Size#FoldersFilesLinesCode
21 x 2 src/apps/testapps
src/apps/testapps
testGeoToH3.c
testH3ToGeo.c
39:71 (87%)
48:80 (72%)
view
20 x 2 src/apps/testapps
src/apps/testapps
mkRandGeoBoundary.c
mkRandGeo.c
31:52 (55%)
32:53 (57%)
view
19 x 2 src/apps/miscapps
src/apps/miscapps
h3ToGeoBoundaryHier.c
h3ToGeoHier.c
127:153 (25%)
128:154 (25%)
view
18 x 2 src/apps/testapps
src/apps/testapps
testCompact.c
testCompact.c
42:67 (7%)
116:141 (7%)
view
16 x 2 src/apps/miscapps
src/apps/miscapps
h3ToGeoBoundaryHier.c
h3ToGeoHier.c
100:116 (21%)
100:116 (21%)
view
15 x 2 src/apps/filters
src/apps/filters
h3ToGeo.c
h3ToGeoBoundary.c
86:110 (37%)
87:111 (37%)
view
14 x 2 src/apps/testapps
src/apps/testapps
testKRing.c
testKRing.c
113:131 (5%)
145:163 (5%)
view
12 x 2 src/apps/testapps
src/apps/testapps
testH3SetToLinkedGeo.c
testH3SetToLinkedGeo.c
68:82 (6%)
263:276 (6%)
view
12 x 2 src/apps/applib/lib
src/apps/applib/lib
kml.c
kml.c
39:50 (10%)
68:79 (10%)
view
11 x 2 src/apps/filters
src/apps/filters
kRing.c
hexRange.c
56:69 (22%)
51:64 (25%)
view
11 x 2 src/apps/testapps
src/apps/testapps
testPolyfillReported.c
testPolyfillReported.c
91:103 (11%)
117:129 (11%)
view
11 x 2 src/h3lib/lib
src/h3lib/lib
faceijk.c
faceijk.c
632:650 (2%)
808:826 (2%)
view
11 x 2 src/apps/miscapps
src/apps/miscapps
h3ToGeoBoundaryHier.c
h3ToGeoHier.c
79:98 (14%)
79:98 (14%)
view
11 x 2 src/apps/testapps
src/apps/testapps
mkRandGeoBoundary.c
mkRandGeo.c
54:70 (30%)
55:71 (31%)
view
10 x 2 src/apps/testapps
src/apps/testapps
testH3UniEdge.c
testH3UniEdge.c
283:293 (4%)
323:333 (4%)
view
10 x 2 src/h3lib/lib
src/h3lib/lib
faceijk.c
faceijk.c
563:572 (1%)
727:736 (1%)
view
10 x 2 src/apps/testapps
src/apps/testapps
testPolygon.c
testPolygon.c
303:316 (2%)
524:537 (2%)
view
10 x 2 src/apps/filters
src/apps/miscapps
h3ToGeoBoundary.c
h3ToGeoBoundaryHier.c
52:63 (25%)
64:75 (13%)
view
10 x 2 src/apps/testapps
src/apps/testapps
testH3DistanceExhaustive.c
testH3ToLocalIjExhaustive.c
42:54 (34%)
130:142 (7%)
view
9 x 6 src/apps/filters
src/apps/filters
src/apps/filters
src/apps/filters
src/apps/filters
src/apps/filters
h3ToLocalIj.c
h3ToGeoBoundary.c
h3ToComponents.c
hexRange.c
h3ToGeo.c
kRing.c
80:92 (23%)
94:106 (22%)
120:132 (11%)
82:94 (20%)
93:105 (22%)
90:102 (18%)
view
Most Frequent Duplicates
The list of 9 most frequently found duplicates.
Size#FoldersFilesLinesCode
6 x 9 src/apps/filters
src/apps/testapps
src/apps/filters
src/apps/filters
src/apps/filters
src/apps/filters
src/apps/filters
src/apps/filters
src/apps/filters
kRing.c
testH3ToGeoBoundary.c
h3ToLocalIj.c
localIjToH3.c
h3ToGeo.c
h3ToComponents.c
geoToH3.c
h3ToGeoBoundary.c
hexRange.c
92:98 (12%)
45:51 (40%)
82:88 (15%)
101:107 (10%)
95:101 (15%)
122:128 (7%)
100:106 (11%)
96:102 (15%)
84:90 (13%)
view
7 x 8 src/apps/filters
src/apps/filters
src/apps/filters
src/apps/filters
src/apps/filters
src/apps/filters
src/apps/filters
src/apps/filters
localIjToH3.c
kRing.c
h3ToLocalIj.c
h3ToGeo.c
geoToH3.c
h3ToComponents.c
hexRange.c
h3ToGeoBoundary.c
99:107 (12%)
90:98 (14%)
80:88 (17%)
93:101 (17%)
98:106 (13%)
120:128 (9%)
82:90 (16%)
94:102 (17%)
view
6 x 6 src/h3lib/lib
src/h3lib/lib
src/h3lib/lib
src/h3lib/lib
src/h3lib/lib
src/h3lib/lib
coordijk.c
coordijk.c
coordijk.c
coordijk.c
coordijk.c
coordijk.c
316:323 (2%)
338:345 (2%)
373:380 (2%)
394:401 (2%)
465:472 (2%)
487:494 (2%)
view
9 x 6 src/apps/filters
src/apps/filters
src/apps/filters
src/apps/filters
src/apps/filters
src/apps/filters
h3ToLocalIj.c
h3ToGeoBoundary.c
h3ToComponents.c
hexRange.c
h3ToGeo.c
kRing.c
80:92 (23%)
94:106 (22%)
120:132 (11%)
82:94 (20%)
93:105 (22%)
90:102 (18%)
view
6 x 5 src/apps/testapps
src/apps/miscapps
src/apps/miscapps
src/apps/miscapps
src/apps/testapps
mkRandGeo.c
h3ToGeoBoundaryHier.c
h3ToGeoHier.c
h3ToHier.c
mkRandGeoBoundary.c
57:64 (17%)
127:134 (8%)
128:135 (7%)
83:90 (10%)
56:63 (16%)
view
6 x 4 src/apps/miscapps
src/apps/miscapps
src/apps/miscapps
src/apps/testapps
h3ToGeoHier.c
h3ToHier.c
h3ToGeoBoundaryHier.c
testH3NeighborRotations.c
80:90 (7%)
44:53 (10%)
80:90 (8%)
124:134 (6%)
view
6 x 3 src/apps/filters
src/apps/testapps
src/apps/testapps
geoToH3.c
mkRandGeo.c
mkRandGeoBoundary.c
61:66 (11%)
44:49 (17%)
43:48 (16%)
view
6 x 3 src/apps/miscapps
src/apps/miscapps
src/apps/miscapps
generateBaseCellNeighbors.c
generateNumHexagons.c
generateFaceCenterPoint.c
250:260 (4%)
43:53 (50%)
39:49 (42%)
view
6 x 3 src/apps/miscapps
src/apps/miscapps
src/apps/miscapps
h3ToGeoHier.c
h3ToHier.c
h3ToGeoBoundaryHier.c
100:106 (7%)
63:69 (10%)
100:106 (8%)
view