awslabs / aws-sdlc-controltower-extension
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
  • 47% duplication:
    • 2,140 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,019 duplicated lines
  • 77 duplicates
system47% (1,019 lines)
Duplication per Extension
yaml68% (826 lines)
py20% (193 lines)
Duplication per Component (primary)
cloudformation83% (796 lines)
lambdas/custom_resources/CTE_CrossAccountCloudFormation/src12% (73 lines)
lambdas/stepfunctions/CTE_SignalCfnResponseFn/src65% (38 lines)
lambdas/stepfunctions/CTE_CreateAccountFn/src23% (38 lines)
lambdas/stepfunctions/CTE_InvokeCreateAccountFn/src57% (38 lines)
lambdas/stepfunctions14% (30 lines)
lambdas/stepfunctions/CTE_GetAccountStatusFn/src11% (6 lines)
lambdas/custom_resources0% (0 lines)

Duplication Between Components (50+ lines)

G lambdas/stepfunctions/CTE_CreateAccountFn/src lambdas/stepfunctions/CTE_CreateAccountFn/src lambdas/stepfunctions/CTE_InvokeCreateAccountFn/src lambdas/stepfunctions/CTE_InvokeCreateAccountFn/src lambdas/stepfunctions/CTE_CreateAccountFn/src--lambdas/stepfunctions/CTE_InvokeCreateAccountFn/src 76 lambdas/stepfunctions/CTE_SignalCfnResponseFn/src lambdas/stepfunctions/CTE_SignalCfnResponseFn/src lambdas/stepfunctions/CTE_CreateAccountFn/src--lambdas/stepfunctions/CTE_SignalCfnResponseFn/src 76 lambdas/stepfunctions/CTE_InvokeCreateAccountFn/src--lambdas/stepfunctions/CTE_SignalCfnResponseFn/src 76 lambdas/custom_resources/CTE_CrossAccountCloudFormation/src lambdas/custom_resources/CTE_CrossAccountCloudFormation/src lambdas/custom_resources/CTE_CrossAccountCloudFormation/src--lambdas/stepfunctions/CTE_CreateAccountFn/src 76 lambdas/custom_resources/CTE_CrossAccountCloudFormation/src--lambdas/stepfunctions/CTE_InvokeCreateAccountFn/src 76 lambdas/custom_resources/CTE_CrossAccountCloudFormation/src--lambdas/stepfunctions/CTE_SignalCfnResponseFn/src 76

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 77 duplicates...
Size#FoldersFilesLinesCode
158 x 2 cloudformation
cloudformation
account-stack-deployment.yaml
codepipeline-example.yaml
141:305 (39%)
120:284 (32%)
view
114 x 2 cloudformation
cloudformation
account-stack-deployment.yaml
codepipeline-example.yaml
306:423 (28%)
287:404 (23%)
view
32 x 2 lambdas/stepfunctions/CTE_CreateAccountFn/src
lambdas/stepfunctions/CT...vokeCreateAccountFn/src
cfnresponse.py
cfnresponse.py
9:53 (100%)
9:53 (100%)
view
32 x 2 lambdas/custom_resources...countCloudFormation/src
lambdas/stepfunctions/CTE_CreateAccountFn/src
cfnresponse.py
cfnresponse.py
9:53 (100%)
9:53 (100%)
view
32 x 2 lambdas/custom_resources...countCloudFormation/src
lambdas/stepfunctions/CT...vokeCreateAccountFn/src
cfnresponse.py
cfnresponse.py
9:53 (100%)
9:53 (100%)
view
32 x 2 lambdas/stepfunctions/CTE_CreateAccountFn/src
lambdas/stepfunctions/CTE_SignalCfnResponseFn/src
cfnresponse.py
cfnresponse.py
9:53 (100%)
9:53 (100%)
view
32 x 2 lambdas/custom_resources...countCloudFormation/src
lambdas/stepfunctions/CTE_SignalCfnResponseFn/src
cfnresponse.py
cfnresponse.py
9:53 (100%)
9:53 (100%)
view
32 x 2 lambdas/stepfunctions/CT...vokeCreateAccountFn/src
lambdas/stepfunctions/CTE_SignalCfnResponseFn/src
cfnresponse.py
cfnresponse.py
9:53 (100%)
9:53 (100%)
view
28 x 2 cloudformation
cloudformation
codepipeline-example.yaml
codepipeline-example.yaml
164:192 (5%)
201:229 (5%)
view
28 x 2 cloudformation
cloudformation
account-stack-deployment.yaml
codepipeline-example.yaml
148:176 (6%)
164:192 (5%)
view
28 x 2 cloudformation
cloudformation
account-stack-deployment.yaml
account-stack-deployment.yaml
148:176 (6%)
222:250 (6%)
view
28 x 2 cloudformation
cloudformation
account-stack-deployment.yaml
codepipeline-example.yaml
148:176 (6%)
201:229 (5%)
view
28 x 2 cloudformation
cloudformation
codepipeline-example.yaml
codepipeline-example.yaml
127:155 (5%)
164:192 (5%)
view
28 x 2 cloudformation
cloudformation
codepipeline-example.yaml
codepipeline-example.yaml
127:155 (5%)
201:229 (5%)
view
28 x 2 cloudformation
cloudformation
account-stack-deployment.yaml
codepipeline-example.yaml
222:250 (6%)
127:155 (5%)
view
28 x 2 cloudformation
cloudformation
account-stack-deployment.yaml
account-stack-deployment.yaml
185:213 (6%)
222:250 (6%)
view
28 x 2 cloudformation
cloudformation
account-stack-deployment.yaml
codepipeline-example.yaml
222:250 (6%)
164:192 (5%)
view
28 x 2 cloudformation
cloudformation
account-stack-deployment.yaml
codepipeline-example.yaml
185:213 (6%)
201:229 (5%)
view
28 x 2 cloudformation
cloudformation
account-stack-deployment.yaml
codepipeline-example.yaml
185:213 (6%)
127:155 (5%)
view
28 x 2 cloudformation
cloudformation
account-stack-deployment.yaml
account-stack-deployment.yaml
148:176 (6%)
185:213 (6%)
view
Duplicated Units
The list of top 1 duplicated units.
See data for all 1 unit duplicate
Size#FoldersFilesLinesCode
27 x 4 lambdas/stepfunctions/CT...vokeCreateAccountFn/src
lambdas/stepfunctions/CTE_SignalCfnResponseFn/src
lambdas/stepfunctions/CTE_CreateAccountFn/src
lambdas/custom_resources...countCloudFormation/src
cfnresponse.py
cfnresponse.py
cfnresponse.py
cfnresponse.py
0:0 
0:0 
0:0 
0:0 
view