aws-samples / amazon-detective-multiaccount-scripts
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
  • 41% duplication:
    • 441 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 184 duplicated lines
  • 4 duplicates
system41% (184 lines)
Duplication per Extension
py48% (184 lines)
Duplication per Component (primary)
ROOT41% (184 lines)
Longest Duplicates
The list of 4 longest duplicates.
See data for all 4 duplicates...
Size#FoldersFilesLinesCode
50 x 2 ROOT
ROOT
disableDetective.py
enableDetective.py
123:236 (29%)
129:244 (24%)
view
16 x 2 ROOT
ROOT
disableDetective.py
enableDetective.py
5:42 (9%)
5:43 (7%)
view
16 x 2 ROOT
ROOT
disableDetective.py
enableDetective.py
85:116 (9%)
92:123 (7%)
view
10 x 2 ROOT
ROOT
disableDetective.py
enableDetective.py
262:272 (5%)
322:332 (4%)
view
Duplicated Units
The list of top 4 duplicated units.
See data for all 4 unit duplicates...
Size#FoldersFilesLinesCode
31 x 2 ROOT
ROOT
enableDetective.py
disableDetective.py
0:0 
0:0 
view
44 x 2 ROOT
ROOT
enableDetective.py
disableDetective.py
0:0 
0:0 
view
18 x 2 ROOT
ROOT
enableDetective.py
disableDetective.py
0:0 
0:0 
view
6 x 2 ROOT
ROOT
enableDetective.py
disableDetective.py
0:0 
0:0 
view