microsoft / lsif-node
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
  • 8% duplication:
    • 9,411 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 781 duplicated lines
  • 59 duplicates
system8% (781 lines)
Duplication per Extension
ts7% (719 lines)
yml54% (62 lines)
Duplication per Component (primary)
tsc/src/common17% (213 lines)
sqlite/src6% (129 lines)
npm/src24% (101 lines)
tsc/src2% (95 lines)
npm/src/common98% (63 lines)
tsc/src/emitters10% (36 lines)
tooling/src8% (26 lines)
protocol/src2% (26 lines)
build/azure-pipelines/win3284% (21 lines)
build/azure-pipelines/linux95% (20 lines)
tsc/src/npm14% (20 lines)
build/azure-pipelines/index61% (11 lines)
build/azure-pipelines38% (10 lines)
lsif/src14% (10 lines)
ROOT0% (0 lines)

Duplication Between Components (50+ lines)

G npm/src/common npm/src/common tsc/src/common tsc/src/common npm/src/common--tsc/src/common 116 sqlite/src sqlite/src npm/src/common--sqlite/src 72 sqlite/src--tsc/src/common 62 npm/src npm/src npm/src--tsc/src/common 66 npm/src--sqlite/src 56

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 59 duplicates...
Size#FoldersFilesLinesCode
36 x 2 npm/src/common
sqlite/src
writer.ts
compressStore.ts
8:71 (97%)
11:74 (81%)
view
33 x 2 npm/src
tsc/src/common
paths.ts
paths.ts
7:59 (100%)
7:59 (100%)
view
27 x 2 npm/src/common
tsc/src/common
moniker.ts
moniker.ts
5:58 (100%)
5:58 (100%)
view
23 x 2 tsc/src/common
tsc/src/common
linkedMap.ts
linkedMap.ts
102:135 (5%)
412:445 (5%)
view
14 x 2 sqlite/src
tsc/src/common
compressStore.ts
writer.ts
48:69 (31%)
74:95 (17%)
view
14 x 2 npm/src/common
tsc/src/common
writer.ts
writer.ts
45:66 (37%)
74:95 (17%)
view
14 x 2 tsc/src
tsc/src
args.ts
typings.ts
176:197 (6%)
33:54 (10%)
view
14 x 2 npm/src
sqlite/src
args.ts
args.ts
32:47 (25%)
39:54 (17%)
view
13 x 2 npm/src
tooling/src
args.ts
args.ts
33:47 (23%)
24:38 (38%)
view
13 x 2 sqlite/src
tooling/src
args.ts
args.ts
40:54 (16%)
24:38 (38%)
view
12 x 2 tooling/src
tsc/src
args.ts
args.ts
27:38 (35%)
200:211 (5%)
view
12 x 2 npm/src
tsc/src
args.ts
args.ts
36:47 (21%)
200:211 (5%)
view
12 x 2 npm/src
tsc/src/npm
package.ts
package.ts
22:39 (27%)
22:39 (25%)
view
12 x 2 sqlite/src
tsc/src
args.ts
args.ts
43:54 (15%)
200:211 (5%)
view
11 x 2 npm/src/common
tsc/src/common
writer.ts
writer.ts
18:36 (29%)
24:42 (13%)
view
11 x 2 build/azure-pipelines/index
build/azure-pipelines/win32
build.yml
build.yml
1:13 (61%)
1:13 (44%)
view
11 x 2 sqlite/src
tsc/src/common
compressStore.ts
writer.ts
21:39 (25%)
24:42 (13%)
view
10 x 2 build/azure-pipelines/linux
build/azure-pipelines/win32
build.yml
build.yml
1:12 (47%)
1:12 (40%)
view
10 x 2 build/azure-pipelines/index
build/azure-pipelines/linux
build.yml
build.yml
1:12 (55%)
1:12 (47%)
view
10 x 2 lsif/src
sqlite/src
main.ts
args.ts
64:73 (14%)
45:54 (12%)
view
Duplicated Units
The list of top 9 duplicated units.
See data for all 9 unit duplicates...
Size#FoldersFilesLinesCode
31 x 2 tsc/src/common
tsc/src/common
linkedMap.ts
linkedMap.ts
101:136 
411:446 
view
17 x 2 tsc/src
tsc/src
args.ts
typings.ts
176:198 
33:55 
view
14 x 2 npm/src
tsc/src/common
paths.ts
paths.ts
40:56 
40:56 
view
11 x 2 npm/src
tsc/src/npm
package.ts
package.ts
22:33 
22:33 
view
11 x 2 sqlite/src
sqlite/src
blobStore.ts
graphStore.ts
555:566 
88:108 
view
9 x 2 npm/src/common
tsc/src/common
moniker.ts
moniker.ts
25:34 
25:34 
view
9 x 3 npm/src
tsc/src/common
tsc/src
paths.ts
paths.ts
typescripts.ts
29:38 
29:38 
48:57 
view
8 x 2 npm/src
tsc/src/common
paths.ts
paths.ts
9:17 
9:17 
view
8 x 2 npm/src
tsc/src/common
paths.ts
paths.ts
19:27 
19:27 
view