aws-solutions / aws-media-insights-engine
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
  • 46% duplication:
    • 11,735 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 5,411 duplicated lines
  • 3,724 duplicates
system46% (5,411 lines)
Duplication per Extension
yaml60% (2,840 lines)
py36% (2,571 lines)
Duplication per Component (primary)
source/operators58% (3,877 lines)
deployment50% (907 lines)
source/workflowapi28% (441 lines)
source/workflow24% (119 lines)
source/lib9% (26 lines)
source/dataplaneapi2% (21 lines)
source/dataplanestream8% (10 lines)
source/workflowstream22% (10 lines)
ROOT0% (0 lines)
source/anonymous-data-logger0% (0 lines)

Duplication Between Components (50+ lines)

G deployment deployment source/operators source/operators deployment--source/operators 550 source/workflow source/workflow source/workflowapi source/workflowapi source/workflow--source/workflowapi 124

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 3,724 duplicates...
Size#FoldersFilesLinesCode
110 x 2 deployment
deployment
media-insights-stack.yaml
media-insights-stack.yaml
256:365 (6%)
401:510 (6%)
view
62 x 2 source/operators/rekognition
source/operators/rekognition
start_label_detection.py
start_shot_detection.py
60:126 (68%)
61:127 (67%)
view
50 x 2 source/workflowapi
source/workflowapi
app.py
app.py
501:551 (3%)
626:676 (3%)
view
47 x 2 source/operators/rekognition
source/operators/rekognition
check_label_detection_status.py
check_shot_detection_status.py
64:133 (57%)
64:133 (57%)
view
45 x 2 source/operators/comprehend/entities
source/operators/comprehend/key_phrases
start_entity_detection.py
start_key_phrases.py
42:97 (46%)
42:98 (46%)
view
35 x 2 source/operators
source/operators
operator-library.yaml
operator-library.yaml
2035:2069 (1%)
2109:2143 (1%)
view
35 x 2 source/operators
source/operators
operator-library.yaml
operator-library.yaml
2072:2106 (1%)
2146:2180 (1%)
view
34 x 2 source/operators/mediaconvert
source/operators/thumbnail
start_media_convert.py
start_thumbnail.py
56:89 (33%)
123:156 (14%)
view
34 x 2 source/operators/rekognition
source/operators/rekognition
check_label_detection_status.py
check_shot_detection_status.py
20:62 (41%)
20:62 (41%)
view
33 x 2 source/operators/mediaconvert
source/operators/thumbnail
get_media_convert.py
check_thumbnail.py
14:56 (57%)
20:61 (50%)
view
32 x 2 source/workflow
source/workflowapi
app.py
app.py
603:637 (6%)
2392:2426 (2%)
view
26 x 2 source/operators
source/operators
operator-library.yaml
operator-library.yaml
288:313 (<1%)
336:361 (<1%)
view
25 x 2 source/operators
source/operators
operator-library.yaml
operator-library.yaml
2082:2106 (<1%)
2119:2143 (<1%)
view
25 x 2 source/operators
source/operators
operator-library.yaml
operator-library.yaml
2119:2143 (<1%)
2156:2180 (<1%)
view
25 x 2 source/workflowapi
source/workflowapi
app.py
app.py
599:623 (1%)
696:720 (1%)
view
25 x 2 source/operators
source/operators
operator-library.yaml
operator-library.yaml
2045:2069 (<1%)
2082:2106 (<1%)
view
25 x 2 source/operators
source/operators
operator-library.yaml
operator-library.yaml
2045:2069 (<1%)
2156:2180 (<1%)
view
24 x 2 deployment
deployment
media-insights-stack.yaml
media-insights-stack.yaml
1349:1372 (1%)
1393:1416 (1%)
view
23 x 2 source/operators
source/operators
operator-library.yaml
operator-library.yaml
90:112 (<1%)
136:158 (<1%)
view
23 x 2 source/operators
source/operators
operator-library.yaml
operator-library.yaml
2305:2327 (<1%)
2340:2362 (<1%)
view
Duplicated Units
The list of top 6 duplicated units.
See data for all 6 unit duplicates...
Size#FoldersFilesLinesCode
58 x 2 source/operators/rekognition
source/operators/rekognition
start_label_detection.py
start_shot_detection.py
0:0 
0:0 
view
11 x 2 source/operators/comprehend/entities
source/operators/comprehend/key_phrases
get_entity_detection.py
get_key_phrases.py
0:0 
0:0 
view
9 x 2 source/dataplanestream
source/workflowstream
stream.py
workflowstream.py
0:0 
0:0 
view
7 x 2 source/operators/rekognition
source/operators/rekognition
start_label_detection.py
start_shot_detection.py
0:0 
0:0 
view
7 x 2 source/lib/MediaInsights...ightsEngineLambdaHelper
source/lib/MediaInsights...ightsEngineLambdaHelper
__init__.py
__init__.py
0:0 
0:0 
view
7 x 2 source/lib/MediaInsights...ightsEngineLambdaHelper
source/lib/MediaInsights...ightsEngineLambdaHelper
__init__.py
__init__.py
0:0 
0:0 
view