firebase / snippets-ios
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:
    • 4,833 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 424 duplicated lines
  • 54 duplicates
system8% (424 lines)
Duplication per Extension
m11% (270 lines)
swift6% (154 lines)
Duplication per Component (primary)
firestore8% (153 lines)
storage16% (91 lines)
dl-invites-sample10% (64 lines)
mlkit16% (43 lines)
crashlytics13% (20 lines)
functions55% (20 lines)
ml-functions6% (14 lines)
invites2% (7 lines)
inappmessaging8% (6 lines)
appcheck3% (6 lines)
firoptions0% (0 lines)
installations0% (0 lines)
database0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 54 duplicates...
Size#FoldersFilesLinesCode
18 x 2 firestore/swift/firestore-smoketest
firestore/swift/firestore-smoketest
ViewController.swift
ViewController.swift
522:542 (2%)
561:581 (2%)
view
11 x 2 storage/StorageReference
storage/StorageReference
ViewController.m
ViewController.m
313:334 (4%)
511:532 (4%)
view
10 x 2 storage/StorageReferenceSwift
storage/StorageReferenceSwift
ViewController.swift
ViewController.swift
304:321 (4%)
509:526 (4%)
view
10 x 2 firestore/objc/firestore-smoketest-objc
firestore/objc/firestore-smoketest-objc
ViewController.m
ViewController.m
461:471 (1%)
492:502 (1%)
view
9 x 2 storage/StorageReference
storage/StorageReference
ViewController.m
ViewController.m
159:173 (3%)
189:203 (3%)
view
8 x 2 crashlytics/CrashlyticsExample
functions/FunctionsExample
AppDelegate.m
AppDelegate.m
17:34 (100%)
17:34 (100%)
view
8 x 2 crashlytics/CrashlyticsExample
ml-functions/MLFunctionsExample
AppDelegate.m
AppDelegate.m
17:34 (100%)
17:34 (100%)
view
8 x 2 firestore/objc/firestore-smoketest-objc
firestore/objc/firestore-smoketest-objc
ViewController.m
ViewController.m
778:786 (1%)
801:809 (1%)
view
8 x 2 functions/FunctionsExample
ml-functions/MLFunctionsExample
AppDelegate.m
AppDelegate.m
17:34 (100%)
17:34 (100%)
view
7 x 2 firestore/swift/firestore-smoketestUITests
invites/InvitesExampleSwiftUITests
firestore_smoketestUITests.swift
InvitesExampleSwiftUITests.swift
21:39 (87%)
13:31 (87%)
view
7 x 2 dl-invites-sample/InvitesSampleObjC
dl-invites-sample/InvitesSampleObjC
InvitePresenter.m
InvitePresenter.m
82:91 (3%)
190:199 (3%)
view
7 x 2 mlkit/objc-snippets
storage/StorageReference
AppDelegate.m
AppDelegate.m
29:60 (63%)
34:58 (53%)
view
7 x 2 functions/FunctionsExample
storage/StorageReference
AppDelegate.m
AppDelegate.m
17:30 (87%)
20:34 (53%)
view
7 x 2 crashlytics/CrashlyticsExample
storage/StorageReference
AppDelegate.m
AppDelegate.m
17:30 (87%)
20:34 (53%)
view
7 x 2 firestore/objc/firestore-smoketest-objc
firestore/objc/firestore-smoketest-objc
ViewController.m
ViewController.m
732:740 (1%)
747:755 (1%)
view
7 x 2 ml-functions/MLFunctionsExample
storage/StorageReference
AppDelegate.m
AppDelegate.m
17:30 (87%)
20:34 (53%)
view
6 x 2 firestore/objc/firestore-smoketest-objc
firestore/objc/firestore-smoketest-objc
ViewController.m
ViewController.m
130:137 (<1%)
748:755 (<1%)
view
6 x 2 dl-invites-sample/InvitesSampleObjC
dl-invites-sample/InvitesSampleObjC
InvitePresenter.m
InvitePresenter.m
190:196 (3%)
266:272 (3%)
view
6 x 2 ml-functions/MLFunctionsExampleSwift
storage/StorageReferenceSwift
AppDelegate.swift
AppDelegate.swift
20:27 (100%)
23:32 (100%)
view
6 x 2 firestore/objc/firestore-smoketest-objc
firestore/objc/firestore-smoketest-objc
ViewController.m
ViewController.m
130:137 (<1%)
733:740 (<1%)
view