aws-samples / aws-lambda-docker-serverless-inference
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
  • 24% duplication:
    • 727 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 175 duplicated lines
  • 14 duplicates
system24% (175 lines)
Duplication per Extension
yaml32% (77 lines)
py14% (52 lines)
java43% (32 lines)
yml20% (14 lines)
Duplication per Component (primary)
xgboost-inference-docker-lambda73% (36 lines)
djl-object-detection-inference-docker-lambda41% (26 lines)
xgboost-inference-arm64-docker-lambda26% (26 lines)
djl-tensorflow-lite-inference-docker-lambda39% (22 lines)
online-machine-learning-aws-lambda8% (14 lines)
hebert-sentiment-analysis-inference-docker-lambda28% (12 lines)
pytorch-inference-docker-lambda24% (12 lines)
scikit-learn-inference-docker-lambda22% (10 lines)
tensorflow-inference-docker-lambda23% (10 lines)
tensorflow-train-in-sagemaker-deploy-with-lambda8% (7 lines)
xgboost-built-in-algo-train-in-sagemaker-deploy-with-lambda0% (0 lines)
blazingtext-text-classification-train-in-sagemaker-deploy-with-lambda0% (0 lines)

Duplication Between Components (50+ lines)

G xgboost-inference-arm64-docker-lambda xgboost-inference-arm64-docker-lambda xgboost-inference-docker-lambda xgboost-inference-docker-lambda xgboost-inference-arm64-docker-lambda--xgboost-inference-docker-lambda 52

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 14 longest duplicates.
See data for all 14 duplicates...
Size#FoldersFilesLinesCode
19 x 2 xgboost-inference-arm64-docker-lambda/train-code
xgboost-inference-docker-lambda/train-code
bc_xgboost_train.py
bc_xgboost_train.py
9:39 (100%)
9:39 (100%)
view
10 x 2 djl-object-detection-inf...c/main/java/com/example
djl-tensorflow-lite-infe...c/main/java/com/example
App.java
App.java
29:45 (29%)
27:43 (37%)
view
10 x 2 scikit-learn-inference-docker-lambda
xgboost-inference-docker-lambda
template.yaml
template.yaml
10:20 (43%)
10:20 (43%)
view
7 x 2 tensorflow-inference-docker-lambda
tensorflow-train-in-sagemaker-deploy-with-lambda
template.yaml
template.yaml
10:16 (30%)
10:16 (30%)
view
7 x 2 online-machine-learning-aws-lambda
online-machine-learning-aws-lambda
template.yml
template.yml
13:19 (10%)
33:39 (10%)
view
7 x 2 xgboost-inference-arm64-docker-lambda/app
xgboost-inference-docker-lambda/app
app.py
app.py
8:17 (100%)
8:17 (100%)
view
6 x 2 djl-object-detection-inference-docker-lambda
tensorflow-inference-docker-lambda
template.yaml
template.yaml
10:15 (26%)
10:15 (26%)
view
6 x 2 djl-object-detection-inf...c/main/java/com/example
djl-tensorflow-lite-infe...c/main/java/com/example
Request.java
Request.java
3:12 (100%)
3:12 (100%)
view
6 x 2 djl-object-detection-inference-docker-lambda
tensorflow-train-in-sagemaker-deploy-with-lambda
template.yaml
template.yaml
10:15 (26%)
10:15 (26%)
view
6 x 2 pytorch-inference-docker-lambda
tensorflow-inference-docker-lambda
template.yaml
template.yaml
14:20 (26%)
14:20 (26%)
view
6 x 2 hebert-sentiment-analysis-inference-docker-lambda
tensorflow-inference-docker-lambda
template.yaml
template.yaml
14:20 (26%)
14:20 (26%)
view
6 x 2 hebert-sentiment-analysis-inference-docker-lambda
pytorch-inference-docker-lambda
template.yaml
template.yaml
1:8 (26%)
1:8 (26%)
view
6 x 2 hebert-sentiment-analysis-inference-docker-lambda
pytorch-inference-docker-lambda
template.yaml
template.yaml
14:20 (26%)
14:20 (26%)
view
6 x 2 djl-object-detection-inference-docker-lambda
djl-tensorflow-lite-inference-docker-lambda
template.yaml
template.yaml
14:20 (26%)
14:20 (26%)
view