awslabs / aws-ec2rescue-linux
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
  • 26% duplication:
    • 72,182 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 19,130 duplicated lines
  • 22,519 duplicates
system26% (19,130 lines)
Duplication per Extension
py21% (13,355 lines)
yaml51% (5,703 lines)
spec72% (72 lines)
Duplication per Component (primary)
lib22% (13,224 lines)
mod.d51% (5,527 lines)
ec2rlcore4% (131 lines)
pre.d64% (96 lines)
rpmbuild72% (72 lines)
example_modules38% (51 lines)
post.d96% (29 lines)
ROOT0% (0 lines)
example_configs0% (0 lines)
tools0% (0 lines)

Duplication Between Components (50+ lines)

G mod.d mod.d pre.d pre.d mod.d--pre.d 2177 post.d post.d mod.d--post.d 1971 post.d--pre.d 76 example_modules example_modules example_modules--mod.d 1576

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 22,519 duplicates...
Size#FoldersFilesLinesCode
606 x 2 lib/botocore/vendored
lib
six.py
six.py
31:868 (100%)
31:868 (100%)
view
606 x 2 lib/requests/packages/urllib3/packages
lib
six.py
six.py
31:868 (100%)
31:868 (100%)
view
606 x 2 lib/botocore/vendored
lib/requests/packages/urllib3/packages
six.py
six.py
31:868 (100%)
31:868 (100%)
view
191 x 2 lib/python2/yaml
lib/python3/yaml
scanner.py
scanner.py
284:690 (21%)
284:690 (21%)
view
184 x 2 lib/python2/yaml
lib/python3/yaml
parser.py
parser.py
361:587 (45%)
361:587 (45%)
view
121 x 2 lib/requests/packages/urllib3/packages
lib/urllib3/packages
six.py
six.py
50:237 (19%)
50:236 (17%)
view
121 x 2 lib
lib/urllib3/packages
six.py
six.py
50:237 (19%)
50:236 (17%)
view
121 x 2 lib/botocore/vendored
lib/urllib3/packages
six.py
six.py
50:237 (19%)
50:236 (17%)
view
103 x 2 lib/python2/yaml
lib/python3/yaml
parser.py
parser.py
79:221 (25%)
79:221 (25%)
view
87 x 2 lib/python2/yaml
lib/python3/yaml
serializer.py
serializer.py
15:110 (94%)
15:110 (94%)
view
82 x 2 lib/python2/yaml
lib/python3/yaml
constructor.py
constructor.py
294:383 (14%)
298:387 (14%)
view
79 x 2 lib/python2/yaml
lib/python3/yaml
tokens.py
tokens.py
2:103 (100%)
2:103 (100%)
view
67 x 2 lib/python2/yaml
lib/python3/yaml
constructor.py
constructor.py
17:92 (11%)
15:90 (11%)
view
67 x 2 lib/python2/yaml
lib/python3/yaml
events.py
events.py
4:85 (100%)
4:85 (100%)
view
62 x 2 lib/python2/yaml
lib/python3/yaml
cyaml.py
cyaml.py
2:84 (100%)
2:84 (100%)
view
60 x 2 lib/requests/packages/ur...ontrib/_securetransport
lib/urllib3/contrib/_securetransport
bindings.py
bindings.py
60:130 (13%)
66:136 (16%)
view
55 x 2 lib/botocore/vendored/requests/packages/urllib3
lib/requests/packages/urllib3
exceptions.py
exceptions.py
4:113 (61%)
8:117 (43%)
view
54 x 2 lib/python2/yaml
lib/python3/yaml
emitter.py
emitter.py
482:543 (5%)
481:542 (5%)
view
54 x 2 lib/python2/yaml
lib/python3/yaml
__init__.py
__init__.py
11:111 (33%)
11:112 (33%)
view
53 x 2 lib/requests/packages/urllib3/packages
lib/urllib3/packages
six.py
six.py
486:560 (8%)
516:595 (7%)
view
Duplicated Units
The list of top 20 duplicated units.
See data for all 168 unit duplicates...
Size#FoldersFilesLinesCode
51 x 3 lib/botocore/vendored
lib
lib/requests/packages/urllib3/packages
six.py
six.py
six.py
0:0 
0:0 
0:0 
view
32 x 2 lib/python2/yaml
lib/python3/yaml
serializer.py
serializer.py
0:0 
0:0 
view
28 x 2 lib/python2/yaml
lib/python3/yaml
constructor.py
constructor.py
0:0 
0:0 
view
43 x 2 lib/python2/yaml
lib/python3/yaml
scanner.py
scanner.py
0:0 
0:0 
view
25 x 2 lib/python2/yaml
lib/python3/yaml
parser.py
parser.py
0:0 
0:0 
view
27 x 2 lib/python2/yaml
lib/python3/yaml
parser.py
parser.py
0:0 
0:0 
view
23 x 2 lib/python2/yaml
lib/python3/yaml
parser.py
parser.py
0:0 
0:0 
view
33 x 2 lib/python2/yaml
lib/python3/yaml
constructor.py
constructor.py
0:0 
0:0 
view
21 x 2 lib/python2/yaml
lib/python3/yaml
resolver.py
resolver.py
0:0 
0:0 
view
20 x 2 lib/urllib3
lib/requests/packages/urllib3
response.py
response.py
0:0 
0:0 
view
19 x 2 lib/python2/yaml
lib/python3/yaml
emitter.py
emitter.py
0:0 
0:0 
view
20 x 2 lib/python2/yaml
lib/python3/yaml
constructor.py
constructor.py
0:0 
0:0 
view
19 x 2 lib/python2/yaml
lib/python3/yaml
constructor.py
constructor.py
0:0 
0:0 
view
18 x 2 lib/python2/yaml
lib/python3/yaml
emitter.py
emitter.py
0:0 
0:0 
view
18 x 2 lib/urllib3
lib/requests/packages/urllib3
response.py
response.py
0:0 
0:0 
view
17 x 2 lib/python2/yaml
lib/python3/yaml
parser.py
parser.py
0:0 
0:0 
view
17 x 2 lib/python2/yaml
lib/python3/yaml
parser.py
parser.py
0:0 
0:0 
view
20 x 2 lib/python2/yaml
lib/python3/yaml
emitter.py
emitter.py
0:0 
0:0 
view
16 x 4 lib/botocore/vendored
lib/urllib3/packages
lib
lib/requests/packages/urllib3/packages
six.py
six.py
six.py
six.py
0:0 
0:0 
0:0 
0:0 
view
16 x 2 lib/python2/yaml
lib/python3/yaml
error.py
error.py
0:0 
0:0 
view