microsoft / powerquery-parser
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
  • 4% duplication:
    • 12,873 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 619 duplicated lines
  • 73 duplicates
system4% (619 lines)
Duplication per Extension
ts4% (619 lines)
Duplication per Component (primary)
src/powerquery-parser/language5% (252 lines)
src/powerquery-parser/parser4% (228 lines)
src/powerquery-parser/lexer7% (101 lines)
src/powerquery-parser/common2% (22 lines)
src/powerquery-parser/task7% (16 lines)
scripts0% (0 lines)
src0% (0 lines)
src/powerquery-parser0% (0 lines)
src/powerquery-parser/localization0% (0 lines)
src/powerquery-parser/settings0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 73 duplicates...
Size#FoldersFilesLinesCode
15 x 2 src/powerquery-parser/parser/parsers
src/powerquery-parser/parser/parsers
naive.ts
naive.ts
1643:1661 (<1%)
1669:1687 (<1%)
view
11 x 2 src/powerquery-parser/language/type/typeUtils
src/powerquery-parser/language/type/typeUtils
categorize.ts
categorize.ts
377:391 (1%)
458:472 (1%)
view
11 x 2 src/powerquery-parser/language/constant
src/powerquery-parser/language/constant
constantUtils.ts
constantUtils.ts
21:31 (6%)
83:94 (6%)
view
10 x 2 src/powerquery-parser/language/constant
src/powerquery-parser/language/keyword
constant.ts
keyword.ts
36:45 (5%)
6:15 (11%)
view
10 x 2 src/powerquery-parser/language/keyword
src/powerquery-parser/language/keyword
keyword.ts
keyword.ts
56:65 (11%)
79:88 (11%)
view
9 x 2 src/powerquery-parser/parser/parsers
src/powerquery-parser/parser/parsers
naive.ts
naive.ts
2625:2636 (<1%)
2689:2700 (<1%)
view
9 x 2 src/powerquery-parser/language/type/typeUtils
src/powerquery-parser/language/type/typeUtils
isCompatible.ts
isCompatible.ts
163:172 (2%)
277:286 (2%)
view
9 x 2 src/powerquery-parser/lexer
src/powerquery-parser/lexer
lexerSnapshot.ts
lexerSnapshot.ts
238:246 (2%)
280:288 (2%)
view
9 x 2 src/powerquery-parser/language/type/typeUtils
src/powerquery-parser/language/type/typeUtils
isType.ts
typeUtils.ts
172:180 (7%)
50:58 (6%)
view
9 x 2 src/powerquery-parser/language/ast/astUtils
src/powerquery-parser/language/ast/astUtils
assert.ts
assert.ts
242:250 (3%)
504:512 (3%)
view
9 x 2 src/powerquery-parser/lexer
src/powerquery-parser/lexer
lexerSnapshot.ts
lexerSnapshot.ts
259:268 (2%)
301:310 (2%)
view
9 x 2 src/powerquery-parser/parser/parsers
src/powerquery-parser/parser/parsers
combinatorialParser.ts
naive.ts
325:333 (4%)
830:838 (<1%)
view
8 x 2 src/powerquery-parser/language/type/typeUtils
src/powerquery-parser/language/type/typeUtils
categorize.ts
categorize.ts
357:368 (1%)
461:472 (1%)
view
8 x 2 src/powerquery-parser/language/type/typeUtils
src/powerquery-parser/language/type/typeUtils
categorize.ts
categorize.ts
415:426 (1%)
526:537 (1%)
view
8 x 2 src/powerquery-parser/language/type/typeUtils
src/powerquery-parser/language/type/typeUtils
categorize.ts
categorize.ts
461:472 (1%)
526:537 (1%)
view
8 x 2 src/powerquery-parser/parser/parsers
src/powerquery-parser/parser/parsers
naive.ts
naive.ts
1269:1276 (<1%)
2210:2217 (<1%)
view
8 x 2 src/powerquery-parser/language/type/typeUtils
src/powerquery-parser/language/type/typeUtils
categorize.ts
categorize.ts
327:338 (1%)
526:537 (1%)
view
8 x 2 src/powerquery-parser/common
src/powerquery-parser/common
traversal.ts
traversal.ts
56:63 (5%)
77:84 (5%)
view
8 x 2 src/powerquery-parser/language/type/typeUtils
src/powerquery-parser/language/type/typeUtils
categorize.ts
categorize.ts
327:338 (1%)
357:368 (1%)
view
8 x 2 src/powerquery-parser/language/type/typeUtils
src/powerquery-parser/language/type/typeUtils
categorize.ts
categorize.ts
304:315 (1%)
327:338 (1%)
view
Duplicated Units
The list of top 1 duplicated units.
See data for all 1 unit duplicate
Size#FoldersFilesLinesCode
6 x 2 src/powerquery-parser/language/type/typeUtils
src/powerquery-parser/language/type/typeUtils
isEqualType.ts
isEqualType.ts
167:173 
175:181 
view