aws-samples / rekognition-identity-verification
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
  • 15% duplication:
    • 3,708 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 570 duplicated lines
  • 87 duplicates
system15% (570 lines)
Duplication per Extension
py15% (570 lines)
Duplication per Component (primary)
infra/userportal32% (282 lines)
src/rekognition24% (176 lines)
src/bulk-loader7% (50 lines)
infra/bulkloader18% (33 lines)
src/textract4% (17 lines)
src/test-client7% (12 lines)
ROOT0% (0 lines)
infra/storage0% (0 lines)
infra0% (0 lines)
infra/services0% (0 lines)

Duplication Between Components (50+ lines)

G src/bulk-loader src/bulk-loader src/rekognition src/rekognition src/bulk-loader--src/rekognition 117 src/textract src/textract src/rekognition--src/textract 70

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 87 duplicates...
Size#FoldersFilesLinesCode
21 x 2 infra/userportal/states
infra/userportal/states
auth.py
update.py
14:38 (31%)
13:37 (28%)
view
20 x 2 infra/userportal/states
infra/userportal/states
auth.py
update.py
55:77 (29%)
55:77 (26%)
view
19 x 2 infra/userportal/gateway
infra/userportal/gateway
models.py
models.py
31:49 (10%)
55:73 (10%)
view
17 x 2 src/rekognition/compare-faces
src/rekognition/index-faces
models.py
models.py
35:54 (30%)
19:38 (50%)
view
14 x 2 infra/userportal/gateway
infra/userportal/gateway
models.py
models.py
130:143 (7%)
154:167 (7%)
view
12 x 2 infra/userportal/states
infra/userportal/states
register_idcard.py
register_user.py
14:27 (13%)
13:26 (20%)
view
12 x 2 src/rekognition/index-faces
src/rekognition/search-faces
handler.py
handler.py
48:61 (12%)
40:53 (12%)
view
12 x 2 infra/userportal/states
infra/userportal/states
register_idcard.py
register_user.py
102:117 (13%)
58:73 (20%)
view
12 x 2 infra/userportal/states
infra/userportal/states
register_idcard.py
register_user.py
40:57 (13%)
24:38 (20%)
view
12 x 2 src/rekognition/index-faces
src/rekognition/search-faces
handler.py
handler.py
22:35 (12%)
17:30 (12%)
view
11 x 2 src/rekognition/index-faces
src/rekognition/search-faces
handler.py
handler.py
112:125 (11%)
113:126 (11%)
view
11 x 2 src/rekognition/search-faces
src/textract/extract-idcard
handler.py
handler.py
15:28 (11%)
15:28 (12%)
view
11 x 2 infra/userportal/states
infra/userportal/states
auth.py
register_user.py
14:26 (16%)
14:26 (18%)
view
11 x 2 infra/bulkloader
infra/bulkloader
inventory_created.py
throttled_indexer.py
23:36 (34%)
25:38 (17%)
view
11 x 2 infra/userportal/states
infra/userportal/states
auth.py
register_idcard.py
14:26 (16%)
15:27 (11%)
view
11 x 2 infra/userportal/states
infra/userportal/states
register_idcard.py
update.py
15:27 (11%)
13:25 (14%)
view
11 x 2 infra/bulkloader
infra/bulkloader
batch_handler.py
inventory_created.py
20:33 (45%)
23:36 (34%)
view
11 x 2 infra/bulkloader
infra/bulkloader
batch_handler.py
throttled_indexer.py
20:33 (45%)
25:38 (17%)
view
11 x 2 infra/userportal/states
infra/userportal/states
register_user.py
update.py
14:26 (18%)
13:25 (14%)
view
10 x 2 src/rekognition/compare-faces
src/rekognition/search-faces
handler.py
handler.py
18:29 (12%)
17:28 (10%)
view
Duplicated Units
The list of top 1 duplicated units.
See data for all 1 unit duplicate
Size#FoldersFilesLinesCode
6 x 2 src/rekognition/index-faces
src/rekognition/compare-faces
models.py
models.py
0:0 
0:0 
view