aws-samples / amazon-sagemaker-nlu-search
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
  • 14% duplication:
    • 777 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 112 duplicated lines
  • 5 duplicates
system14% (112 lines)
Duplication per Extension
py49% (96 lines)
yaml8% (16 lines)
Duplication per Component (primary)
code91% (41 lines)
ROOT95% (41 lines)
cfn13% (16 lines)
backend/lambda13% (14 lines)
frontend/src0% (0 lines)
frontend/src/config0% (0 lines)
frontend/public0% (0 lines)
backend0% (0 lines)

Duplication Between Components (50+ lines)

G code code ROOT ROOT code--ROOT 82

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 5 longest duplicates.
See data for all 5 duplicates...
Size#FoldersFilesLinesCode
23 x 2 code
ROOT
inference.py
inference.py
43:72 (51%)
41:72 (53%)
view
10 x 2 code
ROOT
inference.py
inference.py
14:26 (22%)
14:26 (23%)
view
8 x 2 code
ROOT
inference.py
inference.py
31:40 (17%)
29:38 (18%)
view
8 x 2 cfn
cfn
initial_template.yaml
initial_template.yaml
55:62 (6%)
65:72 (6%)
view
7 x 2 backend/lambda
backend/lambda
app.py
app.py
115:121 (6%)
133:139 (6%)
view
Duplicated Units
The list of top 2 duplicated units.
See data for all 2 unit duplicates...
Size#FoldersFilesLinesCode
6 x 2 code
ROOT
inference.py
inference.py
0:0 
0:0 
view
6 x 2 code
ROOT
inference.py
inference.py
0:0 
0:0 
view