aws / aws-parallelcluster
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
  • 32% duplication:
    • 41,912 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 13,555 duplicated lines
  • 10,635 duplicates
system32% (13,555 lines)
Duplication per Extension
py27% (8,798 lines)
yaml53% (4,729 lines)
rb5% (28 lines)
Duplication per Component (primary)
api/client68% (6,369 lines)
cli/src19% (4,594 lines)
api/spec63% (1,590 lines)
api/infrastructure25% (303 lines)
util15% (231 lines)
scheduler_plugins/slurm12% (147 lines)
cloudformation/ad21% (102 lines)
awsbatch-cli/src5% (83 lines)
scheduler_plugins/plugin_template83% (76 lines)
api/docker23% (22 lines)
awsbatch-cli31% (19 lines)
cli21% (19 lines)
api0% (0 lines)
cloudformation/utils0% (0 lines)
ROOT0% (0 lines)

Duplication Between Components (50+ lines)

G api/spec api/spec cli/src cli/src api/spec--cli/src 326 scheduler_plugins/slurm scheduler_plugins/slurm cli/src--scheduler_plugins/slurm 94 scheduler_plugins/plugin_template scheduler_plugins/plugin_template scheduler_plugins/plugin_template--scheduler_plugins/slurm 132 api/docker api/docker api/infrastructure api/infrastructure api/docker--api/infrastructure 58

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 10,635 duplicates...
Size#FoldersFilesLinesCode
92 x 2 cli/src/pcluster/api/openapi
cli/src/pcluster/api/openapi
openapi.yaml
openapi.yaml
926:1017 (2%)
1585:1676 (2%)
view
70 x 2 api/client/src/pcluster_client/model
api/client/src/pcluster_client/model
cluster_status.py
cluster_status_filtering_option.py
58:190 (76%)
57:189 (76%)
view
69 x 2 api/client/src/pcluster_client/model
api/client/src/pcluster_client/model
compute_fleet_status.py
requested_compute_fleet_status.py
60:191 (74%)
54:185 (79%)
view
68 x 2 api/client/src/pcluster_client/model
api/client/src/pcluster_client/model
ec2_ami_state.py
validation_level.py
58:188 (75%)
54:184 (79%)
view
67 x 2 api/client/src/pcluster_client/model
api/client/src/pcluster_client/model
cloud_formation_stack_status.py
compute_fleet_status.py
68:197 (67%)
62:191 (72%)
view
67 x 2 api/client/src/pcluster_client/model
api/client/src/pcluster_client/model
image_builder_image_status.py
node_type.py
63:192 (71%)
54:183 (78%)
view
67 x 2 api/client/src/pcluster_client/model
api/client/src/pcluster_client/model
ec2_ami_state.py
instance_state.py
59:188 (74%)
58:187 (75%)
view
67 x 2 api/client/src/pcluster_client/model
api/client/src/pcluster_client/model
cloud_formation_stack_status.py
node_type.py
68:197 (67%)
54:183 (78%)
view
67 x 2 api/client/src/pcluster_client/model
api/client/src/pcluster_client/model
cloud_formation_resource_status.py
validation_level.py
68:197 (67%)
55:184 (77%)
view
67 x 2 api/client/src/pcluster_client/model
api/client/src/pcluster_client/model
image_builder_image_status.py
requested_compute_fleet_status.py
63:192 (71%)
56:185 (77%)
view
67 x 2 api/client/src/pcluster_client/model
api/client/src/pcluster_client/model
cloud_formation_stack_status.py
image_builder_image_status.py
68:197 (67%)
63:192 (71%)
view
67 x 2 api/client/src/pcluster_client/model
api/client/src/pcluster_client/model
compute_fleet_status.py
node_type.py
62:191 (72%)
54:183 (78%)
view
67 x 2 api/client/src/pcluster_client/model
api/client/src/pcluster_client/model
instance_state.py
requested_compute_fleet_status.py
58:187 (75%)
56:185 (77%)
view
67 x 2 api/client/src/pcluster_client/model
api/client/src/pcluster_client/model
cloud_formation_resource_status.py
cloud_formation_stack_status.py
68:197 (67%)
68:197 (67%)
view
67 x 2 api/client/src/pcluster_client/model
api/client/src/pcluster_client/model
cluster_status_filtering_option.py
compute_fleet_status.py
60:189 (73%)
62:191 (72%)
view
67 x 2 api/client/src/pcluster_client/model
api/client/src/pcluster_client/model
image_build_status.py
image_builder_image_status.py
58:187 (75%)
63:192 (71%)
view
67 x 2 api/client/src/pcluster_client/model
api/client/src/pcluster_client/model
image_build_status.py
requested_compute_fleet_status.py
58:187 (75%)
56:185 (77%)
view
67 x 2 api/client/src/pcluster_client/model
api/client/src/pcluster_client/model
compute_fleet_status.py
image_status_filtering_option.py
62:191 (72%)
55:184 (77%)
view
67 x 2 api/client/src/pcluster_client/model
api/client/src/pcluster_client/model
cloud_formation_resource_status.py
cluster_status_filtering_option.py
68:197 (67%)
60:189 (73%)
view
67 x 2 api/client/src/pcluster_client/model
api/client/src/pcluster_client/model
image_build_status.py
image_status_filtering_option.py
58:187 (75%)
55:184 (77%)
view
Duplicated Units
The list of top 14 duplicated units.
See data for all 14 unit duplicates...
Size#FoldersFilesLinesCode
15 x 2 api/client/src/pcluster_client
api/client/resources
sigv4_auth.py
sigv4_auth.py
0:0 
0:0 
view
14 x 2 api/client/src/pcluster_client
api/client/src/pcluster_client
model_utils.py
model_utils.py
0:0 
0:0 
view
9 x 2 cli/src/pcluster/config
cli/src/pcluster/config
cluster_config.py
cluster_config.py
0:0 
0:0 
view
8 x 2 api/client/src/pcluster_client
api/client/src/pcluster_client
model_utils.py
model_utils.py
0:0 
0:0 
view
7 x 2 cli/src/pcluster/models
cli/src/pcluster/models
imagebuilder.py
cluster.py
0:0 
0:0 
view
13 x 2 api/client/src/pcluster_client/model
api/client/src/pcluster_client/model
get_image_log_events_response_content.py
get_cluster_log_events_response_conte...
0:0 
0:0 
view
7 x 2 cli/src/pcluster/config
cli/src/pcluster/config
cluster_config.py
cluster_config.py
0:0 
0:0 
view
12 x 2 api/client/src/pcluster_client/model
api/client/src/pcluster_client/model
build_image_bad_request_exception_res...
create_cluster_bad_request_exception_...
0:0 
0:0 
view
12 x 2 api/client/src/pcluster_client/model
api/client/src/pcluster_client/model
get_image_stack_events_response_conte...
get_cluster_stack_events_response_con...
0:0 
0:0 
view
12 x 2 api/client/src/pcluster_client/model
api/client/src/pcluster_client/model
update_compute_fleet_response_content.py
describe_compute_fleet_response_conte...
0:0 
0:0 
view
12 x 2 api/client/src/pcluster_client/model
api/client/src/pcluster_client/model
list_image_log_streams_response_conte...
list_cluster_log_streams_response_con...
0:0 
0:0 
view
10 x 13 api/client/src/pcluster_client/model
api/client/src/pcluster_client/model
api/client/src/pcluster_client/model
api/client/src/pcluster_client/model
api/client/src/pcluster_client/model
api/client/src/pcluster_client/model
api/client/src/pcluster_client/model
api/client/src/pcluster_client/model
api/client/src/pcluster_client/model
api/client/src/pcluster_client/model
...
image_status_filtering_option.py
node_type.py
validation_level.py
cloud_formation_stack_status.py
ec2_ami_state.py
requested_compute_fleet_status.py
image_build_status.py
image_builder_image_status.py
cluster_status_filtering_option.py
cluster_status.py
...
0:0 
0:0 
0:0 
0:0 
0:0 
0:0 
0:0 
0:0 
0:0 
0:0 
...
view
10 x 6 api/client/src/pcluster_client/model
api/client/src/pcluster_client/model
api/client/src/pcluster_client/model
api/client/src/pcluster_client/model
api/client/src/pcluster_client/model
api/client/src/pcluster_client/model
bad_request_exception_response_conten...
not_found_exception_response_content.py
internal_service_exception_response_c...
conflict_exception_response_content.py
unauthorized_client_error_response_co...
limit_exceeded_exception_response_con...
0:0 
0:0 
0:0 
0:0 
0:0 
0:0 
view
10 x 2 api/client/src/pcluster_client/model
api/client/src/pcluster_client/model
cluster_configuration_structure.py
image_configuration_structure.py
0:0 
0:0 
view