aws-samples / amazon-frauddetector-mlops-multiaccount-cdk
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
  • 9% duplication:
    • 1,470 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 136 duplicated lines
  • 10 duplicates
system9% (136 lines)
Duplication per Extension
py8% (124 lines)
yml15% (12 lines)
Duplication per Component (primary)
infra/src/stages28% (82 lines)
infra/src11% (16 lines)
src/rules23% (14 lines)
build15% (12 lines)
src/core3% (12 lines)
src0% (0 lines)
src/features0% (0 lines)
infra/src/lambda_poller0% (0 lines)
infra/src/custom_constructs0% (0 lines)
infra/src/stacks0% (0 lines)
Longest Duplicates
The list of 10 longest duplicates.
See data for all 10 duplicates...
Size#FoldersFilesLinesCode
10 x 2 infra/src/stages
infra/src/stages
deploy_stage_codebuild.py
train_stage_codebuild_long_polling.py
112:122 (14%)
167:177 (9%)
view
8 x 2 infra/src
infra/src
deploy_factory_locator.py
train_factory_locator.py
26:36 (88%)
26:36 (88%)
view
7 x 2 infra/src/stages
infra/src/stages
deploy_stage_codebuild.py
train_stage_codebuild_long_polling.py
103:110 (10%)
149:156 (6%)
view
7 x 2 src/rules
src/rules
detector_rule_model_score_no_threshol...
detector_rule_model_score_positive.py
33:41 (30%)
34:42 (33%)
view
6 x 2 infra/src/stages
infra/src/stages
deploy_stage_base.py
train_stage_base.py
32:38 (40%)
33:39 (42%)
view
6 x 2 infra/src/stages
infra/src/stages
deploy_stage_codebuild.py
train_stage_codebuild_long_polling.py
69:74 (8%)
81:86 (5%)
view
6 x 2 build
build
buildspec.deploy.yml
buildspec.train.yml
15:22 (30%)
20:27 (18%)
view
6 x 2 infra/src/stages
infra/src/stages
generic_stage_codebuild.py
train_stage_codebuild_long_polling.py
23:35 (19%)
26:39 (5%)
view
6 x 2 src/core
src/core
fraud_detector_model_based_deploy.py
fraud_detector_train.py
35:41 (8%)
28:34 (11%)
view
6 x 2 infra/src/stages
infra/src/stages
deploy_stage_codebuild.py
train_stage_codebuild_long_polling.py
83:90 (8%)
108:117 (5%)
view
Duplicated Units
The list of top 1 duplicated units.
See data for all 1 unit duplicate
Size#FoldersFilesLinesCode
7 x 2 infra/src
infra/src
train_factory_locator.py
deploy_factory_locator.py
0:0 
0:0 
view