flowtype / flow-for-vscode
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
  • 3% duplication:
    • 1,999 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 78 duplicated lines
  • 6 duplicates
system3% (78 lines)
Duplication per Extension
js3% (78 lines)
Duplication per Component (primary)
lib/FlowLanguageClient6% (44 lines)
lib5% (14 lines)
lib/utils/LanguageClient/TypeCoverageFeature3% (10 lines)
lib/utils/LanguageClient/StatusFeature3% (10 lines)
playground0% (0 lines)
ROOT0% (0 lines)
lib/utils0% (0 lines)
lib/utils/LanguageClient0% (0 lines)
lib/common0% (0 lines)
Longest Duplicates
The list of 6 longest duplicates.
See data for all 6 duplicates...
Size#FoldersFilesLinesCode
13 x 2 lib/FlowLanguageClient
lib/FlowLanguageClient
FlowLanguageClient.js
FlowLanguageClient.js
225:239 (5%)
251:265 (5%)
view
10 x 2 lib/utils/LanguageClient/StatusFeature
lib/utils/LanguageClient/TypeCoverageFeature
StatusProvider.js
TypeCoverageProvider.js
43:53 (13%)
43:54 (13%)
view
7 x 2 lib
lib
index.js
index.js
25:31 (17%)
54:60 (17%)
view
6 x 2 lib/FlowLanguageClient
lib/FlowLanguageClient
createMiddleware.js
createMiddleware.js
115:121 (4%)
172:178 (4%)
view
6 x 2 lib/FlowLanguageClient
lib/FlowLanguageClient
createMiddleware.js
createMiddleware.js
106:112 (4%)
115:121 (4%)
view
6 x 2 lib/FlowLanguageClient
lib/FlowLanguageClient
createMiddleware.js
createMiddleware.js
106:112 (4%)
172:178 (4%)
view
Duplicated Units
The list of top 2 duplicated units.
See data for all 2 unit duplicates...
Size#FoldersFilesLinesCode
7 x 2 lib/FlowLanguageClient
lib/FlowLanguageClient
createMiddleware.js
createMiddleware.js
105:112 
114:121 
view
6 x 2 lib/FlowLanguageClient
lib/utils/LanguageClient/StatusFeature
StatusBarWidget.js
Status.js
189:195 
30:36 
view