microsoft / vscode-pull-request-github
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
  • 10% duplication:
    • 20,963 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 2,252 duplicated lines
  • 276 duplicates
system10% (2,252 lines)
Duplication per Extension
ts10% (1,753 lines)
gql32% (304 lines)
tsx5% (98 lines)
yml55% (71 lines)
js24% (26 lines)
Duplication per Component (primary)
src/github16% (1,353 lines)
src/view8% (313 lines)
src/issues7% (200 lines)
src/common9% (151 lines)
webviews/components5% (74 lines)
ROOT58% (71 lines)
scripts24% (26 lines)
webviews/common2% (12 lines)
webviews/activityBarView6% (12 lines)
webviews/editorWebview1% (12 lines)
src1% (12 lines)
src/api7% (8 lines)
src/gitProviders2% (8 lines)
common0% (0 lines)
scripts/ci0% (0 lines)
src/authentication0% (0 lines)
src/env0% (0 lines)
src/integrations0% (0 lines)
webviews/createPullRequestView0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 276 duplicates...
Size#FoldersFilesLinesCode
62 x 2 src/github
src/github
activityBarViewProvider.ts
pullRequestOverview.ts
317:394 (16%)
656:733 (9%)
view
55 x 2 src/github
src/github
activityBarViewProvider.ts
pullRequestOverview.ts
240:304 (14%)
788:852 (8%)
view
29 x 2 src/github
src/github
queries.gql
queries.gql
393:421 (3%)
427:455 (3%)
view
24 x 2 src/github
src/github
folderRepositoryManager.ts
repositoriesManager.ts
45:82 (1%)
18:55 (17%)
view
23 x 2 ROOT
ROOT
azure-pipeline.nightly.yml
azure-pipeline.release.yml
23:50 (46%)
21:48 (57%)
view
21 x 2 src/github
src/github
utils.ts
utils.ts
499:519 (2%)
573:593 (2%)
view
20 x 2 src/github
src/github
queries.gql
queries.gql
644:663 (2%)
668:687 (2%)
view
19 x 2 src/github
src/github
queries.gql
queries.gql
289:307 (2%)
395:413 (2%)
view
19 x 2 src/github
src/github
queries.gql
queries.gql
289:307 (2%)
429:447 (2%)
view
17 x 2 src/github
src/github
activityBarViewProvider.ts
pullRequestOverview.ts
179:195 (4%)
206:222 (2%)
view
16 x 2 src/github
src/github
folderRepositoryManager.ts
repositoriesManager.ts
2049:2067 (1%)
198:216 (11%)
view
14 x 2 src/github
src/github
graphql.ts
graphql.ts
222:235 (2%)
241:254 (2%)
view
14 x 2 src/github
src/github
activityBarViewProvider.ts
pullRequestOverview.ts
456:472 (3%)
628:644 (2%)
view
13 x 2 src/view
src/view
pullRequestCommentController.ts
reviewCommentController.ts
391:406 (3%)
606:621 (2%)
view
13 x 2 scripts
scripts
preprocess-gql.js
preprocess-svg.js
16:31 (40%)
20:35 (23%)
view
13 x 2 src/issues
src/view/treeNodes
issueFeatureRegistrar.ts
categoryNode.ts
589:603 (1%)
145:159 (6%)
view
13 x 2 src/github
src/github
activityBarViewProvider.ts
pullRequestOverview.ts
30:45 (3%)
103:118 (1%)
view
13 x 2 src/common
src/common
utils.ts
utils.ts
441:460 (2%)
489:508 (2%)
view
12 x 2 src/view/treeNodes
src/view/treeNodes
fileChangeNode.ts
fileChangeNode.ts
123:136 (3%)
262:275 (3%)
view
12 x 2 src/common
src/common
utils.ts
utils.ts
691:705 (2%)
803:817 (2%)
view
Duplicated Units
The list of top 10 duplicated units.
See data for all 10 unit duplicates...
Size#FoldersFilesLinesCode
15 x 2 src/github
src/github
activityBarViewProvider.ts
pullRequestOverview.ts
256:273 
804:821 
view
15 x 2 src/github
src/github
folderRepositoryManager.ts
repositoriesManager.ts
2054:2069 
203:218 
view
14 x 2 src/github
src/github
activityBarViewProvider.ts
pullRequestOverview.ts
240:254 
788:802 
view
14 x 2 src/github
src/github
activityBarViewProvider.ts
pullRequestOverview.ts
275:289 
823:837 
view
14 x 2 src/github
src/github
activityBarViewProvider.ts
pullRequestOverview.ts
291:305 
839:853 
view
13 x 2 src/view/treeNodes
src/view/treeNodes
fileChangeNode.ts
fileChangeNode.ts
123:137 
262:276 
view
11 x 2 src/github
src/github
activityBarViewProvider.ts
pullRequestOverview.ts
428:440 
765:777 
view
7 x 2 src/github
src/github
folderRepositoryManager.ts
repositoriesManager.ts
76:83 
49:56 
view
6 x 2 src/github
src/github
activityBarViewProvider.ts
issueOverview.ts
232:238 
350:356 
view
6 x 2 webviews/common
webviews/common
context.tsx
createContext.ts
16:22 
23:29 
view