aws-amplify / amplify-ci-support
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
  • 10% duplication:
    • 6,124 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 634 duplicated lines
  • 50 duplicates
system10% (634 lines)
Duplication per Extension
py11% (552 lines)
ts7% (82 lines)
Duplication per Component (primary)
integ_test_resources/ios/sdk13% (281 lines)
integ_test_resources/android/sdk30% (129 lines)
credentials_rotators/npm-token-rotation/src7% (82 lines)
build_infrastructure/android/amplify_custom_resources13% (34 lines)
build_infrastructure/android/stacks6% (30 lines)
integ_test_resources/android/amplify4% (17 lines)
build_infrastructure/android14% (17 lines)
release_artifacts_resources/ios/cdk3% (16 lines)
credentials_rotators/npm40% (16 lines)
credentials_rotators/npm/lambda_functions4% (12 lines)
fastlane/release_actions0% (0 lines)
integ_test_resources/common0% (0 lines)
integ_test_resources/common/scripts0% (0 lines)
credentials_rotators/npm-token-rotation0% (0 lines)
credentials_rotators/npm/stacks0% (0 lines)

Duplication Between Components (50+ lines)

G integ_test_resources/android/sdk integ_test_resources/android/sdk integ_test_resources/ios/sdk integ_test_resources/ios/sdk integ_test_resources/android/sdk--integ_test_resources/ios/sdk 143

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 50 duplicates...
Size#FoldersFilesLinesCode
29 x 2 src/integ_test_resources...tom_authorizer_function
src/integ_test_resources...tom_authorizer_function
iot_custom_authorizer.py
iot_custom_authorizer.py
5:35 (100%)
5:35 (100%)
view
25 x 2 src/integ_test_resources...tom_authorizer_function
src/integ_test_resources...izer_user_pass_function
iot_custom_authorizer.py
iot_custom_authorizer_user_pass.py
9:35 (86%)
24:50 (64%)
view
25 x 2 src/integ_test_resources...tom_authorizer_function
src/integ_test_resources...izer_user_pass_function
iot_custom_authorizer.py
iot_custom_authorizer_user_pass.py
9:35 (86%)
24:50 (64%)
view
23 x 2 src/integ_test_resources...tom_authorizer_provider
src/integ_test_resources...izer_user_pass_provider
iot_custom_authorizer_provider.py
iot_custom_authorizer_user_pass_provi...
35:63 (44%)
75:103 (27%)
view
20 x 2 src/integ_test_resources...tegration_tests_android
src/integ_test_resources...tegration_tests_android
kinesis_stack.py
pinpoint_stack.py
20:40 (28%)
19:39 (39%)
view
17 x 2 src/build_infrastructure/android
src/integ_test_resources...amplify/integration/cdk
setup.py
setup.py
22:38 (50%)
17:33 (56%)
view
17 x 2 src/integ_test_resources...amplify/integration/cdk
src/integ_test_resources...oid/sdk/integration/cdk
setup.py
setup.py
17:33 (56%)
23:39 (48%)
view
17 x 2 src/build_infrastructure/android
src/integ_test_resources...oid/sdk/integration/cdk
setup.py
setup.py
22:38 (50%)
23:39 (48%)
view
16 x 2 src/build_infrastructure/android
src/credentials_rotators/npm
setup.py
setup.py
23:38 (47%)
30:52 (44%)
view
16 x 2 src/integ_test_resources...oid/sdk/integration/cdk
src/integ_test_resources/ios/sdk/integration/cdk
setup.py
setup.py
24:39 (45%)
23:38 (44%)
view
16 x 2 src/build_infrastructure/android
src/integ_test_resources/ios/sdk/integration/cdk
setup.py
setup.py
23:38 (47%)
23:38 (44%)
view
16 x 2 src/credentials_rotators/npm
src/integ_test_resources...amplify/integration/cdk
setup.py
setup.py
30:52 (44%)
18:33 (53%)
view
16 x 2 src/integ_test_resources...amplify/integration/cdk
src/release_artifacts_resources/ios/cdk
setup.py
setup.py
18:33 (53%)
18:33 (55%)
view
16 x 2 src/integ_test_resources...amplify/integration/cdk
src/integ_test_resources/ios/sdk/integration/cdk
setup.py
setup.py
18:33 (53%)
23:38 (44%)
view
16 x 2 src/integ_test_resources...oid/sdk/integration/cdk
src/release_artifacts_resources/ios/cdk
setup.py
setup.py
24:39 (45%)
18:33 (55%)
view
16 x 2 src/credentials_rotators/npm
src/integ_test_resources/ios/sdk/integration/cdk
setup.py
setup.py
30:52 (44%)
23:38 (44%)
view
16 x 2 src/credentials_rotators/npm
src/release_artifacts_resources/ios/cdk
setup.py
setup.py
30:52 (44%)
18:33 (55%)
view
16 x 2 src/credentials_rotators/npm
src/integ_test_resources...oid/sdk/integration/cdk
setup.py
setup.py
30:52 (44%)
24:39 (45%)
view
16 x 2 src/build_infrastructure/android
src/release_artifacts_resources/ios/cdk
setup.py
setup.py
23:38 (47%)
18:33 (55%)
view
16 x 2 src/integ_test_resources/ios/sdk/integration/cdk
src/release_artifacts_resources/ios/cdk
setup.py
setup.py
23:38 (44%)
18:33 (55%)
view
Duplicated Units
The list of top 4 duplicated units.
See data for all 4 unit duplicates...
Size#FoldersFilesLinesCode
20 x 3 src/integ_test_resources...tom_authorizer_function
src/integ_test_resources...tom_authorizer_function
src/integ_test_resources...izer_user_pass_function
iot_custom_authorizer.py
iot_custom_authorizer.py
iot_custom_authorizer_user_pass.py
0:0 
0:0 
0:0 
view
12 x 2 src/integ_test_resources...izer_user_pass_provider
src/integ_test_resources...tom_authorizer_provider
iot_custom_authorizer_user_pass_provi...
iot_custom_authorizer_provider.py
0:0 
0:0 
view
9 x 3 src/integ_test_resources...izer_user_pass_provider
src/integ_test_resources..._resources/iot_endpoint
src/integ_test_resources...tom_authorizer_provider
iot_custom_authorizer_user_pass_provi...
iot_endpoint_provider.py
iot_custom_authorizer_provider.py
0:0 
0:0 
0:0 
view
7 x 2 src/integ_test_resources...tom_authorizer_function
src/integ_test_resources...tom_authorizer_function
iot_custom_authorizer.py
iot_custom_authorizer.py
0:0 
0:0 
view