aws-samples / amazon-forecast-continuous-training-demo
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
  • 38% duplication:
    • 1,598 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 615 duplicated lines
  • 115 duplicates
system38% (615 lines)
Duplication per Extension
yml60% (526 lines)
py12% (89 lines)
Duplication per Component (primary)
ROOT60% (526 lines)
trainDefaultPredictor36% (26 lines)
createForecastDataSetGroup15% (17 lines)
generateDefaultForecast31% (16 lines)
forecastMetrics7% (16 lines)
deleteExpiredForecast16% (14 lines)
generateForecastExport0% (0 lines)
rawdataprocessor0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 115 duplicates...
Size#FoldersFilesLinesCode
61 x 2 ROOT
ROOT
sam-lambda-deleteExpiredForecast.yml
sam-lambda-generateDefaultForecast.yml
12:74 (71%)
8:70 (78%)
view
40 x 2 ROOT
ROOT
sam-lambda-deleteExpiredForecast.yml
sam-lambda-generateForecastExport.yml
10:51 (47%)
10:51 (44%)
view
39 x 2 ROOT
ROOT
sam-lambda-generateDefaultForecast.yml
sam-lambda-generateForecastExport.yml
8:47 (50%)
12:51 (43%)
view
37 x 2 ROOT
ROOT
sam-lambda-generateDefaultForecast.yml
sam-lambda-trainDefaultPredictor.yml
30:66 (47%)
13:49 (52%)
view
37 x 2 ROOT
ROOT
sam-lambda-rawdataprocessor.yml
sam-lambda-trainDefaultPredictor.yml
3:41 (48%)
3:41 (52%)
view
37 x 2 ROOT
ROOT
sam-lambda-deleteExpiredForecast.yml
sam-lambda-trainDefaultPredictor.yml
34:70 (43%)
13:49 (52%)
view
36 x 2 ROOT
ROOT
sam-lambda-createDataSetGroup.yml
sam-lambda-rawdataprocessor.yml
66:103 (31%)
29:66 (46%)
view
34 x 2 ROOT
ROOT
sam-lambda-createDataSetGroup.yml
sam-lambda-deleteExpiredForecast.yml
13:48 (29%)
10:45 (40%)
view
34 x 2 ROOT
ROOT
sam-lambda-createDataSetGroup.yml
sam-lambda-generateForecastExport.yml
13:48 (29%)
10:45 (37%)
view
33 x 2 ROOT
ROOT
sam-lambda-createDataSetGroup.yml
sam-lambda-generateDefaultForecast.yml
15:48 (28%)
8:41 (42%)
view
29 x 2 ROOT
ROOT
sam-lambda-generateDefaultForecast.yml
sam-lambda-rawdataprocessor.yml
30:58 (37%)
13:41 (37%)
view
29 x 2 ROOT
ROOT
sam-lambda-deleteExpiredForecast.yml
sam-lambda-rawdataprocessor.yml
34:62 (34%)
13:41 (37%)
view
24 x 2 ROOT
ROOT
sam-lambda-generateDefaultForecast.yml
sam-lambda-generateForecastExport.yml
46:70 (30%)
54:78 (26%)
view
24 x 2 ROOT
ROOT
sam-lambda-deleteExpiredForecast.yml
sam-lambda-generateForecastExport.yml
50:74 (28%)
54:78 (26%)
view
22 x 2 ROOT
ROOT
sam-lambda-forecastMetrics.yml
sam-lambda-rawdataprocessor.yml
53:76 (25%)
43:66 (28%)
view
22 x 2 ROOT
ROOT
sam-lambda-createDataSetGroup.yml
sam-lambda-forecastMetrics.yml
80:103 (19%)
53:76 (25%)
view
21 x 2 ROOT
ROOT
sam-lambda-generateForecastExport.yml
sam-lambda-trainDefaultPredictor.yml
54:74 (23%)
29:49 (29%)
view
20 x 2 ROOT
ROOT
sam-lambda-forecastMetrics.yml
sam-lambda-trainDefaultPredictor.yml
13:34 (22%)
10:30 (28%)
view
20 x 2 ROOT
ROOT
sam-lambda-forecastMetrics.yml
sam-lambda-rawdataprocessor.yml
13:34 (22%)
10:30 (25%)
view
18 x 2 ROOT
ROOT
sam-lambda-generateForecastExport.yml
sam-lambda-rawdataprocessor.yml
34:51 (20%)
13:30 (23%)
view
Duplicated Units
The list of top 1 duplicated units.
See data for all 1 unit duplicate
Size#FoldersFilesLinesCode
15 x 3 forecastMetrics
createForecastDataSetGroup
trainDefaultPredictor
forecastMetrics.py
createForecastDataSetGroup.py
trainDefaultPredictor.py
0:0 
0:0 
0:0 
view