microsoft / cognitive-services-speech-sdk-js
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
  • 12% duplication:
    • 13,846 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,690 duplicated lines
  • 238 duplicates
system12% (1,690 lines)
Duplication per Extension
ts12% (1,627 lines)
js24% (45 lines)
cmd19% (18 lines)
Duplication per Component (primary)
src/common.speech15% (633 lines)
src/sdk/Audio21% (301 lines)
src/sdk10% (298 lines)
src/sdk/Transcription12% (156 lines)
src/common.speech/Transcription9% (125 lines)
src/common.browser7% (98 lines)
ROOT24% (54 lines)
src/common1% (16 lines)
src/audioworklet81% (9 lines)
ci0% (0 lines)
src/common.speech/ServiceMessages0% (0 lines)

Duplication Between Components (50+ lines)

G src/common.speech/Transcription src/common.speech/Transcription src/sdk src/sdk src/common.speech/Transcription--src/sdk 111 src/common.speech src/common.speech src/common.speech/Transcription--src/common.speech 80 src/sdk/Transcription src/sdk/Transcription src/sdk--src/sdk/Transcription 58

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 238 duplicates...
Size#FoldersFilesLinesCode
25 x 2 src/common.speech
src/common.speech
SpeechServiceRecognizer.ts
TranscriptionServiceRecognizer.ts
97:129 (14%)
94:126 (13%)
view
22 x 2 src/common.speech
src/common.speech
SpeechServiceRecognizer.ts
TranscriptionServiceRecognizer.ts
159:198 (13%)
156:195 (11%)
view
18 x 2 src/common.speech
src/common.speech
SpeechServiceRecognizer.ts
TranscriptionServiceRecognizer.ts
210:230 (10%)
207:227 (9%)
view
18 x 2 src/common.speech
src/common.speech
IntentServiceRecognizer.ts
TranscriptionServiceRecognizer.ts
233:261 (9%)
166:195 (9%)
view
18 x 2 src/common.speech
src/common.speech
SpeechServiceRecognizer.ts
TranscriptionServiceRecognizer.ts
63:83 (10%)
60:80 (9%)
view
18 x 2 src/common.speech
src/common.speech
IntentServiceRecognizer.ts
SpeechServiceRecognizer.ts
233:261 (9%)
169:198 (10%)
view
17 x 2 src/common.browser
src/common.browser
FileAudioSource.ts
MicAudioSource.ts
8:25 (11%)
8:25 (6%)
view
17 x 2 src/common.speech/Transcription
src/sdk
TranscriberRecognizer.ts
SpeechRecognizer.ts
176:200 (13%)
269:293 (18%)
view
16 x 2 src/common.speech
src/common.speech
DialogServiceAdapter.ts
SpeechServiceRecognizer.ts
173:191 (3%)
73:91 (9%)
view
16 x 2 src/common.speech
src/common.speech
ServiceRecognizerBase.ts
SynthesisAdapterBase.ts
596:614 (3%)
558:575 (3%)
view
15 x 2 src/common.speech
src/common.speech
DialogServiceAdapter.ts
ServiceRecognizerBase.ts
413:440 (3%)
421:440 (2%)
view
14 x 2 src/common.speech
src/common.speech
ServiceRecognizerBase.ts
SynthesisAdapterBase.ts
530:544 (2%)
483:497 (3%)
view
14 x 2 src/common.speech
src/common.speech
DialogServiceAdapter.ts
SpeechServiceRecognizer.ts
303:317 (3%)
216:230 (8%)
view
14 x 2 src/sdk/Audio
src/sdk/Audio
AudioInputStream.ts
AudioInputStream.ts
232:253 (5%)
425:446 (5%)
view
14 x 2 src/common.speech
src/common.speech
DialogServiceAdapter.ts
TranscriptionServiceRecognizer.ts
303:317 (3%)
213:227 (7%)
view
13 x 2 src/common.speech
src/common.speech
IntentServiceRecognizer.ts
TranslationServiceRecognizer.ts
244:261 (6%)
239:256 (5%)
view
13 x 2 src/common.speech
src/common.speech
SpeechServiceRecognizer.ts
TranslationServiceRecognizer.ts
181:198 (7%)
239:256 (5%)
view
13 x 2 src/common.speech
src/common.speech
TranscriptionServiceRecognizer.ts
TranslationServiceRecognizer.ts
178:195 (6%)
239:256 (5%)
view
12 x 2 src/common.speech
src/common.speech
IntentServiceRecognizer.ts
SpeechServiceRecognizer.ts
283:295 (6%)
218:230 (7%)
view
12 x 2 ROOT
ROOT
gulpfile.js
gulpfile.js
19:30 (12%)
40:51 (12%)
view
Duplicated Units
The list of top 7 duplicated units.
See data for all 7 unit duplicates...
Size#FoldersFilesLinesCode
19 x 2 src/common.speech
src/common.speech
ServiceRecognizerBase.ts
SynthesisAdapterBase.ts
595:615 
557:576 
view
14 x 2 src/sdk
src/sdk
SpeakerRecognizer.ts
VoiceProfileClient.ts
121:139 
218:236 
view
11 x 2 src/sdk/Transcription
src/sdk/Transcription
Conversation.ts
ConversationCommon.ts
1019:1030 
19:30 
view
10 x 2 src/sdk/Audio
src/sdk/Audio
AudioInputStream.ts
AudioInputStream.ts
248:258 
441:451 
view
9 x 2 src/common.speech/Transcription
src/sdk
TranscriberRecognizer.ts
SpeechRecognizer.ts
176:187 
269:280 
view
9 x 2 src/sdk/Transcription
src/sdk/Transcription
Conversation.ts
ConversationCommon.ts
1032:1042 
32:42 
view
8 x 2 src/audioworklet
src/common.browser
speech-processor.js
PCMRecorder.ts
11:19 
28:36 
view