aws-solutions / aws-control-tower-customizations
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
  • 11% duplication:
    • 3,979 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 468 duplicated lines
  • 45 duplicates
system11% (468 lines)
Duplication per Extension
py11% (422 lines)
yaml25% (46 lines)
Duplication per Component (primary)
source/aws/services19% (178 lines)
source10% (124 lines)
source/manifest6% (84 lines)
source/validation32% (46 lines)
source/aws/utils29% (36 lines)
source/aws0% (0 lines)
source/utils0% (0 lines)
source/metrics0% (0 lines)
deployment/custom_control_tower_configuration/example-configuration0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 45 duplicates...
Size#FoldersFilesLinesCode
14 x 2 source/aws/services
source/aws/services
cloudformation.py
cloudformation.py
171:184 (4%)
324:337 (4%)
view
14 x 2 source/aws/services
source/aws/services
cloudformation.py
cloudformation.py
291:304 (4%)
324:337 (4%)
view
14 x 2 source/aws/services
source/aws/services
cloudformation.py
cloudformation.py
250:263 (4%)
291:304 (4%)
view
14 x 2 source/aws/services
source/aws/services
cloudformation.py
cloudformation.py
171:184 (4%)
291:304 (4%)
view
14 x 2 source/aws/services
source/aws/services
cloudformation.py
cloudformation.py
171:184 (4%)
250:263 (4%)
view
14 x 2 source/aws/services
source/aws/services
cloudformation.py
cloudformation.py
250:263 (4%)
324:337 (4%)
view
13 x 2 source/aws/services
source/aws/services
cloudformation.py
cloudformation.py
206:218 (4%)
246:258 (4%)
view
12 x 2 source
source
config_deployer.py
config_deployer.py
163:177 (6%)
225:239 (6%)
view
11 x 2 source/validation
source/validation
manifest-v2.schema.yaml
manifest.schema.yaml
63:73 (15%)
58:68 (16%)
view
11 x 2 source/manifest
source/manifest
manifest_parser.py
manifest_parser.py
330:340 (2%)
379:389 (2%)
view
10 x 2 source/aws/services
source/aws/services
cloudformation.py
cloudformation.py
188:203 (3%)
228:243 (3%)
view
10 x 2 source/aws/services
source/aws/services
scp.py
scp.py
33:42 (7%)
50:59 (7%)
view
9 x 2 source/aws/utils
source/aws/utils
boto3_session.py
boto3_session.py
93:101 (10%)
131:139 (10%)
view
9 x 2 source/aws/services
source/aws/services
organizations.py
organizations.py
77:86 (10%)
107:116 (10%)
view
9 x 2 source/aws/services
source/aws/services
cloudformation.py
cloudformation.py
210:218 (3%)
324:332 (3%)
view
9 x 2 source/aws/services
source/aws/services
cloudformation.py
cloudformation.py
210:218 (3%)
291:299 (3%)
view
9 x 2 source/aws/services
source/aws/services
cloudformation.py
cloudformation.py
171:179 (3%)
210:218 (3%)
view
9 x 2 source
source
state_machine_handler.py
state_machine_handler.py
841:849 (1%)
858:866 (1%)
view
9 x 2 source/aws/services
source/aws/services
scp.py
scp.py
34:42 (6%)
67:75 (6%)
view
9 x 2 source/aws/services
source/aws/services
scp.py
scp.py
51:59 (6%)
67:75 (6%)
view