microsoft / tiny-calc
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
  • 7% duplication:
    • 8,899 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 670 duplicated lines
  • 104 duplicates
system7% (670 lines)
Duplication per Extension
ts6% (350 lines)
yaml8% (278 lines)
js9% (42 lines)
Duplication per Component (primary)
common/config/rush8% (278 lines)
packages/core/micro6% (176 lines)
experimental/tree/bench100% (56 lines)
packages/common/datastructures13% (45 lines)
common/scripts11% (42 lines)
experimental/graph/bench64% (37 lines)
packages/core/nano1% (24 lines)
experimental/tree/src5% (12 lines)
experimental/graph/src0% (0 lines)
experimental/int63/bench0% (0 lines)
experimental/int630% (0 lines)
packages/common/binary0% (0 lines)
packages/common/config0% (0 lines)
packages/common/scheduler0% (0 lines)
packages/types/es0% (0 lines)
packages/types/type-utils0% (0 lines)
packages/types/types0% (0 lines)

Duplication Between Components (50+ lines)

G experimental/tree/bench experimental/tree/bench packages/core/micro packages/core/micro experimental/tree/bench--packages/core/micro 112 experimental/graph/bench experimental/graph/bench experimental/graph/bench--experimental/tree/bench 74 experimental/graph/bench--packages/core/micro 74

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 104 duplicates...
Size#FoldersFilesLinesCode
23 x 2 experimental/graph/bench/json
experimental/tree/bench/matrix
parse.ts
index.ts
4:34 (100%)
4:34 (100%)
view
23 x 2 experimental/tree/bench/matrix
packages/core/micro/bench/matrix
index.ts
index.ts
4:34 (100%)
5:35 (100%)
view
23 x 2 experimental/graph/bench/json
packages/core/micro/bench/matrix
parse.ts
index.ts
4:34 (100%)
5:35 (100%)
view
21 x 2 common/scripts
common/scripts
install-run-rush.js
install-run.js
1:23 (35%)
1:23 (7%)
view
14 x 2 experimental/tree/bench
packages/core/micro/bench
index.ts
index.ts
3:18 (100%)
3:18 (100%)
view
14 x 2 packages/core/micro/src
packages/core/micro/src
matrix.ts
matrix.ts
48:67 (7%)
73:92 (7%)
view
14 x 2 experimental/graph/bench
experimental/tree/bench
index.ts
index.ts
3:18 (100%)
3:18 (100%)
view
14 x 2 experimental/graph/bench
packages/core/micro/bench
index.ts
index.ts
3:18 (100%)
3:18 (100%)
view
12 x 2 experimental/tree/bench/matrix
packages/core/micro/bench/matrix
rowmajor-256x256-read-baseline.ts
rowmajor-256x256-read-baseline.ts
4:32 (100%)
4:32 (100%)
view
11 x 2 common/config/rush
common/config/rush
pnpm-lock.yaml
pnpm-lock.yaml
2836:2846 (<1%)
3040:3050 (<1%)
view
11 x 2 common/config/rush
common/config/rush
pnpm-lock.yaml
pnpm-lock.yaml
2880:2890 (<1%)
2965:2975 (<1%)
view
11 x 2 common/config/rush
common/config/rush
pnpm-lock.yaml
pnpm-lock.yaml
2965:2975 (<1%)
3016:3026 (<1%)
view
11 x 2 common/config/rush
common/config/rush
pnpm-lock.yaml
pnpm-lock.yaml
2948:2958 (<1%)
3016:3026 (<1%)
view
11 x 2 common/config/rush
common/config/rush
pnpm-lock.yaml
pnpm-lock.yaml
2880:2890 (<1%)
2931:2941 (<1%)
view
11 x 2 common/config/rush
common/config/rush
pnpm-lock.yaml
pnpm-lock.yaml
2880:2890 (<1%)
2948:2958 (<1%)
view
11 x 2 common/config/rush
common/config/rush
pnpm-lock.yaml
pnpm-lock.yaml
2880:2890 (<1%)
2914:2924 (<1%)
view
11 x 2 common/config/rush
common/config/rush
pnpm-lock.yaml
pnpm-lock.yaml
2965:2975 (<1%)
3040:3050 (<1%)
view
11 x 2 common/config/rush
common/config/rush
pnpm-lock.yaml
pnpm-lock.yaml
2819:2829 (<1%)
3016:3026 (<1%)
view
11 x 2 common/config/rush
common/config/rush
pnpm-lock.yaml
pnpm-lock.yaml
2931:2941 (<1%)
2965:2975 (<1%)
view
11 x 2 common/config/rush
common/config/rush
pnpm-lock.yaml
pnpm-lock.yaml
2819:2829 (<1%)
3040:3050 (<1%)
view
Duplicated Units
The list of top 3 duplicated units.
See data for all 3 unit duplicates...
Size#FoldersFilesLinesCode
16 x 3 experimental/graph/bench/json
experimental/tree/bench/matrix
packages/core/micro/bench/matrix
parse.ts
index.ts
index.ts
20:37 
20:37 
21:38 
view
11 x 3 experimental/graph/bench/json
experimental/tree/bench/matrix
packages/core/micro/bench/matrix
parse.ts
index.ts
index.ts
4:18 
4:18 
5:19 
view
8 x 2 packages/common/datastru...s/frugallist/bench/impl
packages/common/datastru...s/frugallist/bench/impl
twofield.ts
twofield.ts
13:21 
23:31 
view