firebase / firebase-admin-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
  • 4% duplication:
    • 10,816 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 502 duplicated lines
  • 51 duplicates
system4% (502 lines)
Duplication per Extension
ts4% (488 lines)
js5% (14 lines)
Duplication per Component (primary)
src/auth3% (131 lines)
src/project-management16% (85 lines)
src/remote-config10% (61 lines)
src/machine-learning10% (55 lines)
src/security-rules14% (55 lines)
src/messaging2% (40 lines)
src/utils1% (28 lines)
src/app-check5% (19 lines)
src/app2% (14 lines)
ROOT4% (7 lines)
docgen6% (7 lines)
src0% (0 lines)
src/firestore0% (0 lines)
src/storage0% (0 lines)
src/credential0% (0 lines)
src/installations0% (0 lines)
src/database0% (0 lines)
src/instance-id0% (0 lines)

Duplication Between Components (50+ lines)

G src/machine-learning src/machine-learning src/security-rules src/security-rules src/machine-learning--src/security-rules 110

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 51 duplicates...
Size#FoldersFilesLinesCode
14 x 2 src/auth
src/auth
auth-config.ts
auth-config.ts
393:406 (2%)
415:428 (2%)
view
14 x 2 src/machine-learning
src/security-rules
machine-learning-api-client.ts
security-rules-api-client-internal.ts
368:385 (4%)
250:267 (7%)
view
14 x 2 src/project-management
src/project-management
android-app.ts
ios-app.ts
186:201 (14%)
115:130 (26%)
view
13 x 2 src/auth
src/auth
auth-api-request.ts
auth-api-request.ts
902:918 (1%)
985:1001 (1%)
view
11 x 2 src/remote-config
src/remote-config
remote-config-api-client-internal.ts
remote-config-api-client-internal.ts
82:92 (3%)
134:144 (3%)
view
9 x 2 src/remote-config
src/remote-config
remote-config-api-client-internal.ts
remote-config-api-client-internal.ts
64:72 (3%)
136:144 (3%)
view
9 x 2 src/remote-config
src/remote-config
remote-config-api-client-internal.ts
remote-config-api-client-internal.ts
64:72 (3%)
84:92 (3%)
view
8 x 2 src/messaging
src/messaging
messaging-internal.ts
messaging-internal.ts
175:184 (2%)
570:579 (2%)
view
8 x 2 src/machine-learning
src/security-rules
machine-learning-utils.ts
security-rules-internal.ts
20:27 (20%)
20:27 (61%)
view
7 x 2 src/app-check
src/project-management
app-check-api-client-internal.ts
project-management.ts
98:107 (5%)
231:242 (4%)
view
7 x 2 src/auth
src/auth
user-import-builder.ts
user-import-builder.ts
606:613 (1%)
622:629 (1%)
view
7 x 2 src/machine-learning
src/remote-config
machine-learning-api-client.ts
remote-config-api-client-internal.ts
404:414 (2%)
195:205 (2%)
view
7 x 2 src/app
src/app
credential-internal.ts
credential-internal.ts
99:105 (2%)
280:286 (2%)
view
7 x 2 src/machine-learning
src/security-rules
machine-learning-api-client.ts
security-rules-api-client-internal.ts
416:424 (2%)
197:205 (3%)
view
7 x 2 src/project-management
src/project-management
android-app.ts
ios-app.ts
49:59 (7%)
46:56 (13%)
view
7 x 2 src/app-check
src/auth
app-check-api-client-internal.ts
auth-api-request.ts
98:107 (5%)
162:172 (<1%)
view
7 x 2 docgen
ROOT
post-process.js
generate-esm-wrapper.js
174:181 (6%)
75:82 (15%)
view
7 x 2 src/machine-learning
src/security-rules
machine-learning-api-client.ts
security-rules-api-client-internal.ts
404:414 (2%)
185:195 (3%)
view
7 x 2 src/auth
src/project-management
auth-api-request.ts
project-management.ts
162:172 (<1%)
231:242 (4%)
view
7 x 2 src/utils
src/utils
jwt.ts
jwt.ts
67:78 (3%)
116:132 (3%)
view
Duplicated Units
The list of top 3 duplicated units.
See data for all 3 unit duplicates...
Size#FoldersFilesLinesCode
14 x 2 src/project-management
src/project-management
android-app.ts
ios-app.ts
186:202 
115:131 
view
11 x 2 src/messaging
src/messaging
messaging-internal.ts
messaging-internal.ts
174:186 
569:581 
view
9 x 2 src/machine-learning
src/security-rules
machine-learning-api-client.ts
security-rules-api-client-internal.ts
368:377 
250:259 
view