awslabs / aws-media-replay-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
  • 25% duplication:
    • 21,165 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 5,364 duplicated lines
  • 950 duplicates
system25% (5,364 lines)
Duplication per Extension
py32% (4,315 lines)
js13% (1,049 lines)
Duplication per Component (primary)
controlplaneapi/infrastructure39% (2,151 lines)
controlplaneapi/runtime32% (1,521 lines)
frontend/src13% (1,049 lines)
dataplaneapi/runtime12% (219 lines)
dataplaneapi/infrastructure36% (168 lines)
lib/MediaReplayEnginePluginHelper26% (155 lines)
lib/MediaReplayEngineWorkflowHelper38% (101 lines)
frontend/cdk0% (0 lines)
frontend/public0% (0 lines)
frontend0% (0 lines)

Duplication Between Components (50+ lines)

G controlplaneapi/infrastructure controlplaneapi/infrastructure dataplaneapi/infrastructure dataplaneapi/infrastructure controlplaneapi/infrastructure--dataplaneapi/infrastructure 352 controlplaneapi/runtime controlplaneapi/runtime controlplaneapi/infrastructure--controlplaneapi/runtime 84 dataplaneapi/runtime dataplaneapi/runtime controlplaneapi/runtime--dataplaneapi/runtime 165 lib/MediaReplayEnginePluginHelper lib/MediaReplayEnginePluginHelper lib/MediaReplayEngineWorkflowHelper lib/MediaReplayEngineWorkflowHelper lib/MediaReplayEnginePluginHelper--lib/MediaReplayEngineWorkflowHelper 114

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 950 duplicates...
Size#FoldersFilesLinesCode
81 x 2 source/controlplaneapi/i...mbda/EventClipGenerator
source/controlplaneapi/i...mbda/EventClipGenerator
mre-event-clip-generator.py
mre-event-clip-generator.py
410:513 (12%)
541:660 (12%)
view
69 x 2 source/controlplaneapi/i...re/lambda/Replay/shared
source/controlplaneapi/i...re/lambda/Replay/shared
HlsGenerator.py
Mp4Generator.py
155:253 (31%)
150:248 (33%)
view
58 x 2 source/controlplaneapi/i...da/MreDataExport/shared
source/controlplaneapi/i...da/MreDataExport/shared
es_EventDataExporter.py
es_ReplayDataExporter.py
186:264 (30%)
270:348 (22%)
view
37 x 2 source/controlplaneapi/runtime/chalicelib
source/controlplaneapi/runtime/chalicelib
__init__.py
__init__.py
378:414 (5%)
420:456 (5%)
view
30 x 2 source/controlplaneapi/i...da/MreDataExport/shared
source/controlplaneapi/i...da/MreDataExport/shared
MreReplayDataExporter.py
es_ReplayDataExporter.py
59:97 (33%)
44:82 (11%)
view
29 x 2 source/controlplaneapi/i...re/lambda/Replay/shared
source/controlplaneapi/i...re/lambda/Replay/shared
HlsGenerator.py
Mp4Generator.py
24:66 (13%)
24:66 (14%)
view
27 x 2 source/controlplaneapi/i...da/MreDataExport/shared
source/controlplaneapi/i...da/MreDataExport/shared
MreReplayDataExporter.py
es_ReplayDataExporter.py
64:97 (30%)
235:268 (10%)
view
27 x 2 source/controlplaneapi/i...da/MreDataExport/shared
source/controlplaneapi/i...da/MreDataExport/shared
es_ReplayDataExporter.py
es_ReplayDataExporter.py
49:82 (10%)
235:268 (10%)
view
26 x 2 source/controlplaneapi/i...da/MreDataExport/shared
source/controlplaneapi/i...da/MreDataExport/shared
es_EventDataExporter.py
es_ReplayDataExporter.py
112:141 (13%)
155:184 (10%)
view
26 x 2 source/controlplaneapi/runtime/chalicelib
source/controlplaneapi/runtime/chalicelib
__init__.py
__init__.py
24:49 (3%)
63:88 (3%)
view
25 x 2 source/controlplaneapi/i...mbda/EventClipGenerator
source/controlplaneapi/i...mbda/EventClipGenerator
mre-event-clip-generator.py
mre-event-clip-generator.py
431:459 (3%)
618:644 (3%)
view
25 x 2 source/controlplaneapi/i...mbda/EventClipGenerator
source/controlplaneapi/i...mbda/EventClipGenerator
mre-event-clip-generator.py
mre-event-clip-generator.py
483:509 (3%)
567:594 (3%)
view
25 x 2 source/controlplaneapi/i...mbda/EventClipGenerator
source/controlplaneapi/i...mbda/EventClipGenerator
mre-event-clip-generator.py
mre-event-clip-generator.py
431:459 (3%)
483:509 (3%)
view
25 x 2 source/controlplaneapi/i...mbda/EventClipGenerator
source/controlplaneapi/i...mbda/EventClipGenerator
mre-event-clip-generator.py
mre-event-clip-generator.py
567:594 (3%)
618:644 (3%)
view
24 x 2 source/frontend/src/components/ContentGroup
source/frontend/src/components/Programs
ContentGroupCreateModal.js
ProgramCreateModal.js
54:83 (25%)
54:82 (25%)
view
23 x 2 source/controlplaneapi/i...da/MreDataExport/shared
source/controlplaneapi/i...da/MreDataExport/shared
es_EventDataExporter.py
es_ReplayDataExporter.py
157:181 (12%)
200:224 (8%)
view
23 x 2 source/controlplaneapi/i...da/MreDataExport/shared
source/controlplaneapi/i...da/MreDataExport/shared
es_EventDataExporter.py
es_ReplayDataExporter.py
79:106 (12%)
118:145 (8%)
view
22 x 2 source/controlplaneapi/i...re/lambda/Replay/shared
source/controlplaneapi/i...re/lambda/Replay/shared
HlsGenerator.py
Mp4Generator.py
290:324 (10%)
276:311 (10%)
view
21 x 2 source/controlplaneapi/runtime
source/controlplaneapi/runtime
app.py
app.py
1494:1516 (<1%)
3782:3804 (<1%)
view
21 x 2 source/controlplaneapi/runtime
source/controlplaneapi/runtime
app.py
app.py
1423:1445 (<1%)
3708:3730 (<1%)
view
Duplicated Units
The list of top 15 duplicated units.
See data for all 15 unit duplicates...
Size#FoldersFilesLinesCode
81 x 2 source/controlplaneapi/i...re/lambda/Replay/shared
source/controlplaneapi/i...re/lambda/Replay/shared
Mp4Generator.py
HlsGenerator.py
0:0 
0:0 
view
30 x 2 source/controlplaneapi/i...da/MreDataExport/shared
source/controlplaneapi/i...da/MreDataExport/shared
es_ReplayDataExporter.py
MreReplayDataExporter.py
0:0 
0:0 
view
19 x 2 source/controlplaneapi/i...re/lambda/Replay/shared
source/controlplaneapi/i...re/lambda/Replay/shared
Mp4Generator.py
HlsGenerator.py
0:0 
0:0 
view
17 x 2 source/controlplaneapi/i...da/MreDataExport/shared
source/controlplaneapi/i...da/MreDataExport/shared
es_EventDataExporter.py
es_ReplayDataExporter.py
0:0 
0:0 
view
17 x 2 source/controlplaneapi/i...da/MreDataExport/shared
source/controlplaneapi/i...da/MreDataExport/shared
es_EventDataExporter.py
es_ReplayDataExporter.py
0:0 
0:0 
view
17 x 2 source/controlplaneapi/i...da/MreDataExport/shared
source/controlplaneapi/i...da/MreDataExport/shared
es_EventDataExporter.py
es_ReplayDataExporter.py
0:0 
0:0 
view
13 x 2 source/controlplaneapi/runtime
source/dataplaneapi/runtime
app.py
app.py
0:0 
0:0 
view
10 x 2 source/controlplaneapi/i...da/MreDataExport/shared
source/controlplaneapi/i...da/MreDataExport/shared
es_EventDataExporter.py
es_ReplayDataExporter.py
0:0 
0:0 
view
10 x 2 source/controlplaneapi/i...re/lambda/Replay/shared
source/controlplaneapi/i...re/lambda/Replay/shared
Mp4Generator.py
HlsGenerator.py
0:0 
0:0 
view
9 x 2 source/controlplaneapi/runtime/chalicelib
source/dataplaneapi/runtime/chalicelib
__init__.py
__init__.py
0:0 
0:0 
view
9 x 2 source/controlplaneapi/i...da/MreDataExport/shared
source/controlplaneapi/i...da/MreDataExport/shared
es_EventDataExporter.py
es_ReplayDataExporter.py
0:0 
0:0 
view
8 x 3 source/controlplaneapi/runtime/chalicelib
source/controlplaneapi/i...e/lambda/EventScheduler
source/dataplaneapi/runtime/chalicelib
__init__.py
mre_event_scheduler.py
__init__.py
0:0 
0:0 
0:0 
view
7 x 2 source/controlplaneapi/i...da/MreDataExport/shared
source/controlplaneapi/i...da/MreDataExport/shared
es_EventDataExporter.py
MreEventDataExporter.py
0:0 
0:0 
view
7 x 2 source/controlplaneapi/i...structure/lambda/Replay
source/controlplaneapi/i...entHlsManifestGenerator
replay_lambda.py
event_hls_manifest_gen.py
0:0 
0:0 
view
7 x 2 source/lib/MediaReplayEn...eplayEnginePluginHelper
source/lib/MediaReplayEn...layEngineWorkflowHelper
__init__.py
__init__.py
0:0 
0:0 
view