Public report of wikimedia/wikipedia-ios, published 14 November 2026. It has the same score, grades and number of findings as the full report. The details of security findings (where they are in the code, which known vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive report Measured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey → Signed and filed in the standard's public register, 14 November 2026, 22:42 UTC · Survey ID cd_5b2407a99bba4ea7ac30e00a31612f40

wikimedia/wikipedia-ios

Measured 14 November 2026, 22:39 UTC, at code version 0919f3e

CAI score 44out of 100 Weak
CriticalWeakAdequateStrongExemplary
No change since the last survey

The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.

A large codebase: 171,557 lines of product code in 12 projects, tests not counted · Estimated rebuild effort: about 1.3 person-years · Weakest lens: Accessibility, 35

Findings by how serious they are

111 critical 1336 serious 209 minor

13 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.

This survey was produced by

Assert small markCanine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
14 November 2026, 22:39 UTC

A measurement, not a certificate. The Code Assurance Index records a number together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that implements it, and today the Canine Code Analyzer is the only one that does.

The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸

55of 55 dimensions measured by tools.
1632of 1656 findings point to an exact file and line, so you can open each one in the code. The other 24 concern the repository as a whole, such as missing documentation.
55dimensions across 8 lenses, read from 171,557 lines of product code in 12 projects.
Chapters

Executive summary

wikimedia/wikipedia-ios falls short of our standard for production because it has images with no text description and pages that don't say their language. It scores 44 out of 100 and is rated Weak, and 49 of its 111 critical findings are security problems.

Accessibility, at 35, is the weakest lens and counts most in the score. The best first steps are adding text alternatives and structuring the pages, each worth about 7 points. Raising Accessibility to 70 would lift the score to about 52.

Twenty-eight pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Eleven secrets can leak from the build pipeline, and nine passwords or keys are open to anyone who can read the repository. Pinning each tool to an exact version, limiting each secret to its own step and replacing each exposed password or key would close these risks. Passing outside input through environment variables would fix the pipeline step that puts outside input straight into a shell command. Giving each kind of identifier a type of its own would take care of the 40 identifiers passed around as plain numbers or text.

The product code is 171,557 lines, about €190,000 to rebuild.

A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.

How the score is built: what each lens counts for The lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
Accessibility 35 · counts for 45%Security and Compliance 44 · counts for 25%Production Readiness 52 · counts for 14%Code Health 53 · counts for 8%Maturity 70 · counts for 4%Architecture 84 · counts for 2%Performance 85 · counts for 1%Domain Modelling 90 · counts for 1%

If Accessibility rose from 35 to 70, the lowest score rated Strong, the score would rise from 44 to about 52.

Code composition: what the lines of code are
Product code 80%Tests 20%
New since the last survey: 572 findings

These 572 critical or serious findings weren't in the previous survey, on 28 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.

  • Cyclomatic Complexity · WMFYearInReviewDataController.fullSlideCount (cyclomatic 35) WMFData/Sources/WMFData/Data Controllers/Year In Review/WMFYearInReviewDataController.swift
  • Cyclomatic Complexity · WMFYearInReviewDataController.populateYearInReviewReportData (cyclomatic 18) WMFData/Sources/WMFData/Data Controllers/Year In Review/WMFYearInReviewDataController.swift
  • Cognitive Complexity · ReadingListsSyncOperation.executeFullSync (cognitive 18) WMF Framework/ReadingListsSyncOperation.swift
  • Cognitive Complexity · WMFWhichCameFirstCardView.thumbnailView (cognitive 17) WMFComponents/Sources/WMFComponents/Components/Games/Which Came First/Core/Cards/WMFWhichCameFirstCardView.swift
  • Cognitive Complexity · WMFRiveAnimationViewModel.applyImages (cognitive 16) WMFComponents/Sources/WMFComponents/Components/Shared/Rive/WMFRiveAnimationViewModel.swift
  • Cognitive Complexity · WMFWhichCameFirstView.footerArea (cognitive 16) WMFComponents/Sources/WMFComponents/Components/Games/Which Came First/Core/WMFWhichCameFirstView.swift
  • Cognitive Complexity · WMFPageViewsDataController.fetchPageViewSeconds (cognitive 16) WMFData/Sources/WMFData/Data Controllers/Shared/WMFPageViewsDataController.swift
  • God Classes · TooManyMethods: DiscoverInstrumentation Wikipedia/Code/DiscoverInstrumentation.swift
  • God Classes · FileTooLong: Year In Review/WMFYearInReviewDataController.swift WMFData/Sources/WMFData/Data Controllers/Year In Review/WMFYearInReviewDataController.swift
  • God Classes · TooManyMethods: WMFDiscoverReadingListDataController WMFData/Sources/WMFData/Data Controllers/Discover/WMFDiscoverReadingListDataController.swift
  • God Classes · FileTooLong: Code/YearInReviewCoordinator.swift Wikipedia/Code/YearInReviewCoordinator.swift
  • God Classes · TooManyMethods: WMFReadingListsController Wikipedia/Code/ReadingListsController.swift
  • God Classes · FileTooLong: Style/WMFIcon.swift WMFComponents/Sources/WMFComponents/Style/WMFIcon.swift
  • Code Duplication · Members sharing a duplicated core (8 members, 50+ identical tokens) WMFComponents/Sources/WMFComponents/Components/Settings/Account/WMFAccountSettingsView.swift
  • Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) WMFComponents/Sources/WMFComponents/Components/Analytics Inspector/WMFAnalyticsInspectorViewController.swift
  • Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) WMFData/Sources/WMFData/Data Controllers/Home/WMFPageInterestDataController.swift
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) Wikipedia/Code/ActivityTabViewController.swift
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) Wikipedia/Code/TalkPageCellCommentView.swift
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) Wikipedia/Code/WMFAuthAccountCreationInfoFetcher.swift
  • Code Duplication · Edited copy of a member (84 corresponding lines) Wikipedia/Code/ArticlePlaceView.swift
  • Code Duplication · Edited copy of a member (74 corresponding lines) Wikipedia/Code/TalkPageViewController.swift
  • Code Duplication · Edited copy of a member (28 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Watchlist/WMFWatchlistViewController.swift
  • Code Duplication · Edited copy of a member (55 corresponding lines) Wikipedia/Code/DescriptionEditViewController.swift
  • Code Duplication · Edited copy of a member (57 corresponding lines) Wikipedia/Code/TempAccountSheetCoordinator.swift
  • Code Duplication · Edited copy of a member (53 corresponding lines) Wikipedia/Code/ArticleViewController.swift
  • Code Duplication · Edited copy of a member (29 corresponding lines) Wikipedia/Code/Session.swift
  • Code Duplication · Edited copy of a member (33 corresponding lines) Wikipedia/Code/ActivityTabViewController.swift
  • Code Duplication · Edited copy of a member (35 corresponding lines) WMFData/Sources/WMFData/Data Controllers/Activity Tab/WMFActivityTabDataController.swift
  • Code Duplication · Edited copy of a member (49 corresponding lines) WMF Framework/MWKDataStore+LanguageVariantMigration.swift
  • Code Duplication · Edited copy of a member (44 corresponding lines) Wikipedia/Code/TableOfContentsAnimator.swift
  • Code Duplication · Edited copy of a member (25 corresponding lines) Wikipedia/Code/HomeFeedSettingsCoordinator.swift
  • Code Duplication · Edited copy of a member (42 corresponding lines) Wikipedia/Code/ArticleViewController+Editing.swift
  • Code Duplication · Edited copy of a member (33 corresponding lines) Wikipedia/Code/YearInReviewSlideViewModelFactory.swift
  • Code Duplication · Edited copy of a member (37 corresponding lines) WMF Framework/Fetcher.swift
  • Code Duplication · Edited copy of a member (30 corresponding lines) WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewBiggestReadingDaySlideDataController.swift
  • Code Duplication · Edited copy of a member (28 corresponding lines) Wikipedia/Code/ArticleCollectionViewController.swift
  • Code Duplication · Edited copy of a member (31 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Reading Challenge Widget/WMFRandomWidgetView.swift
  • Code Duplication · Edited copy of a member (20 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Watchlist/Filter/WMFWatchlistFilterViewModel.swift
  • Code Duplication · Edited copy of a member (17 corresponding lines) Wikipedia/Code/DescriptionWelcomePageViewController.swift
  • Code Duplication · Edited copy of a member (36 corresponding lines) Wikipedia/Code/Controllers/ShortDescriptionController.swift
  • Code Duplication · Edited copy of a member (42 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Activity Tab/View Models/ArticleViewsViewModel.swift
  • Code Duplication · Edited copy of a member (30 corresponding lines) WMFData/Sources/WMFData/Data Controllers/Shared/WMFImageDataController.swift
  • Code Duplication · Edited copy of a member (35 corresponding lines) Wikipedia/Code/TalkPageFetcher.swift
  • Code Duplication · Edited copy of a member (22 corresponding lines) WMFData/Sources/WMFData/Data Controllers/Games/WMFGamesDataController.swift
  • Code Duplication · Edited copy of a member (39 corresponding lines) WMF Framework/Remote Notifications/Model/RemoteNotificationFilterType.swift
  • Code Duplication · Edited copies of one member (3 members, 28+ corresponding lines) Wikipedia/Code/DiscoverReadingListCoordinator.swift
  • Code Duplication · Edited copy of a member (29 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Donate Form/WMFDonateViewModel.swift
  • Code Duplication · Edited copy of a member (42 corresponding lines) Wikipedia/Code/EchoSubscriptionFetcher.swift
  • Code Duplication · Edited copy of a member (23 corresponding lines) WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewBiggestReadingDaySlideDataController.swift
  • Code Duplication · Edited copy of a member (16 corresponding lines) Command Line Tools/Update Localizations/localization.swift
  • Code Duplication · Edited copy of a member (17 corresponding lines) Wikipedia/Code/ExploreViewController.swift
  • Code Duplication · Edited copy of a member (14 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Settings/WMFSettingsViewModel.swift
  • Code Duplication · Edited copy of a member (35 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Activity Tab/WMFActivityTabView.swift
  • Code Duplication · Edited copy of a member (21 corresponding lines) WMFData/Sources/WMFData/Data Controllers/Home/WMFHomeDataController.swift
  • Code Duplication · Edited copy of a member (13 corresponding lines) WMF Framework/WMFFeedArticlePreview.swift
  • Code Duplication · Edited copy of a member (26 corresponding lines) WMFComponents/Sources/WMFComponents/Components/App Onboarding/WMFAppOnboardingStepViews.swift
  • Code Duplication · Edited copies of one member (4 members, 20+ corresponding lines) Wikipedia/Code/YearInReviewSlideViewModelFactory.swift
  • Code Duplication · Edited copy of a member (22 corresponding lines) WMF Framework/CacheController.swift
  • Code Duplication · Edited copy of a member (20 corresponding lines) Wikipedia/Code/TalkPageFetcher.swift
  • Code Duplication · Edited copy of a member (26 corresponding lines) WMF Framework/ArticleCacheResourceDBWriting.swift
  • Code Duplication · Edited copy of a member (39 corresponding lines) WMFData/Sources/WMFData/Data Controllers/Donor Experience/WMFFundraisingCampaignDataController.swift
  • Code Duplication · Edited copy of a member (18 corresponding lines) WMF Framework/ArticleSummary.swift
  • Code Duplication · Edited copy of a member (20 corresponding lines) WMF Framework/ReadingListsAPIController.swift
  • Code Duplication · Edited copy of a member (25 corresponding lines) WMFData/Sources/WMFData/Data Controllers/Page History/WMFPageHistoryDataController.swift
  • Code Duplication · Edited copy of a member (40 corresponding lines) WMF Framework/Remote Notifications/Model/RemoteNotificationFilterType.swift
  • Code Duplication · Edited copies of one member (4 members, 14+ corresponding lines) Wikipedia/Code/AnnouncementCollectionViewCell.swift
  • Code Duplication · Edited copy of a member (25 corresponding lines) WMF Framework/ImageCacheDBWriter.swift
  • Code Duplication · Edited copy of a member (16 corresponding lines) Wikipedia/Code/UIViewController+Extensions.swift
  • Code Duplication · Edited copy of a member (17 corresponding lines) WMF Framework/Collection+AsyncMap.swift
  • Code Duplication · Edited copy of a member (20 corresponding lines) WMFData/Sources/WMFData/Data Controllers/Home/WMFPageInterestDataController.swift
  • Code Duplication · Edited copy of a member (17 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Shared/Buttons/WMFPriceButton.swift
  • Code Duplication · Edited copy of a member (27 corresponding lines) WMF Framework/Remote Notifications/Model/RemoteNotificationsModelController.swift
  • Code Duplication · Edited copy of a member (26 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Editors/Source Editor/Formatter Extensions/WKSourceEditorFormatterList+ButtonActions.swift
  • Code Duplication · Edited copy of a member (12 corresponding lines) WMF Framework/Fetcher.swift
  • Code Duplication · Edited copy of a member (20 corresponding lines) WMF Framework/WMFFeedContentFetcher.swift
  • Code Duplication · Edited copy of a member (18 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Article Tabs/WMFArticleTabsViewModel.swift
  • Code Duplication · Edited copy of a member (22 corresponding lines) Wikipedia/Code/WMFAccountCreationViewController.swift
  • Code Duplication · Edited copy of a member (15 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Editors/Source Editor/Formatter Extensions/WKSourceEditorFormatterLink+ButtonActions.swift
  • Code Duplication · Edited copy of a member (30 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Suggested Edits/Image Recommendations/WMFImageRecommendationsViewController.swift
  • Code Duplication · Edited copy of a member (25 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Settings/Home/Main/WMFHomeFeedSettingsView.swift
  • Code Duplication · Edited copy of a member (17 corresponding lines) Wikipedia/Code/DiffController.swift
  • Code Duplication · Edited copy of a member (19 corresponding lines) Wikipedia/Code/DiffHeaderSummaryView.swift
  • Code Duplication · Edited copy of a member (17 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Year in Review/WMFYearInReviewAnnouncementHostingController.swift
  • Code Duplication · Edited copy of a member (28 corresponding lines) Wikipedia/Code/DiffContainerViewController.swift
  • Code Duplication · Edited copy of a member (24 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Settings/Account/WMFAccountSettingsView.swift
  • Code Duplication · Edited copy of a member (18 corresponding lines) Widgets/Widgets/FeaturedArticleWidget.swift
  • Code Duplication · Edited copy of a member (14 corresponding lines) WMFData/Sources/WMFData/Data Controllers/Page History/WMFPageHistoryDataController.swift
  • Code Duplication · Edited copy of a member (24 corresponding lines) Wikipedia/Code/EditorViewController.swift
  • Code Duplication · Edited copies of one member (3 members, 21+ corresponding lines) WMFData/Sources/WMFData/Service/WMFBasicService.swift
  • Code Duplication · Edited copy of a member (25 corresponding lines) Wikipedia/Code/EditorViewController.swift
  • Code Duplication · Edited copy of a member (12 corresponding lines) WMFComponents/Sources/WMFComponents/Base/WMFCanvasViewController.swift
  • Code Duplication · Edited copy of a member (25 corresponding lines) Wikipedia/Code/WMFAccountCreationViewController.swift
  • Code Duplication · Edited copy of a member (20 corresponding lines) WMF Framework/ThemeableTextField.swift
  • Code Duplication · Edited copy of a member (14 corresponding lines) Wikipedia/Code/ReadingListsAlertController.swift
  • Code Duplication · Edited copy of a member (13 corresponding lines) Wikipedia/Code/ColumnarCollectionViewController.swift
  • Code Duplication · Edited copy of a member (27 corresponding lines) WMF Framework/Remote Notifications/Model/RemoteNotificationFilterType.swift
  • Code Duplication · Edited copy of a member (16 corresponding lines) Wikipedia/Code/ShareActivityController.swift
  • Code Duplication · Edited copy of a member (17 corresponding lines) Wikipedia/Code/WMFAppViewController+Extensions.swift
  • Code Duplication · Edited copy of a member (11 corresponding lines) Wikipedia/Code/ArticleFetcher.swift
  • Code Duplication · Edited copy of a member (15 corresponding lines) Wikipedia/Code/EditSaveViewController.swift

We compare every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.

Fixed since the last survey: 159 findings

These 159 critical or serious findings were in the previous survey, on 28 October 2026, and are gone from this one. The first 100 are listed here.

  • Cyclomatic Complexity · GenerateTopicsStrings.swift.injectIntoStringsFile (cyclomatic 16) scripts/GenerateTopicsStrings.swift
  • Cognitive Complexity · GenerateTopicsStrings.swift.top-level code (cognitive 36) scripts/GenerateTopicsStrings.swift
  • Cognitive Complexity · GenerateTopicsStrings.swift.injectIntoStringsFile (cognitive 24) scripts/GenerateTopicsStrings.swift
  • Cognitive Complexity · AppleStringsFile.readFromVariable (cognitive 21) scripts/update-qqq.php
  • God Classes · TooManyMethods: EditInteractionFunnel Wikipedia/Code/EditInteractionFunnel.swift
  • God Classes · MethodTooLong: ReadingListsSyncOperation.locallyCreate WMF Framework/ReadingListsSyncOperation.swift
  • God Classes · TooManyMethods: WMFArticleTabsDataController WMFData/Sources/WMFData/Data Controllers/Article Tabs/WMFArticleTabsDataController.swift
  • Code Duplication · Near-duplicate member family (3 members, 12 shared lines) WMFComponents/Sources/WMFComponents/Components/Profile/WMFProfileViewModel.swift
  • Code Duplication · Near-duplicate member pair (22 shared lines) WMFComponents/Sources/WMFComponents/Components/Settings/Home/Community/WMFHomeFeedCommunitySettingsViewModel.swift
  • Code Duplication · Edited copy of a member (24 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Settings/Push Notifications/WMFPushNotificationsSettingsView.swift
  • Code Duplication · Members sharing a duplicated core (10 members, 50+ identical tokens) Wikipedia/Code/DiffContainerViewController.swift
  • Code Duplication · Members sharing a duplicated core (9 members, 50+ identical tokens) WMF Framework/Remote Notifications/RemoteNotificationsController.swift
  • Code Duplication · Members sharing a duplicated core (8 members, 50+ identical tokens) WMFComponents/Sources/WMFComponents/Components/Settings/Account/WMFAccountSettingsView.swift
  • Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) WMFData/Sources/WMFData/Data Controllers/Home/WMFPageInterestDataController.swift
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) WMFComponents/Sources/WMFComponents/Components/Developer Settings/WMFDeveloperSettingsViewController.swift
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) WMFData/Sources/WMFData/Data Controllers/Home/WMFHomeDataController.swift
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) Wikipedia/Code/WMFAuthAccountCreationInfoFetcher.swift
  • Code Duplication · Duplicated block (38–39 lines × 2) WMFData/Sources/WMFData/Service/WMFBasicService.swift
  • Code Duplication · Duplicated block (11–21 lines × 4) WMFComponents/Sources/WMFComponents/Components/Editors/Source Editor/WMFSourceEditorAccessibilityIdentifiers.swift
  • Code Duplication · Duplicated block (21 lines × 2) WMFComponents/Sources/WMFComponents/Components/Donate Form/WMFDonateViewModel.swift
  • Code Duplication · Duplicated block (20–21 lines × 2) WMFComponents/Sources/WMFComponents/Components/Games/Which Came First/Core/WMFWhichCameFirstView.swift
  • Code Duplication · Duplicated block (21 lines × 2) Wikipedia/Code/DiffFetcher.swift
  • Code Duplication · Duplicated block (19 lines × 4) WMFComponents/Sources/WMFComponents/Components/Donate Form/WMFDonateViewModel.swift
  • Code Duplication · Duplicated block (17 lines × 3) WMF Framework/Widget/WidgetController.swift
  • Code Duplication · Duplicated block (16–17 lines × 3) Wikipedia/Code/EvergreenAccountCreationCoordinator.swift
  • Code Duplication · Duplicated block (14–16 lines × 3) Wikipedia/Code/NotificationsCenterCellViewModel+SheetActionExtensions.swift
  • Code Duplication · Duplicated block (7–16 lines × 2) Wikipedia/Code/SettingsTabViewController.swift
  • Code Duplication · Duplicated block (9–15 lines × 3) WMFData/Sources/WMFData/Data Controllers/Semantic Search/WMFSemanticSearchDataController+Results.swift
  • Code Duplication · Duplicated block (15 lines × 2) WMF Framework/PageNamespace.swift
  • Code Duplication · Duplicated block (14 lines × 3) WMFComponents/Sources/WMFComponents/Components/Donate Form/WMFDonateViewModel.swift
  • Code Duplication · Duplicated block (14 lines × 2) WMF Framework/MWKDataStore+LegacyPageViews.swift
  • Code Duplication · Duplicated block (14 lines × 2) WMF Framework/WMFArticle+Migration.swift
  • Code Duplication · Duplicated block (14 lines × 2) Wikipedia/Code/NotificationsCenterCellViewModel+SheetActionExtensions.swift
  • Code Duplication · Duplicated block (11–13 lines × 4) Wikipedia/Code/ActivityTabViewController.swift
  • Code Duplication · Duplicated block (13 lines × 4) Wikipedia/Code/WMFAppViewController.swift
  • Code Duplication · Duplicated block (12 lines × 19) WMF Framework/ArticleSummary.swift
  • Code Duplication · Duplicated block (12 lines × 8) WMFComponents/Sources/WMFComponents/Components/Donate Form/WMFDonateViewModel.swift
  • Code Duplication · Duplicated block (10–12 lines × 3) WMFComponents/Sources/WMFComponents/Components/Developer Settings/WMFDeveloperSettingsView.swift
  • Code Duplication · Duplicated block (12 lines × 2) Wikipedia/Code/DiffFetcher.swift
  • Code Duplication · Duplicated block (12 lines × 2) Wikipedia/Code/SizeThatFitsReusableView.swift
  • Code Duplication · Duplicated block (11 lines × 3) WMFComponents/Sources/WMFComponents/Components/Donate Form/WMFDonateViewModel.swift
  • Code Duplication · Duplicated block (11 lines × 3) Wikipedia/Code/DonateCoordinator.swift
  • Code Duplication · Duplicated block (11 lines × 2) WMF Framework/Remote Notifications/Model/RemoteNotificationFilterType.swift
  • Code Duplication · Duplicated block (11 lines × 2) WMFComponents/Sources/WMFComponents/Components/Year in Review/WMFYearInReviewAnnouncementHostingController.swift
  • Code Duplication · Duplicated block (11 lines × 2) Wikipedia/Code/ArticleViewController+ArticleToolbarHandling.swift
  • Code Duplication · Duplicated block (11 lines × 2) Wikipedia/Code/SavedArticlesFetcher.swift
  • Code Duplication · Duplicated block (2–11 lines × 14) WMF Framework/Remote Notifications/RemoteNotificationsController.swift
  • Code Duplication · Duplicated block (7–10 lines × 3) Wikipedia/Code/ArticlePeekPreviewViewController.swift
  • Code Duplication · Duplicated block (2–10 lines × 5) WMFComponents/Sources/WMFComponents/Components/Developer Settings/WMFDeveloperSettingsViewController.swift
  • Code Duplication · Duplicated block (10 lines × 2) Wikipedia/Code/ScrollableEducationPanelViewController.swift
  • Code Duplication · Duplicated block (10 lines × 2) Wikipedia/Code/UIViewController+Extensions.swift
  • Code Duplication · Duplicated block (10 lines × 2) Wikipedia/Code/ViewControllerRouter.swift
  • Code Duplication · Duplicated block (9 lines × 2) WMFComponents/Sources/WMFComponents/Components/Activity Tab/View Models/WMFActivityTabCustomizeViewModel.swift
  • Code Duplication · Duplicated block (9 lines × 2) WMFComponents/Sources/WMFComponents/Components/Saved/All Articles/WMFSavedAllArticlesView.swift
  • Code Duplication · Duplicated block (9 lines × 2) Wikipedia/Code/APIURLComponentsBuilder.swift
  • Code Duplication · Duplicated block (9 lines × 2) Wikipedia/Code/BaseExploreFeedSettingsViewController.swift
  • Code Duplication · Duplicated block (9 lines × 2) Wikipedia/Code/PageHistoryViewController.swift
  • Code Duplication · Duplicated block (8 lines × 6) WMFComponents/Sources/WMFComponents/Components/Settings/Home/Community/WMFHomeFeedCommunitySettingsViewModel.swift
  • Code Duplication · Duplicated block (8 lines × 4) Wikipedia/Code/DiffFetcher.swift
  • Code Duplication · Duplicated block (8 lines × 2) WMF Framework/CacheDBWriterHelper.swift
  • Code Duplication · Duplicated block (8 lines × 2) WMF Framework/PageNamespace.swift
  • Code Duplication · Duplicated block (8 lines × 2) Wikipedia/Code/BaseExploreFeedSettingsViewController.swift
  • Code Duplication · Duplicated block (7–8 lines × 2) Wikipedia/Code/DiffFetcher.swift
  • Code Duplication · Duplicated block (8 lines × 2) Wikipedia/Code/PageHistoryCountsView.swift
  • Code Duplication · Duplicated block (8 lines × 2) Wikipedia/Code/TalkPageFindInPageSearchController.swift
  • Code Duplication · Duplicated block (7 lines × 2) Wikipedia/Code/DiffContainerViewController.swift
  • Code Duplication · Duplicated block (7 lines × 2) Wikipedia/Code/EditNoticesFetcher.swift
  • Code Duplication · Duplicated block (6 lines × 2) WMFComponents/Sources/WMFComponents/Base/WMFCanvasViewController.swift
  • Code Duplication · Duplicated block (6 lines × 2) WMFComponents/Sources/WMFComponents/Components/Games/Splash Screen/WMFGamesSplashScreenViewModel.swift
  • Code Duplication · Duplicated block (6 lines × 2) WMFComponents/Sources/WMFComponents/Components/Settings/Home/Community/WMFHomeFeedCommunitySettingsViewModel.swift
  • Code Duplication · Duplicated block (6 lines × 2) Wikipedia/Code/AppOnboardingCoordinator.swift
  • Code Duplication · Duplicated block (5–6 lines × 2) Wikipedia/Code/AppViewControllerTipWrapper.swift
  • Code Duplication · Duplicated block (6 lines × 2) Wikipedia/Code/BaseExploreFeedSettingsViewController.swift
  • Code Duplication · Duplicated block (6 lines × 2) Wikipedia/Code/DiffListChangeViewModel.swift
  • Code Duplication · Duplicated block (6 lines × 2) Wikipedia/Code/PlaceSearch.swift
  • Code Duplication · Duplicated block (5–6 lines × 2) Wikipedia/Code/UIViewController+Extensions.swift
  • Code Duplication · Duplicated block (6 lines × 2) Wikipedia/Code/WMFAccountCreationViewController.swift
  • Code Duplication · Duplicated block (6 lines × 2) Wikipedia/Code/WMFAccountCreationViewController.swift
  • Code Duplication · Duplicated block (5 lines × 10) Wikipedia/Code/DiffContainerViewController.swift
  • Code Duplication · Duplicated block (5 lines × 3) Wikipedia/Code/ColumnarCollectionViewController.swift
  • Code Duplication · Duplicated block (5 lines × 2) WMFComponents/Sources/WMFComponents/Base/WMFCanvasViewController.swift
  • Code Duplication · Duplicated block (5 lines × 2) Widgets/Widgets/URL+WidgetSource.swift
  • Code Duplication · Duplicated block (5 lines × 2) Wikipedia/Code/WMFAccountCreationViewController.swift
  • Code Duplication · Duplicated block (5 lines × 2) WMFComponents/Sources/WMFComponents/Components/Editors/Common Views/Base/WMFEditorToolbarButton.swift
  • Code Duplication · Duplicated block (7 lines × 2) WMFComponents/Sources/WMFComponents/Components/Saved/All Articles/WMFSavedAllArticlesView.swift
  • Code Duplication · Duplicated block (9 lines × 2) WMFComponents/Sources/WMFComponents/Components/Saved/All Articles/WMFSavedAllArticlesViewModel.swift
  • Code Duplication · Duplicated block (8 lines × 3) WMFComponents/Sources/WMFComponents/Components/Settings/Account/WMFAccountSettingsViewModel.swift
  • Code Duplication · Duplicated block (5 lines × 3) WMFComponents/Sources/WMFComponents/Components/Settings/Year In Review/WMFYearInReviewSettingsViewModel.swift
  • Code Duplication · Duplicated block (6 lines × 3) WMFData/Sources/WMFData/Data Controllers/Home/WMFPageInterestDataController.swift
  • Code Duplication · Duplicated block (6 lines × 2) WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/WMFYearInReviewDonateCountSlideDataController.swift
  • Code Duplication · Duplicated block (8 lines × 3) WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewDaysVisitedSlideDataController.swift
  • Code Duplication · Duplicated block (6 lines × 2) WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewReadCountSlideDataController.swift
  • Code Duplication · Duplicated block (7 lines × 2) Wikipedia/Code/AppViewControllerTipWrapper.swift
  • Code Duplication · Duplicated block (7 lines × 2) Wikipedia/Code/DescriptionWelcomeInitialViewController.swift
  • Code Duplication · Duplicated block (7 lines × 2) Wikipedia/Code/PageHistoryCountsView.swift
  • Code Duplication · Duplicated block (7 lines × 4) Wikipedia/Code/TalkPageCellCommentView.swift
  • Code Duplication · Duplicated block (5 lines × 2) Wikipedia/Code/TalkPageTopicReplyOnboardingHostingController.swift
  • Code Duplication · Duplicated block (7 lines × 2) Wikipedia/Code/WMFAccountCreationViewController.swift
  • Code Duplication · Duplicated block (8 lines × 2) Wikipedia/Code/WMFAccountCreator.swift
  • Code Duplication · Duplicated block (5 lines × 2) WMFComponents/Sources/WMFComponents/Components/Games/Which Came First/Core/Cards/WMFWhichCameFirstCardViewModel.swift
Rebuild cost: about €190,000 · Estimate
Cost to rebuild€62,000 to €310,000, for 1,041 to 3,301 hours of work, about 1.3 person-years for 1 to 3 engineers
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.7 at a score of 44. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeLarge: 171,557 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.

Top priorities

The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.

1
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
Raises the score by about 7 points · Medium effort · Text alternatives
2
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
Raises the score by about 7 points · Medium effort · Page structure
3
Resolve the 9 REDACTED finding(s) in Secrets (history) — start with REDACTED (5), REDACTED (2), REDACTED (2).
Raises the score by about 2 points · Low effort · Secrets (history)

Diagnosis: what the measurements show together

Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.

Where the investment is most exposed · Value at risk
This code would cost about €190,000 to build again, about 1.3 person-years of work. Its weakest lens is Accessibility, at 35 (Weak). Accessibility is about whether the interface is built so that everyone can use it, including people who can't see the screen or can't use a mouse. Because the weakest lens counts most in the score, work on Accessibility also moves the score most.
Based on: the rebuild estimate · the Accessibility grade · how much each lens counts
What to do: Start with the Accessibility actions in Top priorities.
One cause behind 42 Domain Modelling findings · Common cause
42 findings in the Domain Modelling lens come from the same cause. The code models the business as objects, such as an order or a customer, and each object should guard its own rules: an order, for example, should refuse to be shipped before it has been paid. Here the objects don't do that. Some objects only hold data, while the rules that should keep that data valid sit elsewhere in the code. Identifiers, such as order numbers and customer numbers, are passed around as plain numbers or text, so nothing stops the code from using one kind where another belongs. Because all of these findings have the same cause, fixing it once, in the business objects themselves, deals with them together.
Based on: Rich vs anemic domain model (2 findings) · Strongly-typed ids (40 findings)
What to do: Give each business object the methods that enforce its rules, such as a method for shipping an order that first checks it has been paid, and let only those methods change its data. Give each kind of identifier a type of its own, so an order number can't be used where a customer number belongs.
If you do one thing first · First action
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video. Of all the actions in this report, it raises the score most for the work it takes: about 7 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 6.7 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 3% to 7% on every change. The history of the code shows how much it changes: about 226,789 lines over the last 90 days, which is about 919,755 lines a year. At that pace, the extra work comes to an estimated 76.6 to 459.7 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

Architecture — module dependency graph

Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.

arch ContinueReadingWidget ContinueReadingWidget WMF WMF ContinueReadingWidget->WMF NotificationServiceExtension NotificationServiceExtension NotificationServiceExtension->WMF WMFComponents WMFComponents WMF->WMFComponents WMFData WMFData WMFComponents->WMFData WMFNativeLocalizations WMFNativeLocalizations WMFComponents->WMFNativeLocalizations WMFTestKitchen WMFTestKitchen WMFData->WMFTestKitchen WMFTranslateWikiLocalizations WMFTranslateWikiLocalizations WidgetsExtension WidgetsExtension WidgetsExtension->WMF Wikipedia-iOS Wikipedia-iOS Wikipedia-iOS->WMF languages languages localization localization

Architecture: which parts of the code depend on which

The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.

12 modules, with 12 dependencies between them. One loop runs through 4 of the modules, marked above the diagonal.

Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
uses →1 (global)2 WMFLocalizations~WMFTranslateWikiLocalizations3 Wikipedia4 Wikipedia.Code5 Wikipedia.assets6 XcodeCloud7 scripts8 repository9 WMFTestKitchen~WMFTestKitchen10 WMFData~WMFData11 WMFComponents~WMFComponents12 WMFLocalizations~WMFNativeLocalizations
1 (global)
2 WMFLocalizations~WMFTranslateWikiLocalizations
3 Wikipedia
4 Wikipedia.Code
5 Wikipedia.assets
6 XcodeCloud
7 scripts
8 repository33527421
9 WMFTestKitchen~WMFTestKitchen195
10 WMFData~WMFData364414
11 WMFComponents~WMFComponents692275
12 WMFLocalizations~WMFNativeLocalizations41
Uses a module listed above itPart of a loopThe module itself
1 (global)2 WMFLocalizations~WMFTranslateWikiLocalizations3 Wikipedia4 Wikipedia.Code5 Wikipedia.assets6 XcodeCloud7 scripts8 repository9 WMFTestKitchen~WMFTestKitchen10 WMFData~WMFData11 WMFComponents~WMFComponents12 WMFLocalizations~WMFNativeLocalizations(global)1WMFLocalizations~WMFTranslateWikiLocalizations2Wikipedia3Wikipedia.Code4Wikipedia.assets5XcodeCloud6scripts7repository8WMFTestKitchen~WMFTestKitchen9WMFData~WMFData10WMFComponents~WMFComponents11WMFLocalizations~WMFNativeLocalizations123352742119536441469227541

At a glance — Code Health · 53% · Adequate · gated by X5 ·

At a glance — Architecture · 84% · Adequate · gated by D26 ·

At a glance — Maturity · 70% · Adequate · gated by M2 ·

At a glance — Readiness · 52% · Adequate · gated by P3 ·

At a glance — Security · 44% · Weak · gated by D28, D29, D36 ·

At a glance — Domain Modelling · 90% · Strong ·

At a glance — Accessibility · 35% · Weak · gated by AC1, AC3 ·

At a glance — Performance · 85% · Strong ·

Security & Compliance — OWASP Top-10 mapping

Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).

OWASP categoryFindingsSeverity
A05:2025 — Injection47High / Critical
A03:2025 — Software Supply Chain Failures17Medium
A07:2025 — Authentication Failures10High / Critical

Roadmap

Top priorities: Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video; Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh; Resolve the 9 REDACTED finding(s) in Secrets (history) — start with REDACTED (5), REDACTED (2), REDACTED (2).

Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.

Do thisHelpsEffortDimension
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.+7.0 ptsMediumText alternatives
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.+6.7 ptsMediumPage structure
Resolve the 9 REDACTED finding(s) in Secrets (history) — start with REDACTED (5), REDACTED (2), REDACTED (2).+2.4 ptsLowSecrets (history)
Resolve the 5 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED, REDACTED.+1.0 ptsLowSupply-chain Provenance & Signing
Resolve the 5 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED, REDACTED.+1.0 ptsLowSupply-chain Provenance & Signing
Resolve the 8 Low coverage finding(s) in Code Coverage — start with SourceConfig.swift, AgentData.swift, PageData.swift.+1.0 ptsLowCode Coverage
Resolve the 6 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED, REDACTED.+1.0 ptsLowStatic Analysis (SAST)
Resolve the 5 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED, REDACTED.+0.8 ptsLowStatic Analysis (SAST)

File quality

Per-file score 0–10 — a quality signature. Of 516 files carrying findings, judged against the Production bar: 1% slop · 56% mixed · 43% near-clean.

FileScoreBandWorst signal
REDACTED2.4SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.0SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.0SlopStatic Analysis (SAST): High: REDACTED
WMFComponents/Sources/WMFComponents/Components/Activity Tab/View Models/TimelineViewModel.swift3.9SlopChange Coupling: Boundary-crossing change coupling: TimelineViewModel.swift ↔ UserContributionsDataController.swift
REDACTED4.1MixedSecrets (history): REDACTED: REDACTED
REDACTED4.2MixedStatic Analysis (SAST): Medium: REDACTED
WMFComponents/Sources/WMFComponents/Components/Developer Settings/WMFDeveloperSettingsView.swift4.4MixedChange Coupling: Boundary-crossing change coupling: WMFDeveloperSettingsView.swift ↔ WMFDeveloperSettingsDataController.swift
REDACTED4.6MixedStatic Analysis (SAST): High: REDACTED
WMFComponents/Sources/WMFComponents/Components/Developer Settings/WMFDeveloperSettingsViewModel.swift5.0MixedChange Coupling: Boundary-crossing change coupling: WMFDeveloperSettingsViewModel.swift ↔ WMFMockDeveloperSettingsDataController.swift
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
Wikipedia/Code/InsertMediaSettingsViewController.swift5.4MixedGod Classes: TooManyMethods: InsertMediaSettingsViewController
Wikipedia/Code/WMFAppViewController.swift5.5MixedCyclomatic Complexity: WMFAppViewController.processUserActivity (cyclomatic 27)
Wikipedia/Code/EditorViewController.swift5.5MixedCyclomatic Complexity: EditorViewController.loadContent (cyclomatic 22)
Wikipedia/Code/TalkPageViewController.swift5.5MixedCyclomatic Complexity: TalkPageViewController.tappedPublish (cyclomatic 22)
WMFData/Sources/WMFData/Data Controllers/Article Tabs/WMFArticleTabsDataController.swift5.5MixedCyclomatic Complexity: WMFArticleTabsDataController.getAdjacentArticleInTab (cyclomatic 22)
Wikipedia/Code/NotificationsCenterViewController.swift5.5MixedCyclomatic Complexity: NotificationsCenterViewController.userDidPanCell (cyclomatic 22)

How the grades work

Every finding carries one of four grades. Three say how serious it is. The fourth says this survey could not settle it — and it is a grade, not a gap.

Critical — 111

A definite problem that already costs you something and drags the score down: a missing authorisation check, a dependency with a known exploit, a build that does not reproduce. Failure here tends to cause failures elsewhere.

Serious — 1336

Likely wrong, but not failing yet. It degrades the codebase over a longer horizon and can cause failures elsewhere — not urgent this week, not something to carry for two years either.

Minor — 209

Recorded, with no effect on how the codebase functions. Present so the survey is complete, not because it needs doing.

Could not be resolved — 13

Something this survey could not settle from the outside, and which could be critical or serious. Either a control was required and no positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean result. These are excluded from the score rather than awarded a pass, so the number on the cover neither rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each one is named under Limitations.

Methodology & how to trust this report

This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 55 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 1.0, the weighted average across measured dimensions.

Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.

What we checked — 55 dimensions across the health lenses
D1D2D3D4D5D6D8D10D11D12D13D14D15D16D17D20D21D26D27D28D29D30D34D35D36D37D43D44AC1AC3AC6AX10AX3AX4AX8AX9DM2DM4DM5DM6M1M2M3M4P1P10P2P3P4P6PF3X26X28X3X5

Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.

How to trust any code-health report — three questions
  1. Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 1632 of 1656 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
  2. Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
  3. Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.

This report answers yes to all three. That's the bar to hold any assessment to.

Tools & methods

The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0✓ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0✓ deterministic
Canine Code Analyzer duplication detector (in-process)Code duplication1.0.0✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.400✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.400✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivySecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3✓ deterministic

Every finding is locatable in findings.md. Run 01a1dc37-2087-7eeb-8a42-b354d693566a.

The exact command behind every deep-scan dimension — tool, version, invocation and retained raw output — is in Appendix B — Reproduction & audit trail.

Run transparency — what happened this run

What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.

  • D14 License Compliance — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares a Swift Package.swift/Package.resolved, but the licence verdict published here was taken over its gem dependencies. Nothing was read about its SwiftPM dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
  • D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. D21's naming rules read C# through Roslyn and every other language through its sidecar model; these languages are left out (PHP's reading is its own change, a Roslyn-loaded VB or F# project has no population builder yet). Their declarations carry no naming verdict this run — this says nothing about whether their names are consistent.
  • D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22's deterministic call-shape rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
  • D24 Comment Value — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
  • D32 Data Compliance (PII/GDPR) — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `Command Line Tools/Update Languages/WikipediaLanguageCommandLineUtilityAPI.swift`, `WMF Framework/CacheGroup+CoreDataProperties.swift`, `WMF Framework/CacheItem+CoreDataProperties.swift`, `WMF Framework/ReadingList+CoreDataProperties.swift`, `WMFComponents/Sources/WMFComponents/Components/App Onboarding/WMFAppOnboardingFeedPreferenceViewModel.swift`, … (+48 more) produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
  • AXB1 Runtime evidence locked — no reproducible boot — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Subject: 2 markup document(s) — HTML, Razor, JSX, Vue, Svelte or server templates. The Runtime Evidence tier boots an app only via docker-compose, an Aspire AppHost, a Dockerfile, an npm dev script, a web service's own toolchain entry point (cargo, go, dotnet, Python, Spring Boot), or an Android app's own Gradle wrapper (run on an emulator); an Apple or Flutter app needs a host it lacks. None applied, so no live runtime a11y/egress/header evidence was collected. You can widen what we reach: add a docker-compose.yml (or an Aspire AppHost) that brings the app up with its dependencies. We then boot it in an isolated sandbox and gathers real runtime evidence — you change nothing in your pipeline (no CI step, no SDK).
  • C1 Data Protection — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
  • C2 Access Controls — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
  • C3 Audit Trail — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
  • DM2 Strongly-typed ids — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 141 further occurrence(s) are not listed individually; the score already reflects all 181.
  • GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and this repository's Swift, c, objectivec is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and this repository's Swift, c, objectivec is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
  • S1 Web-Security Posture — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
  • X12 Unreachable branch — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X16 Unfloored truncation loop — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X2 Cancellation propagation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Go, PHP, Dart, Kotlin, Ruby, Scala, Java, Python and Rust source only, and no C# was loaded, and no named async function in this repository's JavaScript/TypeScript, nor any Go, PHP or Dart function or Kotlin suspend function, makes a request that can be cancelled (fetch, axios, ky, ofetch, got, undici, node:http; net/http, net.Dial; amphp; Dio; Ktor, OkHttp), so there is nothing to judge, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.

Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.

Limitations & what we did not check

We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.

Per-dimension blind spots

For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D8 Code Coverage: Coverage is measured by building and running the test suite inside our isolated image — the target repo is never modified, and nothing on your systems runs. So coverage exists only when the suite builds and runs within the inline time budget; one that needs external services, can't build, or exceeds the budget yields no coverage (D8 then degrades to not-measured, not a low score). Line coverage also says nothing about assertion quality.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • D11 Test Reliability: Flakiness is inferred from history/markers — we run the suite once (for coverage), not the repeated runs under varied conditions that reveal nondeterminism, so a flaky test never recorded as failing is invisible here.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
  • D21 Naming Consistency: Naming consistency compares each name with the convention its structural peers follow in this repository: it cannot tell whether a consistently used name is a good one, and languages other than C# and TypeScript are not measured.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
  • AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
  • AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
  • DM4 Rich vs anemic domain model: Behaviour is detected as state mutation inside a method body — a method that enforces an invariant by validating-and-throwing without mutating reads as a query, and mutation delegated through an interface the scan can't resolve isn't credited; entities with zero public properties still drop out of the population. It detects that state changes, not whether the rule is correct.
  • DM6 Domain ↔ infrastructure boundary: Infrastructure reached through a hand-rolled wrapper, a domain-named facade, reflection, or a string-keyed service locator resolves to a non-infra type and isn't seen; the body scan is symbol resolution over syntax, not full dataflow. A clean result means "no resolved infra reference in a domain body", not a proof of purity.
  • M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

D1 · Cyclomatic Complexity6.4 / 10Adequate✓ Tool-verified

What it measures: How tangled the control flow is — methods with many branches are hard to test and change.

Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.

Maturity: Documented → Verified → Prevented · effective 6.4 / 10 · rule-coverage 100% · ceiling Prevented

105 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was DonateCoordinator.presentActionSheet at 66. A further 24 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being WMFSFSymbolIcon.`for` at 145 — they are counted neither in the figure above nor in this dimension's score. 12 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: WMFComponents/Sources/WMFComponents/Style/WMFIcon.swift (WMFSFSymbolIcon.`for` at 145), Wikipedia/Code/NotificationsCenterAction.swift (PageNamespace.stringValue at 44), WMFComponents/Sources/WMFComponents/Components/Settings/Home/For You/Whats Driving/Your Interests/WMFArticleTopic.swift (WMFArticleTopic.displayName at 40), WMFComponents/Sources/WMFComponents/Components/Year in Review/WMFArticleTopic+YearInReview.swift (WMFArticleTopic.yearInReviewSentence at 39), WMFData/Sources/WMFData/Models/Year In Review/WMFArticleTopic+YearInReviewIllustration.swift (WMFArticleTopic.yearInReviewIllustrationFileName at 34), and 7 more not listed here. They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

DonateCoordinator.presentActionSheet (cyclomatic 66)Wikipedia/Code/DonateCoordinator.swift:219
WMFFont.`for` (cyclomatic 65)WMFComponents/Sources/WMFComponents/Style/WMFFont.swift:61
WMFAccountLoginLogoutFetcher.login (cyclomatic 56)Wikipedia/Code/WMFAccountLoginLogoutFetcher.swift:89
ReadingListsSyncOperation.processLocalUpdates (cyclomatic 55)WMF Framework/ReadingListsSyncOperation.swift:510
PlacesViewController.regroupArticlesIfNecessary (cyclomatic 43)Wikipedia/Code/PlacesViewController.swift:1414

+ 100 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 13 bodies over 30 down to 30 or less in Cyclomatic Complexity — start with DonateCoordinator.presentActionSheet (cyclomatic 66), WMFFont.`for` (cyclomatic 65), WMFAccountLoginLogoutFetcher.login (cyclomatic 56). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 13 together lifts Cyclomatic Complexity from 6.4 to about 7.3/10, projected with the scoring formula itself and assuming each lands exactly at 30; a cleaner split scores higher.

Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.

D2 · Cognitive Complexity5.7 / 10Adequate✓ Tool-verified

What it measures: How hard the code is for a person to follow, beyond raw branching.

Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.

Maturity: Documented → Verified → Prevented · effective 5.7 / 10 · rule-coverage 100% · ceiling Prevented

177 method(s) exceeded the cognitive complexity threshold of 15; the worst was ReadingListsSyncOperation.processLocalUpdates at 133.

ReadingListsSyncOperation.processLocalUpdates (cognitive 133)WMF Framework/ReadingListsSyncOperation.swift:510
WMFAccountLoginLogoutFetcher.login (cognitive 89)Wikipedia/Code/WMFAccountLoginLogoutFetcher.swift:89
PlacesViewController.regroupArticlesIfNecessary (cognitive 88)Wikipedia/Code/PlacesViewController.swift:1414
DiffTransformer.populateAdditionalSectionAndMoveInfo (cognitive 67)Wikipedia/Code/DiffTransformer.swift:99
HtmlUtils.addStyling (cognitive 64)WMFComponents/Sources/WMFComponents/Utility/HTMLUtils.swift:320

+ 172 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 6 bodies over 60 down to 60 or less in Cognitive Complexity — start with ReadingListsSyncOperation.processLocalUpdates (cognitive 133), WMFAccountLoginLogoutFetcher.login (cognitive 89), PlacesViewController.regroupArticlesIfNecessary (cognitive 88). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 6 together lifts Cognitive Complexity from 5.7 to about 6.5/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.

Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.

D3 · God Classes8.2 / 10Strong✓ Tool-verified

What it measures: Over-large classes that try to do too much ("god classes").

Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.

Maturity: Documented → Verified → Prevented · effective 8.2 / 10 · rule-coverage 100% · ceiling Prevented

107 god class(es) detected.

TooManyMethods: ArticleViewController · ×42Wikipedia/Code/ArticleViewController.swift:10
FileTooLong: Code/PlacesViewController.swift · ×27Wikipedia/Code/PlacesViewController.swift
ClassTooLong: PlacesViewController · ×21Wikipedia/Code/PlacesViewController.swift:9
MethodTooLong: WMFSFSymbolIcon.`for` · ×17WMFComponents/Sources/WMFComponents/Style/WMFIcon.swift:212

What to do

  1. Resolve the 42 TooManyMethods finding(s) in God Classes — start with ArticleViewController.swift, WMFAppViewController.swift, ExploreViewController.swift. — One of this dimension's main actionable groups (42 warning-level).
  2. Resolve the 27 FileTooLong finding(s) in God Classes — start with PlacesViewController.swift, WMFAppViewController.swift, ExploreViewController.swift. — One of this dimension's main actionable groups (27 warning-level).
  3. Resolve the 21 ClassTooLong finding(s) in God Classes — start with PlacesViewController.swift, WMFAppViewController.swift, YearInReviewSlideViewModelFactory.swift. — One of this dimension's main actionable groups (21 warning-level).

Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.

D4 · Code Duplication6.6 / 10Adequate✓ Tool-verified

What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.

Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.

Maturity: Documented → Verified → Prevented · effective 6.6 / 10 · rule-coverage 100% · ceiling Verified

276 duplicated block group(s) detected. 8.4 % of the production lines (14,441 of 171,557) are in a reported copy. A further 428 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. 15 of the 704 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.

Edited copy of a member (10 corresponding lines) · ×26Wikipedia/Code/HTTPCookieStorage+Migration.swift:2
Duplicated block (6 lines × 2) · ×24WMF Framework/Collection+AsyncMap.swift:30
Edited copy of a member (9 corresponding lines) · ×23Wikipedia/Code/TalkPageCoffeeRollView.swift:80
Edited copy of a member (6 corresponding lines) · ×23WMFComponents/Sources/WMFComponents/Components/Games/Which Came First/Results/WMFWhichCameFirstResultsViewModel.swift:145
Edited copy of a member (4 corresponding lines) · ×23WMF Framework/MWKSearchResult.swift:224

+ 167 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 26 Edited copy of a member (10 corresponding lines) finding(s) in Code Duplication — start with HTTPCookieStorage+Migration.swift, EditorViewController.swift, WMFDonateViewController.swift. — One of this dimension's main actionable groups (26 warning-level).
  2. Resolve the 24 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with LockscreenSearchWidget.swift (2), DescriptionWelcomePageViewController.swift (2), Collection+AsyncMap.swift. — One of this dimension's main actionable groups (24 warning-level).
  3. Resolve the 23 Edited copy of a member (9 corresponding lines) finding(s) in Code Duplication — start with DiscoverReadingListCoordinator.swift (3), TalkPageCoffeeRollView.swift, WMFYearInReviewView.swift. — One of this dimension's main actionable groups (23 warning-level).

Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.

D5 · Coupling8.7 / 10Strong✓ Tool-verified

What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.

Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.

Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.

Maturity: Documented → Verified → Prevented · effective 8.7 / 10 · rule-coverage 100% · ceiling Prevented

12 production modules (SwiftPM+Xcode), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; a workspace's implicit (product-name) dependency is not visible there; 2 module(s) off the main sequence, with abstractness counted on 8 of the 12 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).

Off the main sequence: WMFNativeLocalizations · ×2

What to do

  1. Resolve the 2 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (2 warning-level).

Detailed fixes: d5_recommendation.md · top locations in Appendix A, every location in findings.md.

D6 · Cohesion (LCOM4)7.9 / 10Strong✓ Tool-verified

What it measures: Whether a class's methods are focused on a single responsibility.

Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.

Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.

Maturity: Documented → Verified → Prevented · effective 7.9 / 10 · rule-coverage 100% · ceiling Verified

114 of 647 classes have LCOM4 above 3.

Low cohesion: ExploreViewController (LCOM4 55) · ×114Wikipedia/Code/ExploreViewController.swift:9

What to do

  1. Resolve the 114 Low cohesion finding(s) in Cohesion (LCOM4) — start with HasText.swift (2), ExploreViewController.swift, NSUserDefaults+WMFApplicationDefaults.swift. — One of this dimension's main actionable groups (114 warning-level).

Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.

D8 · Code Coverage6.3 / 10Adequate✓ Tool-verified

What it measures: How much of the code is actually exercised by tests.

Method: Coverage from the analyzer's own run of the suite, computed per-file with structured exclusions for generated, trivial, and glue code. A coverage report found in the repository is never read. When the suite can't be built/run in-image, coverage is reported NOT-MEASURED (excluded from the score) with the precondition to make it measurable — never a LoC-ratio proxy folded in as if measured. Deterministic.

Maturity: Documented → Verified → Prevented · effective 6.3 / 10 · rule-coverage 100% · ceiling Verified

Line coverage 29.5% — 8 file(s) below 50%. Measured from the Swift suite (WMFComponents: no coverage export; WMFData: no coverage export; WMFLocalizations: no coverage export; WMFTestKitchen: `swift test --enable-code-coverage` over 15 production file(s)).

Low coverage: WMFTestKitchen/Sources/WMFTestKitchen/Config/SourceConfig.swift · ×8WMFTestKitchen/Sources/WMFTestKitchen/Config/SourceConfig.swift:1

What to do

  1. Resolve the 8 Low coverage finding(s) in Code Coverage — start with SourceConfig.swift, AgentData.swift, PageData.swift. — One of this dimension's main actionable groups (8 warning-level).

Detailed fixes: d8_recommendation.md · top locations in Appendix A, every location in findings.md.

D10 · Test Quality9.9 / 10Stronggated by 21 serious findings✓ Tool-verified

What it measures: Whether the tests truly assert behaviour rather than just running the code.

Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.

Maturity: Documented → Verified → Prevented · effective 9.9 / 10 · rule-coverage 100% · ceiling Prevented

6 skipped, 112 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 2392 tests (1 harness-style project(s) excluded from the assertion penalty).

No assertions: testUndoOnSettingsMakesTheListWhenItIsOutOfDate · ×15WikipediaUnitTests/Code/DiscoverSettingsCoordinatorTests.swift:78
Skipped test: testArticleNonLeadImageCanBeTapped · ×6WikipediaUITests/ArticleControlsUITests.swift:111
No direct assertions: testFirstLaunchShowsOnboardingSmoke · ×97WikipediaUITests/AppOnboardingUITests.swift:7

What to do

  1. Resolve the 97 No direct assertions finding(s) in Test Quality — start with SavedUITests.swift (49), ArticleControlsUITests.swift (21), HomeUITests.swift (9). — One of this dimension's main actionable groups (97 recommendation-level).
  2. Resolve the 15 No assertions finding(s) in Test Quality — start with WMFWatchlistDataControllerTests.swift (3), DiscoverSettingsCoordinatorTests.swift (2), WMFImageDataControllerTests.swift (2). — One of this dimension's main actionable groups (15 warning-level).
  3. Resolve the 6 Skipped test finding(s) in Test Quality — start with ArticleControlsUITests.swift (4), ArticleImageGalleryUITests.swift, WMFBarButtonHostingViewTests.swift. — One of this dimension's main actionable groups (6 warning-level).

Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.

D11 · Test Reliability10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the tests pass reliably, with no flakiness.

Method: Suite re-run N times within tiered wall-clock budgets (unit to e2e); tests failing non-deterministically across runs flagged; guarded tests retried when #if guards detected.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Verified

0 flaky across 1 measured tier(s). Swift (4 packages): measured (0 flaky).

✓ On the Gold path — maintain.

Detailed fixes: d11_recommendation.md.

D12 · Dependency Hygiene9.8 7.4 / 10Strong✓ Tool-verified

What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.

Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.

Maturity: Documented → Verified → Prevented · effective 7.4 / 10 · rule-coverage 75% · ceiling Verified

4 outdated direct SwiftPM dependencies, 0 pinning defect(s). 6 of 8 direct dependencies had their releases listed (0 naming no readable repository, 2 pinned to a branch or a revision rather than a version). SwiftPM has no package registry: a dependency is a repository URL and its releases are that repository's semver tags, so currency is answered by listing tags rather than by querying an index. Only a newer tag on the SAME MAJOR is reported — a `from:` requirement admits everything below the next major and nothing above it, so a major crossing needs a Package.swift edit rather than an update, and naming the update as its remedy would be wrong. Whether any dependency is DEPRECATED or ABANDONED is not graded and cannot be: a repository publishes no such marker, and there is no registry that could carry one. Known CVEs in this dependency graph are D30's question.

Outdated: cocoalumberjack · ×4

Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.

D13 · REDACTED Scanning10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.

Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

REDACTED scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

D14 · License Compliance10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether the licenses of third-party packages are compatible with your policy.

Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Verified

0 of 105 shipped gem(s) use a banned license. Licences were resolved from rubygems.org over the 105 gem(s) a consumer installs — this repository's runtime declarations closed transitively over its committed Gemfile.lock. Development-group and `add_development_dependency` gems are excluded: they are not distributed with this repository. 1 of them publish no licence on rubygems.org; that is missing data, not a violation, and none of them is charged. ★ COVERAGE OF THIS VERDICT: it grades this repository's gem dependencies and nothing else. The repository also declares a Swift Package.swift/Package.resolved, and the licences of those dependencies were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots9.9 / 10Stronggated by 11 serious findings✓ Tool-verified

What it measures: Files that change often and are also complex — the riskiest hotspots.

Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.

Maturity: Documented → Verified → Prevented · effective 9.9 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: WMFData/Sources/WMFData/Data Controllers/Year In Review/WMFYearInReviewDataController.swift (59×35=2065); Wikipedia/Code/WMFAppViewController.swift (62×27=1674); Wikipedia/Code/DonateCoordinator.swift (16×66=1056)

Hotspot: WMFData/Sources/WMFData/Data Controllers/Year In Review/WMFYearInReviewDataController.swift · ×11WMFData/Sources/WMFData/Data Controllers/Year In Review/WMFYearInReviewDataController.swift:243

What to do

  1. Resolve the 11 Hotspot finding(s) in Churn × Complexity Hotspots — start with WMFYearInReviewDataController.swift, WMFAppViewController.swift, DonateCoordinator.swift. — One of this dimension's main actionable groups (11 warning-level).

Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.

D16 · Bus Factor8.1 / 10Strong✓ Tool-verified

What it measures: Whether knowledge is concentrated in too few people (the "bus factor").

Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.

Maturity: Documented → Verified → Prevented · effective 8.1 / 10 · rule-coverage 100% · ceiling Documented

147 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is Wikipedia/Code/YearInReviewSlideViewModelFactory.swift. Counted over 772 of the 1323 production source files in this repository: 548 are under the ~2,400-byte size floor this dimension measures over, and the remaining 3 have no attributable history left to measure.

Off-boarding risk: anonymized user #1 · ×4
Further sole-owners (lower concentration)

What to do

  1. Resolve the 4 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (4 recommendation-level).
  2. Resolve the 1 Further sole-owners (lower concentration) finding(s) in Bus Factor. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.

D17 · Explicit Debt9.9 / 10Stronggated by 44 serious findings✓ Tool-verified

What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.

Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.

Maturity: Documented → Verified → Prevented · effective 9.9 / 10 · rule-coverage 100% · ceiling Prevented

44 deducted task-comment markers across 171557 LoC (0.0/KLoC) → score 9.9. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.

TodoComment · ×42WikipediaUnitTests/Code/YearInReviewSlideViewModelFactoryTests.swift:1171
HackComment · ×2Wikipedia/Code/ArticleViewController.swift:1075

What to do

  1. Resolve the 42 TodoComment finding(s) in Explicit Debt — start with Fetcher.swift (4), ExploreViewController.swift (3), WMFContentGroup+DetailViewControllers.swift (3). — One of this dimension's main actionable groups (42 warning-level).
  2. Resolve the 2 HackComment finding(s) in Explicit Debt — start with ArticleViewController.swift, WMFComponentNavigationController.swift. — One of this dimension's main actionable groups (2 warning-level).

Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.

D20 · ADR Quality0.0 / 10Critical✓ Tool-verified

What it measures: Whether architecture decisions are recorded well (context, decision, consequences).

Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

No architecture decision records were found.

No ADRs foundREDACTED:1

What to do

  1. Resolve the 1 No ADRs found finding(s) in ADR Quality — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d20_recommendation.md · top locations in Appendix A, every location in findings.md.

D21 · Naming Consistency8.9 / 10Strong✓ Tool-verified

What it measures: Whether names — types, methods, variables — are clear and consistent.

Method: Seven vocabulary-free rules (N1-N7) mine each naming convention from the repository and flag a name that breaks a convention its structural peers in the same unit follow; production C# and TypeScript, each its own population. Deterministic, no model, no sample. Advisory.

Maturity: Documented → Verified → Prevented · effective 8.9 / 10 · rule-coverage 100% · ceiling Verified

6 naming inconsistencies among 544 declarations measured against a convention their peers follow.

`httpUrlResponse` spells `Url` where 551 names in the project spell it `URL` · ×4WMF Framework/CacheFetching.swift:97
`learnMoreUrl` spells `Url` where 551 names in the project spell it `URL`Wikipedia/Code/InsertMediaSettingsViewController.swift:195
`pageLoadMeasurementUrlString` spells `Url` where 551 names in the project spell it `URL`Wikipedia/Code/SchemeHandler/SchemeHandler.swift:24

What to do

  1. Resolve the 4 `httpUrlResponse` spells `Url` where 551 names in the project spell it… finding(s) in Naming Consistency — start with CacheFetching.swift, CacheFileWriterHelper.swift, PermanentlyPersistableURLCache.swift. — One of this dimension's main actionable groups (4 recommendation-level).
  2. Resolve the 1 `learnMoreUrl` spells `Url` where 551 names in the project spell it… finding(s) in Naming Consistency — start with InsertMediaSettingsViewController.swift. — One of this dimension's main actionable groups (1 recommendation-level).
  3. Resolve the 1 `pageLoadMeasurementUrlString` spells `Url` where 551 names in the… finding(s) in Naming Consistency — start with SchemeHandler.swift. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d21_recommendation.md · top locations in Appendix A, every location in findings.md.

D26 · Project Cohesion0.0 / 10Critical✓ Tool-verified

What it measures: Whether each project is a focused, coherent unit rather than an oversized grab-bag.

Method: Project size overshoot penalties (LoC / public-type count / namespace count, 2-of-3 flag) weighted by log magnitude. Exhaustive across projects, deterministic.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

3 of 5 build units (Bundler, SwiftPM) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion

What to do

  1. Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.

D27 · Navigability9.6 / 10Exemplary✓ Tool-verified

What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.

Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.

Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.

Maturity: Documented → Verified → Prevented · effective 9.6 / 10 · rule-coverage 100% · ceiling Documented

13 % of calls cross a namespace and 8 % go through an interface, but 100 % of collaborators are co-located — so a call's collaborators sit together and tracing stays easy. Baseline: small — navigation cost is tolerated.

✓ On the Gold path — maintain.

Detailed fixes: d27_recommendation.md.

D28 · Secrets (history)1.0 / 10Critical✓ Tool-verified

What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.

Method: REDACTED scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.

Maturity: Documented → Verified → Prevented · effective 1.0 / 10 · rule-coverage 100% · ceiling Documented

9 finding(s): 0 critical, 9 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.

REDACTED
REDACTED

What to do

  1. Resolve the 9 REDACTED finding(s) in Secrets (history) — start with REDACTED (5), REDACTED (2), REDACTED (2). — One of this dimension's main actionable groups (9 issue-level).
  2. Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.

D29 · Static Analysis (SAST)0.8 / 10Critical✓ Tool-verified

What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.

Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.

Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).

Maturity: Documented → Verified → Prevented · effective 0.8 / 10 · rule-coverage 100% · ceiling Documented

48 finding(s): 0 critical, 40 high, 4 medium, 4 low. 27 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 8 file(s) — `WMF Framework/Third Party/EXTScope.h`, `WMFData/Sources/WMFData/Data Controllers/Games/WMFGamesDataController.swift` (line 341, line 342, line 345, …), `WMFData/Tests/WMFDataTests/WMFFundraisingCampaignDataControllerTests.swift` (line 24, line 25, line 27, …), `Wikipedia/Code/ExploreViewController.swift` (line 254, line 740), `Wikipedia/Code/PlacesViewController.swift` (line 2298), … (+3 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 14 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

+ 2 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 6 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (6 issue-level).
  2. Resolve the 5 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (5 issue-level).
  3. Resolve the 1 REDACTED finding(s) charged to Static Analysis (SAST) — the other 27 are reported here at file:line but scored by D36 (supply-chain provenance), which charges them once. — One of this dimension's main actionable groups (28 issue-level, 1 of them charged here).

Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.

D30 · Dependency Vulnerabilities10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.

Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

No known-vulnerable dependencies in any ecosystem this repository declares.

✓ On the Gold path — maintain.

Detailed fixes: d30_recommendation.md.

D34 · Knowledge Freshness9.4 / 10Adequategated by 1 critical finding✓ Tool-verified

What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.

Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.

Maturity: Documented → Verified → Prevented · effective 9.4 / 10 · rule-coverage 100% · ceiling Documented

47 of 775 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is Wikipedia/Code/NotificationsCenterCell.swift. Counted over 775 of the 1323 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned knowledgeWikipedia/Code/NotificationsCenterCell.swift:1
Orphaned file · ×46Widgets/Widgets/OnThisDayWidget.swift:1
Further orphaned files (smaller)

What to do

  1. Resolve the 1 Orphaned knowledge finding(s) in Knowledge Freshness — start with NotificationsCenterCell.swift. — One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 46 Orphaned file finding(s) in Knowledge Freshness — start with OnThisDayWidget.swift, PageHistoryCollectionViewCell.swift, ColumnarCollectionViewLayout.swift. — One of this dimension's main actionable groups (46 recommendation-level).
  3. Resolve the 1 Further orphaned files (smaller) finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.

D35 · Change Coupling9.6 / 10Adequategated by 9 critical findings✓ Tool-verified

What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.

Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.

Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.

Maturity: Documented → Verified → Prevented · effective 9.6 / 10 · rule-coverage 100% · ceiling Documented

Strongest change-coupling: ArticleViewController+ArticlePreviewing.swift↔ColumnarCollectionViewController.swift 75%; WMFCommunityFeedView.swift↔WMFHomeViewModel.swift 73%; WMFDeveloperSettingsView.swift↔WMFDeveloperSettingsDataController.swift 68%

Boundary-crossing change coupling: WMFDeveloperSettingsView.swift ↔ WMFDeveloperSettingsDataController.swift · ×9WMFComponents/Sources/WMFComponents/Components/Developer Settings/WMFDeveloperSettingsView.swift:1
Change coupling: WMFCommunityFeedView.swift ↔ WMFHomeViewModel.swift · ×11WMFComponents/Sources/WMFComponents/Components/Home/WMFCommunityFeedView.swift:1
Change-coupling hub: ArticleViewController+ArticlePreviewing.swift → ColumnarCollectionViewController.swift, ExploreCardViewController.swift, TabsOverviewCoordinator.swift · ×2Wikipedia/Code/ArticleViewController+ArticlePreviewing.swift

What to do

  1. Resolve the 9 Boundary-crossing change coupling finding(s) in Change Coupling — start with WMFDeveloperSettingsView.swift (2), WMFYearInReviewSlideView.swift, WMFTempAccountsSheetView.swift. — One of this dimension's main actionable groups (9 issue-level).
  2. Resolve the 11 Change coupling finding(s) in Change Coupling — start with WMFRiveAnimationViewModel.swift (2), WMFCommunityFeedView.swift, ExploreViewController.swift. — One of this dimension's main actionable groups (11 warning-level).
  3. Resolve the 2 Change-coupling hub finding(s) in Change Coupling — start with ArticleViewController+ArticlePreviewing.swift, InsertLinkViewController.swift. — One of this dimension's main actionable groups (2 warning-level).

Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.

D36 · Supply-chain Provenance & Signing0.0 / 10Critical✓ Tool-verified

What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.

Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

0/4 supply-chain integrity signals present (provenance, signing, SBOM, pinned actions).

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

+ 4 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 5 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (5 warning-level).
  2. Resolve the 5 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (5 warning-level).
  3. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).

Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.

D37 · Vulnerability-disclosure Policy10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.

Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

A vulnerability-disclosure policy (SECURITY) is published with a reporting contact.

✓ On the Gold path — maintain.

Detailed fixes: d37_recommendation.md.

D43 · Malicious Dependencies10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.

Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

No dependency in any ecosystem this repository declares is published as malicious.

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

D44 · Platform End-of-Life10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.

Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 1 platform declaration(s) and 1 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

R = React/JS · M = Maturity · P = Readiness.

AC1 · Text alternatives1.0 / 10Critical✓ Tool-verified

Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.

Coverage: Population: image/media elements — img, area, input[type=image], svg, video, object, embed, canvas — across the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and dynamic-attribute elements are skipped. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is NOT read by any producer, so it contributes no element to this population; where such a frontend is present the card discloses it as an analyzer gap rather than scoring around it.

  • An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative. (×2) — Wikipedia/assets/about.html:96, Wikipedia/assets/about.html:97

What to do

  • Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
AC3 · Page structure2.0 / 10Critical✓ Tool-verified

Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.

Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en"). (×2) — Wikipedia/Code/WMFRandomDiceButton.html:6, Wikipedia/assets/about.html:2
  • A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>. (×2) — Wikipedia/Code/WMFRandomDiceButton.html:6, Wikipedia/assets/about.html:2
  • user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta. (×2) — Wikipedia/Code/WMFRandomDiceButton.html:8, Wikipedia/assets/about.html:6
  • No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. — Wikipedia/assets/about.html:2
  • A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope). — Wikipedia/assets/about.html:94

What to do

  • Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
AC6 · Visual & motion safety10.0 / 10Exemplary○ Nothing flagged

Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.

Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.

Coverage: Population: styled elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx), plus in-repo <style> blocks, in-repo .css files and CSS-in-JS literals. Colour contrast is computed from LITERAL colour pairs only (hex/rgb/hsl/named, including var() tokens and Tailwind neutral utilities) — computed, runtime-themed and external-CDN colour is never resolved, so this is a partial read of contrast by construction. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

AX10 · Code composition10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.

Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.

Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.

AX3 · Project dependency cycles10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).

Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.

AX4 · Dependency direction10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.

Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.

AX8 · Test isolation7.5 / 10Strong✓ Tool-verified

Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.

Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.

  • `WMFComponents` (production) references the test project `WMFDataMocks`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.

What to do

  • Remove every production → test project reference: extract any shared test helper into a production support library (which the tests reference), or invert the dependency so the test project depends on production — not the reverse.
AX9 · CQS / query purity10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether read (query) handlers stay side-effect-free — a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.

Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.

Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set — a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.

  • `WMFDiscoverReadingListDataController.fetchAndPersistList` is a read-named query yet it performs a durable write on the read path (a persist to a store/client). A query must stay side-effect-free so reads are safe to retry, cache, and route to a read replica; move the write into a command. — WMFData/Sources/WMFData/Data Controllers/Discover/WMFDiscoverReadingListDataController.swift:351

What to do

  • Keep query handlers read-only — move the writes/event-publishes into a command handler so reads stay safe to retry, cache, and route to a read replica.
DM2 · Strongly-typed ids9.1 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether domain identifiers are strongly typed (a typed-id struct) rather than raw primitives — consistency once an idiom exists.

Method: Roslyn (DDD-gated): strongly-typed id adoption on domain entities/events; raw Guid/int/string ids counted versus wrapped types. An id wrapper is recognised by VALUE SEMANTICS, not by being a struct — a record struct, a record class (`record ApartmentId(Guid Value)`) or a class declared by a typed-id base (`class MemberId : TypedIdValueBase`) all count, while a plain mutable class (reference equality) and a verb-phrase query record (`GetCustomerById`) do not. Deterministic, adoption percentage.

Coverage: Population: id-like members by *Id/*Key NAME suffix; strongly-typed-ID shape then checked semantically — non-suffixed identifiers are not seen.

  • `LanguageItem.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — WMFComponents/Sources/WMFComponents/Components/App Onboarding/WMFAppOnboardingViewModel.swift:28
  • `TriggerOption.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — WMFComponents/Sources/WMFComponents/Components/Donation Reminder/WMFDonationReminderSetupViewModel.swift:35
  • `VisiblePage.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — WMFComponents/Sources/WMFComponents/Components/Home/WMFForYouView.swift:159
  • `TopReadItem.projectID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — WMFComponents/Sources/WMFComponents/Components/Home/WMFHomeCommunityViewModel.swift:28
  • `OnThisDayItem.projectID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — WMFComponents/Sources/WMFComponents/Components/Home/WMFHomeCommunityViewModel.swift:43
  • `ProfileListItem.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — WMFComponents/Sources/WMFComponents/Components/Profile/WMFProfileViewModel.swift:73
  • `ProfileSection.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — WMFComponents/Sources/WMFComponents/Components/Profile/WMFProfileViewModel.swift:86
  • `SettingsItem.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — WMFComponents/Sources/WMFComponents/Components/Settings/WMFSettingsViewModel.swift:15
  • `SettingsSection.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — WMFComponents/Sources/WMFComponents/Components/Settings/WMFSettingsViewModel.swift:47
  • `Card.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — WMFComponents/Sources/WMFComponents/Components/Year in Review/WMFYearInReviewEndViewModel.swift:16
  • `WMFYearInReviewPageRequest.pageID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — WMFComponents/Sources/WMFComponents/Components/Year in Review/WMFYearInReviewView.swift:214
  • `WMFYearInReviewPageObserver.dragLockPageID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — WMFComponents/Sources/WMFComponents/Components/Year in Review/WMFYearInReviewView.swift:229
  • `ObserverView.dragLockPageID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — WMFComponents/Sources/WMFComponents/Components/Year in Review/WMFYearInReviewView.swift:254
  • `ObserverView.lastSlideID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — WMFComponents/Sources/WMFComponents/Components/Year in Review/WMFYearInReviewView.swift:259
  • `Article.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — WMFComponents/Sources/WMFComponents/Components/Saved/Create Reading List/WMFCreateReadingListViewModel.swift:17
  • `RecentSearchTerm.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — WMFComponents/Sources/WMFComponents/Components/Search/Recently Searched/WMFRecentlySearchedViewModel.swift:29
  • `SearchResult.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — WMFComponents/Sources/WMFComponents/Components/Search/Results/WMFSearchResultsViewModel.swift:53
  • `MenuItem.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — WMFComponents/Sources/WMFComponents/Components/Shared/Buttons/WMFSmallMenuButton.swift:16
  • `Slide.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — WMFComponents/Sources/WMFComponents/Components/Shared/Slideshow/WMFSlideshowViewModel.swift:44
  • `Tip1.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — WMFComponents/Sources/WMFComponents/Components/Suggested Edits/Image Recommendations/WMFImageRecommendationsViewController.swift:491
  • `Tip2.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — WMFComponents/Sources/WMFComponents/Components/Suggested Edits/Image Recommendations/WMFImageRecommendationsViewController.swift:515
  • `Tip3.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — WMFComponents/Sources/WMFComponents/Components/Suggested Edits/Image Recommendations/WMFImageRecommendationsViewController.swift:539
  • `WMFImageRecommendationData.pageId` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — WMFComponents/Sources/WMFComponents/Components/Suggested Edits/Image Recommendations/WMFImageRecommendationsViewModel.swift:96
  • `WMFOnThisDayCardEvent.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — WMFComponents/Sources/WMFComponents/Components/Games/Which Came First/Core/Cards/WMFWhichCameFirstCardViewModel.swift:67
  • `SearchRow.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — WMFComponents/Sources/WMFComponents/Components/Settings/Home/For You/Whats Driving/Your Interests/WMFHomeFeedInterestsSettingsViewModel.swift:9
  • `WMFActivityTabDataController.sharedGroupID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — WMFData/Sources/WMFData/Data Controllers/Activity Tab/WMFActivityTabDataController.swift:221
  • `TimelineItem.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — WMFData/Sources/WMFData/Data Controllers/Activity Tab/WMFActivityTabDataController.swift:486
  • `TimelineItem.projectID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — WMFData/Sources/WMFData/Data Controllers/Activity Tab/WMFActivityTabDataController.swift:489
  • `TimelineItem.namespaceID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — WMFData/Sources/WMFData/Data Controllers/Activity Tab/WMFActivityTabDataController.swift:495
  • `TimelineItem.revisionID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — WMFData/Sources/WMFData/Data Controllers/Activity Tab/WMFActivityTabDataController.swift:498
  • `TimelineItem.parentRevisionID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — WMFData/Sources/WMFData/Data Controllers/Activity Tab/WMFActivityTabDataController.swift:499
  • `WMFInspectedAnalyticsEvent.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — WMFData/Sources/WMFData/Data Controllers/Developer Settings/WMFAnalyticsEventInspectorDataController.swift:17
  • `WMFDonationReminderDataController.experimentCampaignID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — WMFData/Sources/WMFData/Data Controllers/Donor Experience/WMFDonationReminderDataController.swift:100
  • `FundraisingCampaignConfig.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — WMFData/Sources/WMFData/Data Controllers/Donor Experience/WMFFundraisingCampaignDataController.swift:562
  • `Asset.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — WMFData/Sources/WMFData/Data Controllers/Donor Experience/WMFFundraisingCampaignDataController.swift:545
  • `WMFFundraisingCampaignPromptState.campaignID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — WMFData/Sources/WMFData/Data Controllers/Donor Experience/WMFFundraisingCampaignDataController.swift:629
  • `HistoryRecord.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — WMFData/Sources/WMFData/Data Controllers/History /WMFHistoryDataController.swift:5
  • `HistoryItem.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — WMFData/Sources/WMFData/Data Controllers/History /WMFHistoryDataController.swift:153
  • `TopicWaiter.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — WMFData/Sources/WMFData/Data Controllers/Home/WMFHomeDataController.swift:339
  • `WMFSavedArticle.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — WMFData/Sources/WMFData/Data Controllers/Legacy Reading Lists/WMFLegacyReadingListsModels.swift:32

What to do

  • Adopt the repo's typed-id idiom consistently — wrap every entity identity in its own typed id.
DM4 · Rich vs anemic domain model7.9 / 10Strong✓ Tool-verified

Other · Domain Modelling — Whether domain entities own their behaviour — a data-only reference entity whose logic lives in a foreign service is anemic. Rich models enforce their own invariants.

Method: Roslyn (DDD-gated): entity method BODIES classified mutator-vs-query — only methods that mutate the entity's own declared state count as invariant-protecting behaviour, so a getter/passthrough doesn't rescue an anemic class. Deterministic, exhaustive over domain-layer entities.

Coverage: Population: entities by name/base convention; rich-vs-anemic judged by classifying each method body mutator-vs-query — logic-bearing domain types outside the convention are invisible.

  • `InsertMediaSearchResult` is a data-only reference entity whose behaviour is DELEGATED to a foreign utility (static methods that take it as their first parameter and hold its logic) — the anemic domain model. Move the behaviour onto the entity so it enforces its own invariants rather than being driven from outside. — Wikipedia/Code/InsertMediaSearchResultsCollectionViewController.swift:55
  • `URLRequest` is a data-only reference entity whose behaviour is DELEGATED to a foreign utility (static methods that take it as their first parameter and hold its logic) — the anemic domain model. Move the behaviour onto the entity so it enforces its own invariants rather than being driven from outside. — WMF Framework/PermanentlyPersistableURLCache.swift:683

What to do

  • Move delegated behaviour onto the domain entity (or make it a value object); keep invariants inside the type.
DM5 · Encapsulated state10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether a reference entity protects its own invariants — a class whose identity is a computed content hash but whose hashed fields are publicly mutable bypasses that invariant. Encapsulated state keeps identity-bearing fields immutable.

Method: Roslyn (DDD-gated): entities scanned for publicly writable state — public setters, and (C#/VB) own mutable collections handed out through an auto-property, a public field or a bare-field expression getter, where a computed/copying getter is never charged. One finding per entity; score softened when Marten/EF rehydration frameworks present. Deterministic, framework-aware.

Coverage: Population: entities by convention; encapsulation (setter shape) checked exhaustively within the set.

DM6 · Domain ↔ infrastructure boundary10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether the domain layer stays free of infrastructure dependencies — a domain entity fused to a persistence ORM on its own declaration (active-record), or reaching a web-framework transport type in its own method, couples the domain to infrastructure. The clean-architecture dependency rule.

Method: Roslyn (DDD-gated): domain-layer types scanned for infrastructure usage in member SIGNATURES and inside method/accessor BODIES — resolved calls and object-creations into EF/Marten/HTTP/Mongo/Redis/message-bus types (not just a namespace allowlist). Deterministic, symbol-resolved, exhaustive over domain-layer bodies, DDD-native.

Coverage: Domain layer identified by NAMESPACE heuristic; infrastructure then resolved by symbol in member SIGNATURES and method/accessor BODIES — rename the layer and the check evaporates.

M1 · Documentation (README)9.0 / 10Exemplary✓ Tool-verified

Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.

Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.

M2 · Architecture documentation2.0 / 10Critical✓ Tool-verified

Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.

Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.

  • No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.

What to do

  • Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.

Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.

M4 · Documentation accuracy10.0 / 10Exemplary○ Nothing flagged

Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.

Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.

P1 · CI/CD gates10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — Whether an automated pipeline builds and tests every change.

Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.

P10 · Library API & versioning10.0 / 10Exemplary✓ Tool-verified

Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.

Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.

  • 1 public type in `WMFTestKitchen~WMFTestKitchen` is marked as implementation by its own namespace, folder or name: `InstrumentImpl` (WMFTestKitchen/Sources/WMFTestKitchen/Instrument/InstrumentImpl.swift:3, name ends in `Impl`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers. — WMFTestKitchen/Sources/WMFTestKitchen/Instrument/InstrumentImpl.swift:3

What to do

  • Hide `WMFTestKitchen~WMFTestKitchen` (`InstrumentImpl`) (Swift: leave it `internal` (the default) instead of `public`): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
P2 · Observability7.0 / 10Strong✓ Tool-verified

Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.

Method: Filesystem/Roslyn scan: structured-logging frameworks (Serilog, NLog), OpenTelemetry, and health-check endpoint patterns. Exhaustive, deterministic.

P3 · Security & performance tooling0.0 / 10Critical✓ Tool-verified

Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).

Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.

  • No static application security testing detected. For this repository's stack, add CodeQL's Swift pack (Swift/Xcode) (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 21 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner. — REDACTED:4

What to do

  • Add a SAST step to CI running what this repository's stack ships: CodeQL's Swift pack (Swift/Xcode) — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
  • Enable Dependabot/Renovate or a dependency-review gate.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback7.0 / 10Strong✓ Tool-verified

Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.

Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.

P6 · Release Hygiene5.0 / 10Adequate✓ Tool-verified

Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.

Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.

  • No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)

What to do

  • Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
PF3 · Async & latency hygiene8.5 / 10Strong✓ Tool-verified

Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.

Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from each language's code model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.

  • `sleep` is async and calls sleep — a blocking call inside async code stalls the cooperative pool's thread — one per core — and every task scheduled on it for as long as it runs. — WMFComponents/Sources/WMFComponents/Components/App Onboarding/WMFAppOnboardingViewModel.swift:237

What to do

  • Swift: await instead of blocking — `try await Task.sleep(for:)` for Thread.sleep/sleep, a checked continuation instead of a DispatchSemaphore or DispatchGroup wait, the async Process and URLSession APIs; never park a thread waiting on a Task — the cooperative pool cannot guarantee it progress.
X26 · Unsynchronised callback handoff10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a value handed from a callback to the body that waits on it crosses on something built to be crossed — a `Queue<T>`/`List<T>`/`Dictionary<K,V>` written inside an event handler and read back outside it is mutated by two flows at once, and the semaphore or completion source beside it orders how MANY items exist while leaving the collection's own head, tail and backing array unprotected.

Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it — and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. On a repository with no .NET source the same handoff is read in Java off the engine’s own token stream (test source sets, vendored and demonstration paths not): an `ArrayList`/`LinkedList`/`ArrayDeque`/`PriorityQueue`/`Hash*`/`LinkedHash*`/`Tree*` local and a `CountDownLatch`/`Semaphore`/`CompletableFuture` local, a lambda or anonymous class that raises the primitive and mutates the collection, and a wait outside it; any `synchronized` or `lock()` abstains the body. Because each of those primitives orders what the callback wrote before raising it, only a touch that provably overlaps the callback is convicted: one after the registration and before the next wait, or one in a loop registered-before, waiting on every pass and not declaring the collection. Deterministic, provable per finding. Advisory.

X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.

Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.

X3 · Exception handling6.1 / 10Adequate✓ Tool-verified

Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.

Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.

  • `catch _` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — Wikipedia/Code/UIViewController+Extensions.swift:25
  • `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×16) — Wikipedia/Code/WMFAccountCreationViewController.swift:227, Wikipedia/Code/WMFKeychainCredentials.swift:19, Wikipedia/Code/WMFKeychainCredentials.swift:36, …
  • An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×7) — WMFComponents/Sources/WMFComponents/Components/Settings/Home/For You/Whats Driving/Your Interests/WMFHomeFeedInterestsSettingsViewModel.swift:338, WMFComponents/Sources/WMFComponents/Components/Settings/Home/For You/Whats Driving/Your Interests/WMFHomeFeedInterestsSettingsViewModel.swift:385, WMFComponents/Sources/WMFComponents/Components/Games/Which Came First/Results/Articles View/WMFWhichCameFirstArticlesViewModel.swift:59, …

What to do

  • Swallowed exception (caught, then discarded)
X5 · Nullable reference types2.0 / 10Critical✓ Tool-verified

Other · Code Health — Whether Ruby's type checker checks nil and is not undermined by assertions — a file Sorbet reads at `# typed: true` or above, or a Steep target `check`s under its default or strict diagnostics, is one where a method call on a `T.nilable(String)` / `String?` is an error, and each `T.must`, `#: as !nil` or `# steep:ignore NoMethod` is the author telling the checker a value cannot be nil.

Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.

  • This repository commits no Sorbet configuration (`sorbet/config`) and no `Steepfile`, so nothing type-checks its 1 Ruby product file(s): a nilable value reaches a method call silently and raises `NoMethodError: undefined method … for nil` the first time it is nil. A `# typed:` sigil does nothing without a `sorbet/config` beside the code; a Steep run configured only on a command line is not something this check can read.

What to do

  • Adopt a checker and raise it file by file: with Sorbet, `srb init` (or `bundle exec tapioca init`) commits `sorbet/config`, then move each file's sigil from `# typed: false` to `# typed: true` and on to `strict` as its methods get `sig`s — `spoom bump` does the moving; with Steep, write RBS signatures and `check` the product directories in the `Steepfile` under `D::Ruby.default` or `strict`, not `lenient`. Then pay down the assertions rather than adding to them: each `T.must` is a nil the checker could not rule out — narrow it (`return unless x`, `x&.`, `if (y = x)`), make the attribute non-nilable and set it in `initialize`, or change the method so the nil cannot arrive.

WCAG coverage — what static analysis assessed

Statically assessed 11 of 55 WCAG 2.2 Level A/AA success criteria (20%; ≈22% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 44 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).

DimensionWCAG 2.2 A/AA criteriaCoverage
AC1 · Text alternatives1.1.1, 1.2.2, 1.2.5Partial signal
AC3 · Page structure1.4.4, 2.2.1, 2.4.1, 2.4.2, 3.1.1, 4.1.2Partial signal
AC6 · Visual & motion safety1.4.3, 2.4.7Partial — literal CSS only

Not statically assessed — these 44 Level A/AA criteria need runtime or manual evaluation (WCAG-EM): 1.2.1, 1.2.3, 1.2.4, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.4.1, 1.4.2, 1.4.5, 1.4.10, 1.4.11, 1.4.12, 1.4.13, 2.1.1, 2.1.2, 2.1.4, 2.2.2, 2.3.1, 2.4.3, 2.4.4, 2.4.5, 2.4.6, 2.4.11, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.5.7, 2.5.8, 3.1.2, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.6, 3.3.1, 3.3.2, 3.3.3, 3.3.4, 3.3.7, 3.3.8, 4.1.3.

Reference — by lens

The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.

LensScoreRatingImpact
Code Health53%Adequate — gated by X5Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture84%Adequate — gated by D26Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity70%Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness52%Adequate — gated by P3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security44%Weak — gated by D28, D29, D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Domain Modelling90%StrongStrongest area.
Accessibility35%Weak — gated by AC1, AC3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance85%StrongSolid.
Unscored — 2 check(s) recorded observations but carry no score

These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.

  • X10 Duplicated predicate — 20 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 14 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 2 control(s) we could not find positive evidence for

These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.

  • C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 63 check(s) not relevant to this codebase

These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.

  • AC2 Forms & labels — No form control/button found in the parsed markup — AC2 not applicable here.
  • AC4 Keyboard semantics — No interactive element found in the parsed markup — AC4 not applicable here.
  • AC5 ARIA correctness — No ARIA usage found in the parsed markup — AC5 not applicable here.
  • AX1 Captive dependencies — Not applicable: this repository's JavaScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's Ruby imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's Swift imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
  • AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No class in this Ruby code is a Rails controller, a Sinatra, Grape or Roda app, a Hanami action or a Rack app (an instance `call(env)`), so no request handler shares state between request threads. No Swift request handler (a Vapor, Hummingbird, Kitura, Swifter or Perfect route handler, as a method or a registered closure) is declared, so no state is shared between request threads. PHP builds its object graph per request and shares none of it between requests. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX6 Interface segregation — no class or module declares an abstract method
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AXB1 Runtime evidence locked — no reproducible boot — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C4 Data Retention — No personal data detected in a persisted data model — no PII-named property (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a SwiftData @Model, a Core Data, Realm, GRDB or Fluent type, a GRDB or SQLite.swift column, or in a SQL CREATE TABLE or ALTER TABLE — and no database or data-store client (CoreData, SwiftData, GRDB, RealmSwift, SQLite, Firebase, …) imported either, so this repository keeps no personal data whose lifetime a retention limit would bound.
  • C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named property (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a SwiftData @Model, a Core Data, Realm, GRDB or Fluent type, a GRDB or SQLite.swift column, or in a SQL CREATE TABLE or ALTER TABLE — and no database or data-store client (CoreData, SwiftData, GRDB, RealmSwift, SQLite, Firebase, …) imported either, so this repository keeps no personal data for a data subject to erase, export or consent over.
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D19 Documentation Quality — No runnable or published unit to look for an example in, and no multi-project root README to look for a map in; the other documentation kinds are withheld (see the gaps), so documentation quality is not applicable here.
  • D22 Internal API Consistency — API consistency is measured on C# only; the exposed Swift surface was not measured.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only; comments in this repository's .php, .rb, .swift source were not judged.
  • D25 ADR Conformance — no ADRs to check
  • D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
  • D32 Data Compliance (PII/GDPR) — 53 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • DM1 Aggregate boundaries — not scored for Swift: the sidecar flattens array/collection types (a child COLLECTION = legitimate membership vs a single embedded aggregate is indistinguishable), and aggregate-vs-value-object classification cannot be told apart in source (every struct-holding-struct reads alike) — reported as guidance rather than measured
  • DM3 Integration-event coupling — not scored for Swift: a cross-SwiftPM-target domain leak cannot be told apart in source from a legitimate shared-kernel/contracts module, and most repositories ship a single module — reported as guidance rather than measured
  • DM7 Repository granularity — not scored for Swift: 'a repository per CHILD entity' needs the aggregate-root structure, which is not source-resolvable — reported as guidance rather than measured
  • ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and this analysis resolves a call's owner only where the receiver's type is written down in the source. Reported as guidance rather than measured
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the JavaScript/TypeScript, Ruby, Swift source, so there is no service whose uptime a failing dependency could take down
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — coverage data present for 15 file(s), but no domain-layer files were identified: no covered file's path contains any of the markers this check keys on (/domain/, /aggregates/, /valueobjects/, /domainmodel/, .domain/, /entities/), which are matched case-insensitively anywhere in the path. With no domain partition there is nothing to compare the web/controller layer against — if this repository keeps its business rules under a folder named none of those, that naming is what the check cannot see, not the domain logic.
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for `Benchmark("…")` in a file importing package-benchmark, or package-benchmark in Package.swift, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
  • PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
  • S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • X1 Async correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X12 Unreachable branch — X12 reached only 0% of this repository's production lines — swift (170,860 lines), objectivec (14,326 lines), c (4,458 lines), php (206 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X16 Unfloored truncation loop — X16 reached only 1% of this repository's production lines — swift (170,860 lines), objectivec (14,326 lines), c (4,458 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X17 Uncapped recursion over a caller-supplied document — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X18 Disposal-pattern correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X2 Cancellation propagation — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X21 Side-effecting pattern guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X24 Document value interpolated into markup unescaped — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X25 Inert configuration knob — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X27 Collection changed while being enumerated — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X29 Per-element action decided by a fixed element — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X30 Support guard that admits what it rejects — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X4 Structured logging — This check asks whether log calls keep a message's values apart from its text, which needs a logger that can carry them as fields. This repository's Ruby was read, and it logs through none: the standard library's Logger, which Rails.logger is, takes one finished message and no template arguments or fields (as log4net does in C#), so an interpolated message there loses nothing the API could have kept. The console gem (`Console.info`), SemanticLogger, Ougai and dry-logger would be judged.
  • X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.

Critical — 111 finding(s)
DM2 · Strongly-typed ids · Raw-primitive id despite a typed-id idiom · ×40
  • Raw-primitive id despite a typed-id idiom: LanguageItem.id WMFComponents/Sources/WMFComponents/Components/App Onboarding/WMFAppOnboardingViewModel.swift:28 — `LanguageItem.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: TriggerOption.id WMFComponents/Sources/WMFComponents/Components/Donation Reminder/WMFDonationReminderSetupViewModel.swift:35 — `TriggerOption.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: VisiblePage.id WMFComponents/Sources/WMFComponents/Components/Home/WMFForYouView.swift:159 — `VisiblePage.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: TopReadItem.projectID WMFComponents/Sources/WMFComponents/Components/Home/WMFHomeCommunityViewModel.swift:28 — `TopReadItem.projectID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: OnThisDayItem.projectID WMFComponents/Sources/WMFComponents/Components/Home/WMFHomeCommunityViewModel.swift:43 — `OnThisDayItem.projectID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: ProfileListItem.id WMFComponents/Sources/WMFComponents/Components/Profile/WMFProfileViewModel.swift:73 — `ProfileListItem.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: ProfileSection.id WMFComponents/Sources/WMFComponents/Components/Profile/WMFProfileViewModel.swift:86 — `ProfileSection.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: SettingsItem.id WMFComponents/Sources/WMFComponents/Components/Settings/WMFSettingsViewModel.swift:15 — `SettingsItem.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: SettingsSection.id WMFComponents/Sources/WMFComponents/Components/Settings/WMFSettingsViewModel.swift:47 — `SettingsSection.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: Card.id WMFComponents/Sources/WMFComponents/Components/Year in Review/WMFYearInReviewEndViewModel.swift:16 — `Card.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: WMFYearInReviewPageRequest.pageID WMFComponents/Sources/WMFComponents/Components/Year in Review/WMFYearInReviewView.swift:214 — `WMFYearInReviewPageRequest.pageID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: WMFYearInReviewPageObserver.dragLockPageID WMFComponents/Sources/WMFComponents/Components/Year in Review/WMFYearInReviewView.swift:229 — `WMFYearInReviewPageObserver.dragLockPageID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: ObserverView.dragLockPageID WMFComponents/Sources/WMFComponents/Components/Year in Review/WMFYearInReviewView.swift:254 — `ObserverView.dragLockPageID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: ObserverView.lastSlideID WMFComponents/Sources/WMFComponents/Components/Year in Review/WMFYearInReviewView.swift:259 — `ObserverView.lastSlideID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: Article.id WMFComponents/Sources/WMFComponents/Components/Saved/Create Reading List/WMFCreateReadingListViewModel.swift:17 — `Article.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: RecentSearchTerm.id WMFComponents/Sources/WMFComponents/Components/Search/Recently Searched/WMFRecentlySearchedViewModel.swift:29 — `RecentSearchTerm.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: SearchResult.id WMFComponents/Sources/WMFComponents/Components/Search/Results/WMFSearchResultsViewModel.swift:53 — `SearchResult.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: MenuItem.id WMFComponents/Sources/WMFComponents/Components/Shared/Buttons/WMFSmallMenuButton.swift:16 — `MenuItem.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: Slide.id WMFComponents/Sources/WMFComponents/Components/Shared/Slideshow/WMFSlideshowViewModel.swift:44 — `Slide.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: Tip1.id WMFComponents/Sources/WMFComponents/Components/Suggested Edits/Image Recommendations/WMFImageRecommendationsViewController.swift:491 — `Tip1.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: Tip2.id WMFComponents/Sources/WMFComponents/Components/Suggested Edits/Image Recommendations/WMFImageRecommendationsViewController.swift:515 — `Tip2.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: Tip3.id WMFComponents/Sources/WMFComponents/Components/Suggested Edits/Image Recommendations/WMFImageRecommendationsViewController.swift:539 — `Tip3.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: WMFImageRecommendationData.pageId WMFComponents/Sources/WMFComponents/Components/Suggested Edits/Image Recommendations/WMFImageRecommendationsViewModel.swift:96 — `WMFImageRecommendationData.pageId` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: WMFOnThisDayCardEvent.id WMFComponents/Sources/WMFComponents/Components/Games/Which Came First/Core/Cards/WMFWhichCameFirstCardViewModel.swift:67 — `WMFOnThisDayCardEvent.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: SearchRow.id WMFComponents/Sources/WMFComponents/Components/Settings/Home/For You/Whats Driving/Your Interests/WMFHomeFeedInterestsSettingsViewModel.swift:9 — `SearchRow.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • + 15 more in this group — see findings.md.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 3 more in this group — see findings.md.
D28 · Secrets (history) · REDACTED · ×9
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D35 · Change Coupling · Boundary-crossing change coupling · ×9
  • Boundary-crossing change coupling: WMFDeveloperSettingsView.swift ↔ WMFDeveloperSettingsDataController.swift WMFComponents/Sources/WMFComponents/Components/Developer Settings/WMFDeveloperSettingsView.swift:1 — `WMFComponents/Sources/WMFComponents/Components/Developer Settings/WMFDeveloperSettingsView.swift` (context WMFComponents) and `WMFData/Sources/WMFData/Data Controllers/Developer Settings/WMFDeveloperSettingsDataController.swift` (context WMFData) sit in DIFFERENT parts of the tree yet change together 68% of the time (32 of the 47 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 32 shared commits counted here, the most recent 3 are `d76923ba` Adding remote config for discover - percentage coming from config as …; `91d9f81f` Add the Discover data controller, experiment and developer settings; `cf19ac4b` Decide the Year in Review experience from the slides with data — run `git show` on any of them.
  • Boundary-crossing change coupling: WMFYearInReviewSlideView.swift ↔ YearInReviewSlideViewModelFactory.swift WMFComponents/Sources/WMFComponents/Components/Year in Review/WMFYearInReviewSlideView.swift:1 — `WMFComponents/Sources/WMFComponents/Components/Year in Review/WMFYearInReviewSlideView.swift` (context WMFComponents) and `Wikipedia/Code/YearInReviewSlideViewModelFactory.swift` (context Wikipedia) sit in DIFFERENT parts of the tree yet change together 64% of the time (16 of the 25 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 16 shared commits counted here, the most recent 3 are `52c39cd6` Show the YiR rabbit hole answer with a VoiceOver double tap; `285e00f7` Move the YiR pager one slide for each VoiceOver three-finger scroll; `43ae1ee6` Remove WMFRiveTextFit — run `git show` on any of them.
  • Boundary-crossing change coupling: WMFTempAccountsSheetView.swift ↔ EditorViewController.swift WMFComponents/Sources/WMFComponents/Components/Temp Accounts/WMFTempAccountsSheetView.swift:1 — `WMFComponents/Sources/WMFComponents/Components/Temp Accounts/WMFTempAccountsSheetView.swift` (context WMFComponents) and `Wikipedia/Code/EditorViewController.swift` (context Wikipedia) sit in DIFFERENT parts of the tree yet change together 62% of the time (8 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `549364a3` Sheet buttons, profile view model fix; `7a5ff8a7` Move editor presentation logic, remove unused variable; `42fd1af8` PR fixes — run `git show` on any of them.
  • Boundary-crossing change coupling: WMFDonateViewController.swift ↔ SinglePageWebViewController.swift WMFComponents/Sources/WMFComponents/Components/Donate Form/WMFDonateViewController.swift:1 — `WMFComponents/Sources/WMFComponents/Components/Donate Form/WMFDonateViewController.swift` (context WMFComponents) and `Wikipedia/Code/SinglePageWebViewController.swift` (context Wikipedia) sit in DIFFERENT parts of the tree yet change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `0fe227e5` Fix iPad contributions bar configuration; `0562adf0` Progress with reworking cancel and done buttons; `ca67d258` Updates the cancel action to use cancel text, keep it on the leading … — run `git show` on any of them.
  • Boundary-crossing change coupling: WMFDeveloperSettingsViewModel.swift ↔ WMFMockDeveloperSettingsDataController.swift WMFComponents/Sources/WMFComponents/Components/Developer Settings/WMFDeveloperSettingsViewModel.swift:1 — `WMFComponents/Sources/WMFComponents/Components/Developer Settings/WMFDeveloperSettingsViewModel.swift` (context WMFComponents) and `WMFData/Sources/WMFDataMocks/WMFMockDeveloperSettingsDataController.swift` (context WMFData) sit in DIFFERENT parts of the tree yet change together 58% of the time (22 of the 38 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 22 shared commits counted here, the most recent 3 are `cf19ac4b` Decide the Year in Review experience from the slides with data; `b37d1391` Create YiR dev settings section; `7e1cd722` Spacing — run `git show` on any of them.
  • Boundary-crossing change coupling: WMFDeveloperSettingsView.swift ↔ WMFUserDefaultsKey.swift WMFComponents/Sources/WMFComponents/Components/Developer Settings/WMFDeveloperSettingsView.swift:1 — `WMFComponents/Sources/WMFComponents/Components/Developer Settings/WMFDeveloperSettingsView.swift` (context WMFComponents) and `WMFData/Sources/WMFData/Store/WMFUserDefaultsKey.swift` (context WMFData) sit in DIFFERENT parts of the tree yet change together 55% of the time (26 of the 47 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 26 shared commits counted here, the most recent 3 are `91d9f81f` Add the Discover data controller, experiment and developer settings; `c9ce202d` Remove games dev settings; `bab87769` Add the semantic search experiment and its developer settings — run `git show` on any of them.
  • Boundary-crossing change coupling: WMFRiveView.swift ↔ YearInReviewSlideViewModelFactory.swift WMFComponents/Sources/WMFComponents/Components/Shared/Rive/WMFRiveView.swift:1 — `WMFComponents/Sources/WMFComponents/Components/Shared/Rive/WMFRiveView.swift` (context WMFComponents) and `Wikipedia/Code/YearInReviewSlideViewModelFactory.swift` (context Wikipedia) sit in DIFFERENT parts of the tree yet change together 55% of the time (11 of the 20 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `43ae1ee6` Remove WMFRiveTextFit; `970baab9` Remove WMFRiveTextFit; `6dcf78cf` Move to the YiR rabbit hole reveal as soon as the reader taps a card — run `git show` on any of them.
  • Boundary-crossing change coupling: TimelineViewModel.swift ↔ UserContributionsDataController.swift WMFComponents/Sources/WMFComponents/Components/Activity Tab/View Models/TimelineViewModel.swift:1 — `WMFComponents/Sources/WMFComponents/Components/Activity Tab/View Models/TimelineViewModel.swift` (context WMFComponents) and `WMFData/Sources/WMFData/Data Controllers/Shared/UserContributionsDataController.swift` (context WMFData) sit in DIFFERENT parts of the tree yet change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `b2e32bed` PR Clean ups; `1470f7ca` Clean up (at that commit the file was still `WMFData/Sources/WMFData/Data Controllers/Activity Tab/UserContributionsDataController.swift`); `03c78cd6` Deep link diff (at that commit the file was still `WMFData/Sources/WMFData/Data Controllers/Activity Tab/UserContributionsDataController.swift`) — run `git show` on any of them.
  • Boundary-crossing change coupling: WMFImageRecommendationsDataController.swift ↔ ExploreViewController.swift WMFData/Sources/WMFData/Data Controllers/Image Recommendations/WMFImageRecommendationsDataController.swift:1 — `WMFData/Sources/WMFData/Data Controllers/Image Recommendations/WMFImageRecommendationsDataController.swift` (context WMFData) and `Wikipedia/Code/ExploreViewController.swift` (context Wikipedia) sit in DIFFERENT parts of the tree yet change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `9ef97dd2` Bug fix; `98998d26` Fixes; `2f2d15d0` Renaming, moving — run `git show` on any of them.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC1 · Text alternatives · <img> without a text alternative · ×2
  • <img> without a text alternative Wikipedia/assets/about.html:96 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative Wikipedia/assets/about.html:97 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
AC3 · Page structure · <html> without a lang · ×2
  • <html> without a lang Wikipedia/Code/WMFRandomDiceButton.html:6 — The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
  • <html> without a lang Wikipedia/assets/about.html:2 — The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
AC3 · Page structure · Document without a <title> · ×2
  • Document without a <title> Wikipedia/Code/WMFRandomDiceButton.html:6 — A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
  • Document without a <title> Wikipedia/assets/about.html:2 — A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
AC3 · Page structure · Viewport restricts zoom · ×2
  • Viewport restricts zoom Wikipedia/Code/WMFRandomDiceButton.html:8 — user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta.
  • Viewport restricts zoom Wikipedia/assets/about.html:6 — user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta.
DM4 · Rich vs anemic domain model · Anemic domain model · ×2
  • Anemic domain model: InsertMediaSearchResult Wikipedia/Code/InsertMediaSearchResultsCollectionViewController.swift:55 — `InsertMediaSearchResult` is a data-only reference entity whose behaviour is DELEGATED to a foreign utility (static methods that take it as their first parameter and hold its logic) — the anemic domain model. Move the behaviour onto the entity so it enforces its own invariants rather than being driven from outside.
  • Anemic domain model: URLRequest WMF Framework/PermanentlyPersistableURLCache.swift:683 — `URLRequest` is a data-only reference entity whose behaviour is DELEGATED to a foreign utility (static methods that take it as their first parameter and hold its logic) — the anemic domain model. Move the behaviour onto the entity so it enforces its own invariants rather than being driven from outside.
AX8 · Test isolation · Production project references a test project · ×1
  • Production project references a test project: WMFComponents → WMFDataMocks — `WMFComponents` (production) references the test project `WMFDataMocks`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
AX9 · CQS / query purity · Query writes persistent state on the read path · ×1
  • Query writes persistent state on the read path: WMFDiscoverReadingListDataController.fetchAndPersistList WMFData/Sources/WMFData/Data Controllers/Discover/WMFDiscoverReadingListDataController.swift:351 — `WMFDiscoverReadingListDataController.fetchAndPersistList` is a read-named query yet it performs a durable write on the read path (a persist to a store/client). A query must stay side-effect-free so reads are safe to retry, cache, and route to a read replica; move the write into a command.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D34 · Knowledge Freshness · Orphaned knowledge · ×1
  • Orphaned knowledge Wikipedia/Code/NotificationsCenterCell.swift:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Serious — 1336 finding(s)
D6 · Cohesion (LCOM4) · Low cohesion · ×114
  • Low cohesion: ExploreViewController (LCOM4 55) Wikipedia/Code/ExploreViewController.swift:9 — ExploreViewController's methods fall into 55 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 55 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: UserDefaults (LCOM4 38) Wikipedia/Code/NSUserDefaults+WMFApplicationDefaults.swift:35 — UserDefaults's methods fall into 38 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 38 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: WMFAppViewController (LCOM4 26) Wikipedia/Code/WMFAppViewController.swift:49 — WMFAppViewController's methods fall into 26 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 26 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: UIViewController (LCOM4 25) Wikipedia/Code/FundraisingAnnouncementPanel.swift:97 — UIViewController's methods fall into 25 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 25 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: ArticleViewController (LCOM4 17) Wikipedia/Code/ArticleViewController.swift:10 — ArticleViewController's methods fall into 17 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 17 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: WMFDeveloperSettingsViewModel (LCOM4 13) WMFComponents/Sources/WMFComponents/Components/Developer Settings/WMFDeveloperSettingsViewModel.swift:51 — WMFDeveloperSettingsViewModel's methods fall into 13 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 13 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: EditorViewController (LCOM4 13) Wikipedia/Code/EditorViewController.swift:14 — EditorViewController's methods fall into 13 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 13 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: OnThisDayViewController (LCOM4 13) Wikipedia/Code/OnThisDayViewController.swift:5 — OnThisDayViewController's methods fall into 13 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 13 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: TalkPageViewController (LCOM4 13) Wikipedia/Code/TalkPageViewController.swift:12 — TalkPageViewController's methods fall into 13 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 13 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: UIView (LCOM4 13) WMF Framework/UIStackView+SubviewVerification.swift:1 — UIView's methods fall into 13 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 13 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: Configuration (LCOM4 12) WMF Framework/Configuration.swift:7 — Configuration's methods fall into 12 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 12 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: ColumnarCollectionViewController (LCOM4 12) Wikipedia/Code/ColumnarCollectionViewController.swift:4 — ColumnarCollectionViewController's methods fall into 12 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 12 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: InsertMediaViewController (LCOM4 12) Wikipedia/Code/InsertMediaViewController.swift:9 — InsertMediaViewController's methods fall into 12 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 12 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: WMFSearchResultsViewModel (LCOM4 11) WMFComponents/Sources/WMFComponents/Components/Search/Results/WMFSearchResultsViewModel.swift:4 — WMFSearchResultsViewModel's methods fall into 11 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 11 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: WMFActivityTabDataController (LCOM4 11) WMFData/Sources/WMFData/Data Controllers/Activity Tab/WMFActivityTabDataController.swift:3 — WMFActivityTabDataController's methods fall into 11 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 11 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: DiscoverSettingsCoordinator (LCOM4 11) Wikipedia/Code/DiscoverSettingsCoordinator.swift:9 — DiscoverSettingsCoordinator's methods fall into 11 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 11 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: NewsViewController (LCOM4 11) Wikipedia/Code/NewsViewController.swift:5 — NewsViewController's methods fall into 11 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 11 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: WMFActivityTabViewController (LCOM4 10) Wikipedia/Code/ActivityTabViewController.swift:12 — WMFActivityTabViewController's methods fall into 10 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 10 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: ArticleFetchedResultsViewController (LCOM4 10) Wikipedia/Code/ArticleFetchedResultsViewController.swift:4 — ArticleFetchedResultsViewController's methods fall into 10 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 10 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: InsertMediaSettingsViewController (LCOM4 10) Wikipedia/Code/InsertMediaSettingsViewController.swift:21 — InsertMediaSettingsViewController's methods fall into 10 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 10 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: ReadingListsViewController (LCOM4 10) Wikipedia/Code/ReadingListsViewController.swift:13 — ReadingListsViewController's methods fall into 10 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 10 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: ArticleURLListViewController (LCOM4 9) Wikipedia/Code/ArticleURLListViewController.swift:5 — ArticleURLListViewController's methods fall into 9 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 9 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: ExploreCardViewController (LCOM4 9) Wikipedia/Code/ExploreCardViewController.swift:24 — ExploreCardViewController's methods fall into 9 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 9 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: SavedAllArticlesCoordinator (LCOM4 9) Wikipedia/Code/SavedAllArticlesCoordinator.swift:7 — SavedAllArticlesCoordinator's methods fall into 9 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 9 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: SearchViewController (LCOM4 9) Wikipedia/Code/SearchViewController.swift:11 — SearchViewController's methods fall into 9 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 9 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • + 89 more in this group — see findings.md.
D17 · Explicit Debt · TodoComment · ×42
  • TodoComment WikipediaUnitTests/Code/YearInReviewSlideViewModelFactoryTests.swift:1171 — // TODO: The 2026 instrumentation plan does not name the edit slides yet, so they log their raw — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment Wikipedia/Code/ActivityTabViewController.swift:288 — // TODO: Will probably need some special logging here. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment Wikipedia/Code/AppDelegate.swift:24 — // TODO: Refactor background task refresh and notification token registration logic out of WMFAppViewController. Then we can then move tab bar instantiation into SceneDelegate. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment Wikipedia/Code/ArticleViewController.swift:986 — // todo: fix logging source, custom tab config? .appendArticleAndAssignCurrentTabAndCleanoutFutureArticles — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment Wikipedia/Code/ExploreViewController.swift:864 — // todo: we may want to switch to get article source if we want to be more specific: — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment Wikipedia/Code/ExploreViewController.swift:878 — // todo: we may want to switch to get article source if we want to be more specific: — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment Wikipedia/Code/ExploreViewController.swift:1100 — // TODO: confirm with analytics — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment Wikipedia/Code/HomeViewController.swift:149 — // TODO: Confirm the logging ID for Home with data before release. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment Wikipedia/Code/LocalNotificationCoordinator.swift:53 — // todo: localize if this prototype becomes a real experiment — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment Wikipedia/Code/PageHistoryCollectionViewCell.swift:256 — // TODO: Make sure all icons have the same sizes — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment REDACTED:17 — // TODO: make non-optional? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment Wikipedia/Code/PlacesViewController.swift:1195 — // TODO: remember last setting? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment Wikipedia/Code/ProfileCoordinator.swift:195 — // todo: share localizations — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment Wikipedia/Code/SavedArticlesFetcher.swift:338 — // TODO: Clean up these DB inconsistencies in the DatabaseHousekeeper — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment Wikipedia/Code/TalkPageReplyComposeController.swift:423 — // TODO: Allow if NOT temp accounts pilot wiki — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment Wikipedia/Code/TalkPageTopicComposeViewController.swift:559 — // TODO: Allow if NOT temp accounts pilot wiki — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment Wikipedia/Code/WMFContentGroup+DetailViewControllers.swift:45 — // todo — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment Wikipedia/Code/WMFContentGroup+DetailViewControllers.swift:49 — // todo — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment Wikipedia/Code/WMFContentGroup+DetailViewControllers.swift:61 — // todo: pass in article source Explore > Nearby List — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment Wikipedia/Code/YearInReviewCoordinator.swift:120 — /// TODO: add when data ticket is available — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment Wikipedia/Code/YearInReviewSlideViewModelFactory.swift:26 — /// TODO: The plan has no page names for the edit slides yet, so `edits`, `editsEmpty`, — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment Widgets/Widgets/TopReadWidget.swift:375 — // TODO: Apply shadow just to final content – not children views as well — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment WMFLocalizations/Sources/WMFNativeLocalizations/CommonStrings.swift:189 — // TODO: Delete this when we remove web editor code — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment WMFLocalizations/Sources/WMFNativeLocalizations/CommonStrings.swift:533 — // TODO: Delete this when we remove web editor code — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment WMFData/Sources/WMFData/Environment/WMFDataEnvironment.swift:58 — // TODO: Once the Wikipedia app target has been migrated to Swift 6 and its launch-time — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • + 17 more in this group — see findings.md.
D3 · God Classes · TooManyMethods · ×42
  • TooManyMethods: ArticleViewController Wikipedia/Code/ArticleViewController.swift:10 — TooManyMethods — 255 methods, declared across 20 files: Code/ArticleViewController.swift (97), Code/ArticleViewController+FindInPage.swift (19), Code/ArticleViewController+DonationReminder.swift (18), Code/ArticleViewController+ArticleToolbarHandling.swift (17), +16 more file(s). The bar is 30 methods; this is 225 over it, 8.50× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: WMFAppViewController Wikipedia/Code/WMFAppViewController.swift:49 — TooManyMethods — 192 methods, declared across 2 files: Code/WMFAppViewController.swift (135), Code/WMFAppViewController+Extensions.swift (57). The bar is 30 methods; this is 162 over it, 6.40× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ExploreViewController Wikipedia/Code/ExploreViewController.swift:9 — TooManyMethods — 140 methods. The bar is 30 methods; this is 110 over it, 4.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: DonateFunnel Wikipedia/Code/DonateFunnel.swift:5 — TooManyMethods — 121 methods. The bar is 30 methods; this is 91 over it, 4.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: PlacesViewController Wikipedia/Code/PlacesViewController.swift:9 — TooManyMethods — 102 methods. The bar is 30 methods; this is 72 over it, 3.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: TalkPageViewController Wikipedia/Code/TalkPageViewController.swift:12 — TooManyMethods — 98 methods, declared across 3 files: Code/TalkPageViewController.swift (77), Code/TalkPageViewController+FindInPage.swift (12), Code/TalkPageViewController+TalkPageFormattingToolbar.swift (9). The bar is 30 methods; this is 68 over it, 3.27× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: WMFHomeDataController WMFData/Sources/WMFData/Data Controllers/Home/WMFHomeDataController.swift:3 — TooManyMethods — 74 methods. The bar is 30 methods; this is 44 over it, 2.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: YearInReviewSlideViewModelFactory Wikipedia/Code/YearInReviewSlideViewModelFactory.swift:9 — TooManyMethods — 74 methods. The bar is 30 methods; this is 44 over it, 2.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: WMFSourceEditorViewController WMFComponents/Sources/WMFComponents/Components/Editors/Source Editor/WMFSourceEditorViewController.swift:24 — TooManyMethods — 73 methods. The bar is 30 methods; this is 43 over it, 2.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: EditorViewController Wikipedia/Code/EditorViewController.swift:14 — TooManyMethods — 68 methods. The bar is 30 methods; this is 38 over it, 2.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: WatchlistFunnel Wikipedia/Code/WatchlistFunnel.swift:4 — TooManyMethods — 66 methods. The bar is 30 methods; this is 36 over it, 2.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: DiffContainerViewController Wikipedia/Code/DiffContainerViewController.swift:14 — TooManyMethods — 62 methods. The bar is 30 methods; this is 32 over it, 2.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: NotificationsCenterViewController Wikipedia/Code/NotificationsCenterViewController.swift:8 — TooManyMethods — 60 methods. The bar is 30 methods; this is 30 over it, 2.00× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ExploreCardViewController Wikipedia/Code/ExploreCardViewController.swift:24 — TooManyMethods — 55 methods. The bar is 30 methods; this is 25 over it, 1.83× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: SearchResultsViewController Wikipedia/Code/SearchResultsViewController.swift:10 — TooManyMethods — 54 methods, declared across 2 files: Code/SearchResultsViewController.swift (32), Code/SearchResultsViewController+ResultsList.swift (22). The bar is 30 methods; this is 24 over it, 1.80× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Session Wikipedia/Code/Session.swift:26 — TooManyMethods — 48 methods. The bar is 30 methods; this is 18 over it, 1.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: SettingsCoordinator Wikipedia/Code/SettingsCoordinator.swift:12 — TooManyMethods — 47 methods. The bar is 30 methods; this is 17 over it, 1.57× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: WMFActivityTabViewController Wikipedia/Code/ActivityTabViewController.swift:12 — TooManyMethods — 46 methods. The bar is 30 methods; this is 16 over it, 1.53× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: YearInReviewCoordinator Wikipedia/Code/YearInReviewCoordinator.swift:12 — TooManyMethods — 46 methods. The bar is 30 methods; this is 16 over it, 1.53× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ColumnarCollectionViewController Wikipedia/Code/ColumnarCollectionViewController.swift:4 — TooManyMethods — 45 methods. The bar is 30 methods; this is 15 over it, 1.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: PageHistoryViewController Wikipedia/Code/PageHistoryViewController.swift:21 — TooManyMethods — 44 methods. The bar is 30 methods; this is 14 over it, 1.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: CommonStrings WMFLocalizations/Sources/WMFNativeLocalizations/CommonStrings.swift:7 — TooManyMethods — 43 methods. The bar is 30 methods; this is 13 over it, 1.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: UIViewController Wikipedia/Code/FundraisingAnnouncementPanel.swift:97 — TooManyMethods — 41 methods, declared across 16 files: Code/UIViewController+Extensions.swift (14), Code/UIViewController+WMFAlerts.swift (5), Code/UIViewController+WMFEmptyView.swift (4), Code/ViewController+URLHandling.swift (4), +12 more file(s). The bar is 30 methods; this is 11 over it, 1.37× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: UserDefaults Wikipedia/Code/NSUserDefaults+WMFApplicationDefaults.swift:35 — TooManyMethods — 40 methods, declared across 2 files: Code/NSUserDefaults+WMFExtensions.swift (37), Code/NSUserDefaults+WMFApplicationDefaults.swift (3). The bar is 30 methods; this is 10 over it, 1.33× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: DiscoverInstrumentation Wikipedia/Code/DiscoverInstrumentation.swift:10 — TooManyMethods — 38 methods. The bar is 30 methods; this is 8 over it, 1.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • + 17 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×27
  • FileTooLong: Code/PlacesViewController.swift Wikipedia/Code/PlacesViewController.swift — FileTooLong — 1686 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: PlacesViewController (10-2342). The bar is 500 significant lines; this is 1186 over it, 3.37× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: Code/WMFAppViewController.swift Wikipedia/Code/WMFAppViewController.swift — FileTooLong — 1521 significant lines (blank, comment-only and punctuation-only lines excluded), about 74% of them inside a single declaration: WMFAppViewController (49-1816). The bar is 500 significant lines; this is 1021 over it, 3.04× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: Code/ExploreViewController.swift Wikipedia/Code/ExploreViewController.swift — FileTooLong — 1174 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 674 over it, 2.35× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Code/ArticleViewController.swift Wikipedia/Code/ArticleViewController.swift — FileTooLong — 1039 significant lines (blank, comment-only and punctuation-only lines excluded), about 81% of them inside a single declaration: ArticleViewController (11-1475). The bar is 500 significant lines; this is 539 over it, 2.08× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: Code/YearInReviewSlideViewModelFactory.swift Wikipedia/Code/YearInReviewSlideViewModelFactory.swift — FileTooLong — 968 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: YearInReviewSlideViewModelFactory (9-1548). The bar is 500 significant lines; this is 468 over it, 1.94× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: Code/WMFAppViewController+Extensions.swift Wikipedia/Code/WMFAppViewController+Extensions.swift — FileTooLong — 903 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 403 over it, 1.81× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Code/DiffContainerViewController.swift Wikipedia/Code/DiffContainerViewController.swift — FileTooLong — 862 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 362 over it, 1.72× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Code/TalkPageViewController.swift Wikipedia/Code/TalkPageViewController.swift — FileTooLong — 843 significant lines (blank, comment-only and punctuation-only lines excluded), about 64% of them inside a single declaration: TalkPageViewController (12-971). The bar is 500 significant lines; this is 343 over it, 1.69× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: WMFNativeLocalizations/CommonStrings.swift WMFLocalizations/Sources/WMFNativeLocalizations/CommonStrings.swift — FileTooLong — 769 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: CommonStrings (8-1129). The bar is 500 significant lines; this is 269 over it, 1.54× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: WMF Framework/ReadingListsSyncOperation.swift WMF Framework/ReadingListsSyncOperation.swift — FileTooLong — 758 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: ReadingListsSyncOperation (9-1155). The bar is 500 significant lines; this is 258 over it, 1.52× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: WMF Framework/Theme.swift WMF Framework/Theme.swift — FileTooLong — 708 significant lines (blank, comment-only and punctuation-only lines excluded), about 74% of them inside a single declaration: Colors (95-841). The bar is 500 significant lines; this is 208 over it, 1.42× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: Code/EditorViewController.swift Wikipedia/Code/EditorViewController.swift — FileTooLong — 704 significant lines (blank, comment-only and punctuation-only lines excluded), about 67% of them inside a single declaration: EditorViewController (14-726). The bar is 500 significant lines; this is 204 over it, 1.41× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: Code/DonateCoordinator.swift Wikipedia/Code/DonateCoordinator.swift — FileTooLong — 692 significant lines (blank, comment-only and punctuation-only lines excluded), about 60% of them inside a single declaration: DonateCoordinator (8-624). The bar is 500 significant lines; this is 192 over it, 1.38× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: Code/NotificationsCenterViewController.swift Wikipedia/Code/NotificationsCenterViewController.swift — FileTooLong — 640 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 140 over it, 1.28× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Code/PageHistoryViewController.swift Wikipedia/Code/PageHistoryViewController.swift — FileTooLong — 609 significant lines (blank, comment-only and punctuation-only lines excluded), about 89% of them inside a single declaration: PageHistoryViewController (22-828). The bar is 500 significant lines; this is 109 over it, 1.22× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: Code/ActivityTabViewController.swift Wikipedia/Code/ActivityTabViewController.swift — FileTooLong — 602 significant lines (blank, comment-only and punctuation-only lines excluded), about 84% of them inside a single declaration: WMFActivityTabHostingController (10-829). The bar is 500 significant lines; this is 102 over it, 1.20× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: Home/WMFForYouView.swift WMFComponents/Sources/WMFComponents/Components/Home/WMFForYouView.swift — FileTooLong — 593 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 93 over it, 1.19× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Code/ReadingListsController.swift Wikipedia/Code/ReadingListsController.swift — FileTooLong — 581 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 81 over it, 1.16× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Code/SettingsCoordinator.swift Wikipedia/Code/SettingsCoordinator.swift — FileTooLong — 580 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: SettingsCoordinator (13-900). The bar is 500 significant lines; this is 80 over it, 1.16× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: Year In Review/WMFYearInReviewDataController.swift WMFData/Sources/WMFData/Data Controllers/Year In Review/WMFYearInReviewDataController.swift — FileTooLong — 566 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 66 over it, 1.13× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Code/Session.swift Wikipedia/Code/Session.swift — FileTooLong — 549 significant lines (blank, comment-only and punctuation-only lines excluded), about 75% of them inside a single declaration: Session (27-694). The bar is 500 significant lines; this is 49 over it, 1.10× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: Code/YearInReviewCoordinator.swift Wikipedia/Code/YearInReviewCoordinator.swift — FileTooLong — 537 significant lines (blank, comment-only and punctuation-only lines excluded), about 66% of them inside a single declaration: YearInReviewCoordinator (12-652). The bar is 500 significant lines; this is 37 over it, 1.07× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: Home/WMFHomeDataController.swift WMFData/Sources/WMFData/Data Controllers/Home/WMFHomeDataController.swift — FileTooLong — 526 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 26 over it, 1.05× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Code/ExploreCardViewController.swift Wikipedia/Code/ExploreCardViewController.swift — FileTooLong — 520 significant lines (blank, comment-only and punctuation-only lines excluded), about 71% of them inside a single declaration: ExploreCardViewController (24-567). The bar is 500 significant lines; this is 20 over it, 1.04× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: Event Platform/EventPlatformClient.swift WMF Framework/Event Platform/EventPlatformClient.swift — FileTooLong — 510 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 10 over it, 1.02× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • + 2 more in this group — see findings.md.
D4 · Code Duplication · Edited copy of a member (10 corresponding lines) · ×26
  • Edited copy of a member (10 corresponding lines) Wikipedia/Code/HTTPCookieStorage+Migration.swift:2 — Wikipedia/Code/HTTPCookieStorage+Migration.swift:2-11 | Wikipedia/Code/HTTPCookieStorage+Migration.swift:13-22 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) Wikipedia/Code/EditorViewController.swift:849 — Wikipedia/Code/EditorViewController.swift:849-858 | Wikipedia/Code/EditorViewController.swift:860-869 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Donate Form/WMFDonateViewController.swift:32 — WMFComponents/Sources/WMFComponents/Components/Donate Form/WMFDonateViewController.swift:32-42 | Wikipedia/Code/ExploreFeedSettingsViewController.swift:190-199 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Settings/Home/For You/Whats Driving/Your Interests/WMFInterestArticleCardViewModel.swift:27 — WMFComponents/Sources/WMFComponents/Components/Settings/Home/For You/Whats Driving/Your Interests/WMFInterestArticleCardViewModel.swift:27-36 | WMFComponents/Sources/WMFComponents/Components/Settings/Home/For You/Whats Driving/Your Interests/WMFInterestArticleCardViewModel.swift:52-61 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Discover/WMFDiscoverSettingsView.swift:116 — WMFComponents/Sources/WMFComponents/Components/Discover/WMFDiscoverSettingsView.swift:116-134 | WMFComponents/Sources/WMFComponents/Components/Discover/WMFDiscoverSettingsView.swift:136-145 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Shared/Onboarding/WMFOnboardingViewModel.swift:18 — WMFComponents/Sources/WMFComponents/Components/Shared/Onboarding/WMFOnboardingViewModel.swift:18-27 | WMFComponents/Sources/WMFComponents/Components/Shared/Toasts/WMFToastConfig.swift:26-44 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) Wikipedia/Code/DiscoverInstrumentation.swift:238 — Wikipedia/Code/DiscoverInstrumentation.swift:238-247 | Wikipedia/Code/SavedInstrumentation.swift:66-81 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Search/Results/WMFSearchResultsViewModel.swift:287 — WMFComponents/Sources/WMFComponents/Components/Search/Results/WMFSearchResultsViewModel.swift:287-299 | WMFComponents/Sources/WMFComponents/Utility/UIImage+FaceCrop.swift:31-40 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) WMFData/Sources/WMFData/Models/Watchlist/WMFWatchlistFilterSettings.swift:50 — WMFData/Sources/WMFData/Models/Watchlist/WMFWatchlistFilterSettings.swift:50-59 | WMFData/Sources/WMFData/Models/Watchlist/WMFWatchlistFilterSettings.swift:61-70 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) Wikipedia/Code/LegacyReadingListsDataSource.swift:142 — Wikipedia/Code/LegacyReadingListsDataSource.swift:142-151 | Wikipedia/Code/LegacyReadingListsDataSource.swift:153-162 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Home/WMFCommunityFeedView.swift:114 — WMFComponents/Sources/WMFComponents/Components/Home/WMFCommunityFeedView.swift:114-123 | WMFComponents/Sources/WMFComponents/Components/Home/WMFCommunityFeedView.swift:209-218 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Discover/WMFDiscoverSettingsViewModel.swift:140 — WMFComponents/Sources/WMFComponents/Components/Discover/WMFDiscoverSettingsViewModel.swift:140-149 | WMFComponents/Sources/WMFComponents/Components/Discover/WMFDiscoverSettingsViewModel.swift:153-162 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) REDACTED:515 — REDACTED:515-526 | Wikipedia/Code/ReadingListsViewController.swift:315-324 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) WMF Framework/CacheDBWriterHelper.swift:79 — WMF Framework/CacheDBWriterHelper.swift:79-88 | WMF Framework/CacheDBWriterHelper.swift:90-99 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Games/Which Came First/Core/Cards/WMFWhichCameFirstCardViewModel.swift:54 — WMFComponents/Sources/WMFComponents/Components/Games/Which Came First/Core/Cards/WMFWhichCameFirstCardViewModel.swift:54-63 | WMFComponents/Sources/WMFComponents/Components/Games/Which Came First/Results/Articles View/WMFWhichCameFirstArticlesViewModel.swift:52-61 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) WMFData/Sources/WMFData/Extensions/URL+API.swift:28 — WMFData/Sources/WMFData/Extensions/URL+API.swift:28-37 | WMFData/Sources/WMFData/Extensions/URL+API.swift:39-49 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Search/Semantic Search Info/WMFSemanticSearchInfoView.swift:49 — WMFComponents/Sources/WMFComponents/Components/Search/Semantic Search Info/WMFSemanticSearchInfoView.swift:49-59 | WMFComponents/Sources/WMFComponents/Components/Search/Semantic Search Results/Feedback/WMFSemanticSearchFeedbackView.swift:110-119 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) Wikipedia/Code/ArticleFetcher.swift:301 — Wikipedia/Code/ArticleFetcher.swift:301-311 | Wikipedia/Code/ArticleFetcher.swift:489-498 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) WMF Framework/WMFBlocksKit.swift:104 — WMF Framework/WMFBlocksKit.swift:104-113 | WMF Framework/WMFBlocksKit.swift:115-127 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) Wikipedia/Code/Advanced Settings/InsertMediaImagePositionSettingsViewController.swift:38 — Wikipedia/Code/Advanced Settings/InsertMediaImagePositionSettingsViewController.swift:38-47 | Wikipedia/Code/Advanced Settings/InsertMediaImageTypeSettingsViewController.swift:38-47 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) Wikipedia/Code/WMFAppViewController+Extensions.swift:762 — Wikipedia/Code/WMFAppViewController+Extensions.swift:762-772 | Wikipedia/Code/WMFAppViewController+Extensions.swift:774-783 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) Wikipedia/Code/ArticleCollectionViewController.swift:175 — Wikipedia/Code/ArticleCollectionViewController.swift:175-184 | Wikipedia/Code/ArticleLocationCollectionViewController.swift:190-199 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) Wikipedia/Code/OnThisDayViewControllerHeader.swift:9 — Wikipedia/Code/OnThisDayViewControllerHeader.swift:9-18 | Wikipedia/Code/NewsCollectionViewHeader.swift:6-15 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/WMFYearInReviewDonateCountSlideDataController.swift:55 — WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/WMFYearInReviewDonateCountSlideDataController.swift:55-64 | WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewLocationSlideDataController.swift:39-48 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) Wikipedia/Code/LibrariesUsed.swift:208 — Wikipedia/Code/LibrariesUsed.swift:208-217 | Wikipedia/Code/PageIssuesTableViewController.swift:70-79 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • + 1 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×24
  • Duplicated block (6 lines × 2) WMF Framework/Collection+AsyncMap.swift:30 — WMF Framework/Collection+AsyncMap.swift:30-35 | WMF Framework/Collection+AsyncMap.swift:48-53 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `WMF Framework/Collection+AsyncMap.swift:30` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) WMFData/Sources/WMFData/Data Controllers/Shared/WMFUserImpactDataController.swift:94 — WMFData/Sources/WMFData/Data Controllers/Shared/WMFUserImpactDataController.swift:94-99 | WMFData/Sources/WMFData/Data Controllers/Shared/WMFUserImpactDataController.swift:128-133 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `WMFData/Sources/WMFData/Data Controllers/Shared/WMFUserImpactDataController.swift:94` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) Wikipedia/Code/ArticlePlaceView.swift:254 — Wikipedia/Code/ArticlePlaceView.swift:254-259 | Wikipedia/Code/ArticlePlaceView.swift:481-486 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/ArticlePlaceView.swift:254` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) Wikipedia/Code/DonateFunnel.swift:511 — Wikipedia/Code/DonateFunnel.swift:511-516 | Wikipedia/Code/DonateFunnel.swift:552-557 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (6 lines × 2) Wikipedia/Code/PlacesViewController.swift:1281 — Wikipedia/Code/PlacesViewController.swift:1281-1286 | Wikipedia/Code/PlacesViewController.swift:1948-1953 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/PlacesViewController.swift:1281` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) Wikipedia/Code/ReadingListsCoordinator.swift:130 — Wikipedia/Code/ReadingListsCoordinator.swift:130-135 | Wikipedia/Code/ReadingListsViewController.swift:129-135 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (6 lines × 2) Wikipedia/Code/ScrollableEducationPanelViewController.swift:339 — Wikipedia/Code/ScrollableEducationPanelViewController.swift:339-344 | Wikipedia/Code/ScrollableEducationPanelViewController.swift:352-357 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) Wikipedia/Code/SettingsCoordinator.swift:113 — Wikipedia/Code/SettingsCoordinator.swift:113-120 | Wikipedia/Code/WMFAppViewController+Extensions.swift:1333-1338 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) Wikipedia/Code/TableOfContentsAnimator.swift:241 — Wikipedia/Code/TableOfContentsAnimator.swift:241-246 | Wikipedia/Code/TableOfContentsAnimator.swift:288-293 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/TableOfContentsAnimator.swift:241` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) WMFComponents/Sources/WMFComponents/Components/Year in Review/WMFYearInReviewAnnouncementHostingController.swift:91 — WMFComponents/Sources/WMFComponents/Components/Year in Review/WMFYearInReviewAnnouncementHostingController.swift:91-96 | WMFComponents/Sources/WMFComponents/Components/Year in Review/WMFYearInReviewHostingController.swift:324-329 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `WMFComponents/Sources/WMFComponents/Components/Year in Review/WMFYearInReviewAnnouncementHostingController.swift:91` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) ContinueReadingWidget/WMFTodayContinueReadingWidgetViewController.swift:87 — ContinueReadingWidget/WMFTodayContinueReadingWidgetViewController.swift:87-92 | Wikipedia/Code/WMFArticlePreviewViewController.swift:64-69 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) WMFComponents/Sources/WMFComponents/Components/Saved/All Articles/WMFSavedAllArticlesView.swift:85 — WMFComponents/Sources/WMFComponents/Components/Saved/All Articles/WMFSavedAllArticlesView.swift:85-90 | WMFComponents/Sources/WMFComponents/Components/Saved/Reading Lists/WMFReadingListsView.swift:74-79 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) WMFComponents/Sources/WMFComponents/Components/Shared/Feature Announcement/WMFFeatureAnnouncementView.swift:54 — WMFComponents/Sources/WMFComponents/Components/Shared/Feature Announcement/WMFFeatureAnnouncementView.swift:54-59 | WMFComponents/Sources/WMFComponents/Components/Temp Accounts/WMFTempAccountsSheetView.swift:21-26 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/WMFYearInReviewDonateCountSlideDataController.swift:24 — WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/WMFYearInReviewDonateCountSlideDataController.swift:24-29 | WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewEditCountSlideDataController.swift:23-28 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewReadCountSlideDataController.swift:25 — WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewReadCountSlideDataController.swift:25-30 | WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewTopArticlesSlideDataController.swift:84-89 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewTopArticlesSlideDataController.swift:92` calls `WMFPageViewsDataController` and `WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewReadCountSlideDataController.swift:34` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 2) Widgets/Widgets/LockscreenSearchWidget.swift:43 — Widgets/Widgets/LockscreenSearchWidget.swift:43-48 | Widgets/Widgets/SearchWidget.swift:45-50 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) Wikipedia/Code/ActivityTabViewController.swift:840 — Wikipedia/Code/ActivityTabViewController.swift:840-849 | Wikipedia/Code/SearchViewController.swift:675-680 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) Wikipedia/Code/DescriptionWelcomePageViewController.swift:172 — Wikipedia/Code/DescriptionWelcomePageViewController.swift:172-177 | Wikipedia/Code/WMFReferencePageViewController.swift:145-150 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) Wikipedia/Code/DescriptionWelcomePageViewController.swift:179 — Wikipedia/Code/DescriptionWelcomePageViewController.swift:179-184 | Wikipedia/Code/WMFReferencePageViewController.swift:152-157 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) WMFComponents/Sources/WMFComponents/Components/Settings/Home/For You/Whats Driving/Your Interests/WMFHomeFeedInterestsSettingsView.swift:302 — WMFComponents/Sources/WMFComponents/Components/Settings/Home/For You/Whats Driving/Your Interests/WMFHomeFeedInterestsSettingsView.swift:302-307 | WMFComponents/Sources/WMFComponents/Components/Settings/Home/For You/Whats Driving/Your Interests/WMFInterestArticleGridView.swift:152-157 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/WMFYearInReviewMostReadCategoriesSlideDataController.swift:81 — WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/WMFYearInReviewMostReadCategoriesSlideDataController.swift:81-86 | WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/WMFYearInReviewViewCountSlideDataController.swift:74-79 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) Widgets/Widgets/LockscreenSearchWidget.swift:29 — Widgets/Widgets/LockscreenSearchWidget.swift:29-34 | Widgets/Widgets/SearchWidget.swift:31-36 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Note first that the copies are not typed on the same thing: the declarations holding them bind `configuration` to `LockscreenSearchWidgetConfiguration = LockscreenSearchWidgetConfiguration()` in one and `SearchWidgetConfiguration = SearchWidgetConfiguration()` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (6 lines × 2) Wikipedia/Code/DescriptionWelcomePanelViewController.swift:78 — Wikipedia/Code/DescriptionWelcomePanelViewController.swift:78-83 | Wikipedia/Code/WelcomePanelViewController.swift:42-47 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) Wikipedia/Code/NotificationsCenterDetailViewController.swift:19 — Wikipedia/Code/NotificationsCenterDetailViewController.swift:19-24 | Wikipedia/Code/TalkPageViewController.swift:162-167 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Note first that the copies are not typed on the same thing: the declarations holding them bind `viewModel` to `NotificationsCenterDetailViewModel` in one and `TalkPageViewModel` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Edited copy of a member (9 corresponding lines) · ×23
  • Edited copy of a member (9 corresponding lines) Wikipedia/Code/TalkPageCoffeeRollView.swift:80 — Wikipedia/Code/TalkPageCoffeeRollView.swift:80-88 | Wikipedia/Code/TalkPageHeaderView.swift:362-376 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Year in Review/WMFYearInReviewView.swift:285 — WMFComponents/Sources/WMFComponents/Components/Year in Review/WMFYearInReviewView.swift:285-293 | WMFComponents/Sources/WMFComponents/Components/Year in Review/WMFYearInReviewView.swift:326-337 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) WMF Framework/WMFFeedArticlePreview.swift:160 — WMF Framework/WMFFeedArticlePreview.swift:160-170 | WMF Framework/WMFFeedImage.swift:158-166 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) Wikipedia/Code/ArticlePeekPreviewViewController.swift:233 — Wikipedia/Code/ArticlePeekPreviewViewController.swift:233-242 | Wikipedia/Code/ArticleViewController+Sharing.swift:56-64 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) WMF Framework/ReadingListsAPIController.swift:391 — WMF Framework/ReadingListsAPIController.swift:391-399 | WMF Framework/ReadingListsAPIController.swift:410-418 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Search/Semantic Search Results/WMFSemanticSearchResultsHostingController.swift:36 — WMFComponents/Sources/WMFComponents/Components/Search/Semantic Search Results/WMFSemanticSearchResultsHostingController.swift:36-51 | Wikipedia/Code/InsertMediaViewController.swift:122-130 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) Wikipedia/Code/ArticleCollectionViewCell+WMFFeedContentDisplaying.swift:92 — Wikipedia/Code/ArticleCollectionViewCell+WMFFeedContentDisplaying.swift:92-100 | Wikipedia/Code/ArticleCollectionViewCell+WMFFeedContentDisplaying.swift:117-127 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) WMFComponents/Sources/WMFComponents/Components/App Onboarding/WMFAppOnboardingFeedPreferenceViewModel.swift:307 — WMFComponents/Sources/WMFComponents/Components/App Onboarding/WMFAppOnboardingFeedPreferenceViewModel.swift:307-315 | WMFComponents/Sources/WMFComponents/Components/Settings/Home/For You/Whats Driving/Your Interests/WMFInterestArticleCardViewModel.swift:71-80 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) Wikipedia/Code/ArticleLocationCollectionViewController.swift:19 — Wikipedia/Code/ArticleLocationCollectionViewController.swift:19-31 | Wikipedia/Code/NewsViewController.swift:20-28 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) Wikipedia/Code/YearInReviewCoordinator.swift:893 — Wikipedia/Code/YearInReviewCoordinator.swift:893-902 | Wikipedia/Code/YearInReviewCoordinator.swift:905-913 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) Wikipedia/Code/QuadKey.swift:82 — Wikipedia/Code/QuadKey.swift:82-90 | Wikipedia/Code/QuadKey.swift:92-100 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) Wikipedia/Code/HomeViewController.swift:238 — Wikipedia/Code/HomeViewController.swift:238-246 | Wikipedia/Code/ShareReadingListCoordinator.swift:71-79 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) Wikipedia/Code/DiscoverReadingListCoordinator.swift:189 — Wikipedia/Code/DiscoverReadingListCoordinator.swift:189-197 | Wikipedia/Code/DiscoverReadingListCoordinator.swift:200-211 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) WMF Framework/CacheFileWriterHelper.swift:28 — WMF Framework/CacheFileWriterHelper.swift:28-36 | WMF Framework/CacheFileWriterHelper.swift:55-63 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) WMFComponents/Sources/WMFComponents/Utility/HTMLUtils.swift:158 — WMFComponents/Sources/WMFComponents/Utility/HTMLUtils.swift:158-166 | WMFComponents/Sources/WMFComponents/Utility/HTMLUtils.swift:308-318 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) Widgets/Widgets/TopReadWidget.swift:331 — Widgets/Widgets/TopReadWidget.swift:331-343 | Widgets/Widgets/PictureOfTheDayWidget.swift:249-257 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) Wikipedia/Code/Session.swift:191 — Wikipedia/Code/Session.swift:191-199 | Wikipedia/Code/Session.swift:201-209 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) Wikipedia/Code/AppOnboardingCoordinator.swift:315 — Wikipedia/Code/AppOnboardingCoordinator.swift:315-323 | Wikipedia/Code/SettingsCoordinator.swift:544-555 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) Wikipedia/Code/DiscoverReadingListCoordinator.swift:178 — Wikipedia/Code/DiscoverReadingListCoordinator.swift:178-186 | Wikipedia/Code/ReadingListsViewController.swift:110-118 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) Wikipedia/Code/DiscoverInstrumentation.swift:64 — Wikipedia/Code/DiscoverInstrumentation.swift:64-72 | Wikipedia/Code/SearchInstrumentation.swift:101-109 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) Wikipedia/Code/DiscoverReadingListCoordinator.swift:178 — Wikipedia/Code/DiscoverReadingListCoordinator.swift:178-186 | Wikipedia/Code/ReadingListsCoordinator.swift:111-119 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) Wikipedia/Code/DiscoverInterestsCoordinator.swift:45 — Wikipedia/Code/DiscoverInterestsCoordinator.swift:45-53 | Wikipedia/Code/DiscoverSetupCoordinator.swift:41-49 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Discover/WMFDiscoverReadingListHostingController.swift:25 — WMFComponents/Sources/WMFComponents/Components/Discover/WMFDiscoverReadingListHostingController.swift:25-33 | WMFComponents/Sources/WMFComponents/Components/Discover/WMFDiscoverSettingsHostingController.swift:25-33 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (6 corresponding lines) · ×23
  • Edited copy of a member (6 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Games/Which Came First/Results/WMFWhichCameFirstResultsViewModel.swift:145 — WMFComponents/Sources/WMFComponents/Components/Games/Which Came First/Results/WMFWhichCameFirstResultsViewModel.swift:145-153 | Wikipedia/Code/WMFDailyGameExploreCell.swift:194-199 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) Wikipedia/Code/ArticleViewController+DonationReminder.swift:354 — Wikipedia/Code/ArticleViewController+DonationReminder.swift:354-360 | Wikipedia/Code/ArticleViewController+DonationReminder.swift:362-367 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) WMFData/Sources/WMFData/Service/Protocol/WMFService.swift:39 — WMFData/Sources/WMFData/Service/Protocol/WMFService.swift:39-46 | WMFData/Sources/WMFDataMocks/WMFMockBasicService.swift:190-195 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) WMFData/Sources/WMFData/Data Controllers/Legacy Reading Lists/WMFLegacyReadingListsDataController.swift:57 — WMFData/Sources/WMFData/Data Controllers/Legacy Reading Lists/WMFLegacyReadingListsDataController.swift:57-62 | WMFData/Sources/WMFData/Data Controllers/Legacy Reading Lists/WMFLegacyReadingListsDataController.swift:86-91 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) Wikipedia/Code/WMFToastManager.swift:11 — Wikipedia/Code/WMFToastManager.swift:11-16 | Wikipedia/Code/WMFToastManager.swift:31-36 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) Wikipedia/Code/NewsViewController.swift:56 — Wikipedia/Code/NewsViewController.swift:56-61 | Wikipedia/Code/OnThisDayViewController.swift:75-81 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) WMFData/Sources/WMFData/Data Controllers/Home/WMFHomeDataController.swift:782 — WMFData/Sources/WMFData/Data Controllers/Home/WMFHomeDataController.swift:782-787 | WMFData/Sources/WMFData/Data Controllers/Home/WMFHomeDataController.swift:795-800 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Year in Review/WMFYearInReviewHighlightsShareView.swift:252 — WMFComponents/Sources/WMFComponents/Components/Year in Review/WMFYearInReviewHighlightsShareView.swift:252-257 | Widgets/Widgets/OnThisDayView.swift:183-188 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) Wikipedia/Code/ExploreViewController.swift:1331 — Wikipedia/Code/ExploreViewController.swift:1331-1336 | Wikipedia/Code/WMFReadingListToastManager.swift:171-190 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) Wikipedia/Code/OnThisDayViewController.swift:218 — Wikipedia/Code/OnThisDayViewController.swift:218-223 | Wikipedia/Code/NewsViewController.swift:214-222 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) Wikipedia/Code/SearchInstrumentation.swift:159 — Wikipedia/Code/SearchInstrumentation.swift:159-164 | Wikipedia/Code/SearchInstrumentation.swift:210-215 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) WMFData/Sources/WMFData/Data Controllers/Donor Experience/WMFFundraisingCampaignDataController.swift:47 — WMFData/Sources/WMFData/Data Controllers/Donor Experience/WMFFundraisingCampaignDataController.swift:47-52 | WMFData/Sources/WMFData/Data Controllers/Developer Settings/WMFDeveloperSettingsDataController.swift:37-46 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) Wikipedia/Code/NotificationsCoordinator.swift:24 — Wikipedia/Code/NotificationsCoordinator.swift:24-30 | Wikipedia/Code/WMFAppViewController+Extensions.swift:206-211 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) Wikipedia/Code/YearInReviewCoordinator.swift:162 — Wikipedia/Code/YearInReviewCoordinator.swift:162-169 | Wikipedia/Code/HomeCoordinator.swift:28-33 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) WMFData/Sources/WMFData/Data Controllers/Home/WMFHomeDataController.swift:848 — WMFData/Sources/WMFData/Data Controllers/Home/WMFHomeDataController.swift:848-853 | WMFData/Sources/WMFData/Models/Shared/WMFWhichCameFirstGameState.swift:33-38 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) Wikipedia/Code/DescriptionWelcomePageViewController.swift:165 — Wikipedia/Code/DescriptionWelcomePageViewController.swift:165-170 | Wikipedia/Code/WMFReferencePageViewController.swift:138-143 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) WMF Framework/WMFSparklineView.swift:10 — WMF Framework/WMFSparklineView.swift:10-15 | Widgets/Utilities/CGPoint+Extensions.swift:10-15 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) Wikipedia/Code/NewsViewController.swift:150 — Wikipedia/Code/NewsViewController.swift:150-155 | Wikipedia/Code/OnThisDayViewController.swift:179-185 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) Wikipedia/Code/NewsViewController.swift:157 — Wikipedia/Code/NewsViewController.swift:157-162 | Wikipedia/Code/OnThisDayViewController.swift:187-193 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) Wikipedia/Code/WMFAccountCreationViewController.swift:293 — Wikipedia/Code/WMFAccountCreationViewController.swift:293-298 | Wikipedia/Code/WMFLoginViewController.swift:170-175 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) Wikipedia/Code/ExploreViewController.swift:426 — Wikipedia/Code/ExploreViewController.swift:426-431 | Wikipedia/Code/ReadingListsViewController.swift:101-106 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Editors/Common Views/Input Views/WMFEditorHeaderSelectScrollView.swift:35 — WMFComponents/Sources/WMFComponents/Components/Editors/Common Views/Input Views/WMFEditorHeaderSelectScrollView.swift:35-40 | WMFComponents/Sources/WMFComponents/Components/Editors/Common Views/Input Views/WMFEditorMultiButton.swift:35-40 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) Wikipedia/Code/ArticleCollectionViewController.swift:50 — Wikipedia/Code/ArticleCollectionViewController.swift:50-55 | Wikipedia/Code/ExploreViewController.swift:900-905 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (4 corresponding lines) · ×23
  • Edited copy of a member (4 corresponding lines) WMF Framework/MWKSearchResult.swift:224 — WMF Framework/MWKSearchResult.swift:224-227 | WMF Framework/WMFFeedArticlePreview.swift:205-209 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) WMF Framework/UIView+SemanticContent.swift:89 — WMF Framework/UIView+SemanticContent.swift:89-92 | WMF Framework/UIView+SemanticContent.swift:100-103 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) WMF Framework/CacheFetching.swift:97 — WMF Framework/CacheFetching.swift:97-100 | Wikipedia/Code/Session.swift:765-768 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) WMFData/Sources/WMFData/Data Controllers/Shared/WMFGlobalEditorMetricsDataController.swift:17 — WMFData/Sources/WMFData/Data Controllers/Shared/WMFGlobalEditorMetricsDataController.swift:17-20 | WMFData/Sources/WMFData/Data Controllers/Shared/WMFGlobalEditorMetricsDataController.swift:23-26 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) Wikipedia/Code/BaseExploreFeedSettingsViewController.swift:304 — Wikipedia/Code/BaseExploreFeedSettingsViewController.swift:304-307 | Wikipedia/Code/Temp Accounts/TempAccountsSettingsViewController.swift:154-158 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) Wikipedia/Code/AppearanceSettingsViewController.swift:350 — Wikipedia/Code/AppearanceSettingsViewController.swift:350-354 | Wikipedia/Code/BaseExploreFeedSettingsViewController.swift:299-302 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) Wikipedia/Code/DiffHeaderEditorView.swift:146 — Wikipedia/Code/DiffHeaderEditorView.swift:146-151 | Wikipedia/Code/DiffHeaderSummaryView.swift:94-97 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Games/Which Came First/Core/WMFWhichCameFirstView.swift:70 — WMFComponents/Sources/WMFComponents/Components/Games/Which Came First/Core/WMFWhichCameFirstView.swift:70-73 | WMFComponents/Sources/WMFComponents/Components/Games/Which Came First/Results/WMFWhichCameFirstResultsView.swift:19-22 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) Wikipedia/Code/TalkPageTopicComposeViewController+TalkPageFormattingToolbar.swift:50 — Wikipedia/Code/TalkPageTopicComposeViewController+TalkPageFormattingToolbar.swift:50-53 | Wikipedia/Code/TalkPageViewController+TalkPageFormattingToolbar.swift:53-58 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) Wikipedia/Code/WMFAccountCreationViewController.swift:61 — Wikipedia/Code/WMFAccountCreationViewController.swift:61-64 | Wikipedia/Code/WMFLoginViewController.swift:59-64 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) Wikipedia/Code/BaseExploreFeedSettingsViewController.swift:213 — Wikipedia/Code/BaseExploreFeedSettingsViewController.swift:213-216 | Wikipedia/Code/Temp Accounts/TempAccountsSettingsViewController.swift:69-72 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) Wikipedia/Code/ExploreViewController.swift:209 — Wikipedia/Code/ExploreViewController.swift:209-213 | Wikipedia/Code/SplashScreenViewController.swift:27-30 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) Wikipedia/Code/CircledRankView.swift:42 — Wikipedia/Code/CircledRankView.swift:42-45 | Wikipedia/Code/TagCollectionViewCell.swift:48-51 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) Wikipedia/Code/BaseExploreFeedSettingsViewController.swift:271 — Wikipedia/Code/BaseExploreFeedSettingsViewController.swift:271-274 | Wikipedia/Code/Temp Accounts/TempAccountsSettingsViewController.swift:107-110 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) Wikipedia/Code/ImageCollectionViewCell.swift:35 — Wikipedia/Code/ImageCollectionViewCell.swift:35-38 | Wikipedia/Code/InsertMediaSearchResultCollectionViewCell.swift:28-31 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) Wikipedia/Code/ArticlePopoverViewController.swift:86 — Wikipedia/Code/ArticlePopoverViewController.swift:86-89 | Wikipedia/Code/ScrollableEducationPanelViewController.swift:463-469 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) Wikipedia/Code/EditHistoryCompareFunnel.swift:21 — Wikipedia/Code/EditHistoryCompareFunnel.swift:21-24 | Wikipedia/Code/NavigationEventsFunnel.swift:50-53 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) Wikipedia/Code/WMFAccountCreationViewController.swift:66 — Wikipedia/Code/WMFAccountCreationViewController.swift:66-69 | Wikipedia/Code/WMFLoginViewController.swift:66-69 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) WMFData/Sources/WMFData/Data Controllers/Discover/WMFDiscoverDataController.swift:64 — WMFData/Sources/WMFData/Data Controllers/Discover/WMFDiscoverDataController.swift:64-71 | WMFData/Sources/WMFData/Data Controllers/Discover/WMFDiscoverReadingListDataController.swift:139-142 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) WMFData/Sources/WMFData/Store/WMFUserDefaultsStore.swift:22 — WMFData/Sources/WMFData/Store/WMFUserDefaultsStore.swift:22-25 | WMFData/Sources/WMFDataMocks/WMFMockKeyValueStore.swift:24-27 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) Wikipedia/Code/SearchViewController.swift:527 — Wikipedia/Code/SearchViewController.swift:527-530 | Wikipedia/Code/SettingsTabViewController.swift:237-240 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) WMFData/Sources/WMFData/Data Controllers/Discover/WMFDiscoverDataController.swift:75 — WMFData/Sources/WMFData/Data Controllers/Discover/WMFDiscoverDataController.swift:75-78 | WMFData/Sources/WMFData/Data Controllers/Discover/WMFDiscoverReadingListDataController.swift:83-86 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) Wikipedia/Code/ArticleViewController+Announcements.swift:245 — Wikipedia/Code/ArticleViewController+Announcements.swift:245-252 | Wikipedia/Code/ExploreViewController.swift:1098-1101 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (7 corresponding lines) · ×23
  • Edited copy of a member (7 corresponding lines) WMF Framework/WMFFeedNewsStory.swift:78 — WMF Framework/WMFFeedNewsStory.swift:78-84 | WMF Framework/WMFFeedOnThisDayEvent.swift:82-89 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) WMF Framework/MWKSearchResult.swift:125 — WMF Framework/MWKSearchResult.swift:125-131 | WMF Framework/MWKSearchResult.swift:229-235 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) Wikipedia/Code/NotificationsCenterViewController.swift:448 — Wikipedia/Code/NotificationsCenterViewController.swift:448-454 | Wikipedia/Code/NotificationsCenterViewController.swift:456-466 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) Wikipedia/Code/YearInReviewSlideViewModelFactory.swift:821 — Wikipedia/Code/YearInReviewSlideViewModelFactory.swift:821-827 | Wikipedia/Code/YearInReviewSlideViewModelFactory.swift:944-950 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) WMFData/Sources/WMFData/Data Controllers/Discover/WMFDiscoverReadingListDataController.swift:436 — WMFData/Sources/WMFData/Data Controllers/Discover/WMFDiscoverReadingListDataController.swift:436-449 | WMFData/Sources/WMFData/Data Controllers/Discover/WMFDiscoverReadingListDataController.swift:458-464 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) WMF Framework/ImageCacheDBWriter.swift:25 — WMF Framework/ImageCacheDBWriter.swift:25-34 | WMF Framework/ImageCacheDBWriter.swift:36-42 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) Wikipedia/Code/ArticleLinkInteractionFunnel.swift:27 — Wikipedia/Code/ArticleLinkInteractionFunnel.swift:27-33 | Wikipedia/Code/WatchlistFunnel.swift:179-185 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) Wikipedia/Code/ReadingListsCoordinator.swift:129 — Wikipedia/Code/ReadingListsCoordinator.swift:129-135 | Wikipedia/Code/ReadingListsViewController.swift:128-135 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Editors/Source Editor/Formatter Extensions/WKSourceEditorFormatterLink+ButtonActions.swift:71 — WMFComponents/Sources/WMFComponents/Components/Editors/Source Editor/Formatter Extensions/WKSourceEditorFormatterLink+ButtonActions.swift:71-77 | Wikipedia/Code/UITextView+FormattingToolbarExtension.swift:22-28 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) WMFData/Sources/WMFData/Data Controllers/Page History/WMFPageHistoryDataController.swift:185 — WMFData/Sources/WMFData/Data Controllers/Page History/WMFPageHistoryDataController.swift:185-191 | WMFData/Sources/WMFData/Data Controllers/Page History/WMFPageHistoryDataController.swift:196-202 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) Wikipedia/Code/TalkPageDataController.swift:74 — Wikipedia/Code/TalkPageDataController.swift:74-80 | Wikipedia/Code/TalkPageDataController.swift:82-88 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) Wikipedia/Code/WMFAppViewController.swift:2373 — Wikipedia/Code/WMFAppViewController.swift:2373-2379 | Wikipedia/Code/WMFAppViewController.swift:2381-2388 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) Wikipedia/Code/Temp Accounts/TempAccountsSettingsViewController.swift:80 — Wikipedia/Code/Temp Accounts/TempAccountsSettingsViewController.swift:80-86 | Wikipedia/Code/ProfileCoordinator.swift:274-280 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) Wikipedia/Code/PageHistoryFilterCountsViewController.swift:127 — Wikipedia/Code/PageHistoryFilterCountsViewController.swift:127-133 | Wikipedia/Code/PageHistoryViewController.swift:388-394 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) WMFData/Sources/WMFDataMocks/WMFMockKeyValueStore.swift:29 — WMFData/Sources/WMFDataMocks/WMFMockKeyValueStore.swift:29-35 | WMFData/Sources/WMFData/Store/WMFUserDefaultsStore.swift:27-33 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) Wikipedia/Code/ActivityTabViewController.swift:536 — Wikipedia/Code/ActivityTabViewController.swift:536-543 | Wikipedia/Code/DiscoverReadingListCoordinator.swift:160-166 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) Wikipedia/Code/SearchViewController.swift:519 — Wikipedia/Code/SearchViewController.swift:519-525 | Wikipedia/Code/ActivityTabViewController.swift:625-637 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) Wikipedia/Code/DonateFunnel.swift:599 — Wikipedia/Code/DonateFunnel.swift:599-605 | Wikipedia/Code/ImageRecommendationsFunnel.swift:263-269 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) Wikipedia/Code/YearInReviewCoordinator.swift:511 — Wikipedia/Code/YearInReviewCoordinator.swift:511-521 | Wikipedia/Code/DiscoverReadingListCoordinator.swift:160-166 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/WMFYearInReviewSaveCountSlideDataController.swift:56 — WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/WMFYearInReviewSaveCountSlideDataController.swift:56-62 | WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewReadCountSlideDataController.swift:174-180 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) WMF Framework/UserSession.swift:80 — WMF Framework/UserSession.swift:80-86 | WMFTestKitchen/Sources/WMFTestKitchen/Instrument/Funnel.swift:20-26 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) WMFData/Sources/WMFData/Data Controllers/Activity Tab/WMFActivityTabDataController.swift:198 — WMFData/Sources/WMFData/Data Controllers/Activity Tab/WMFActivityTabDataController.swift:198-204 | WMFData/Sources/WMFData/Data Controllers/Games/WMFGamesDataController.swift:276-282 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) Wikipedia/Code/DonateCoordinator.swift:690 — Wikipedia/Code/DonateCoordinator.swift:690-696 | Wikipedia/Code/NotificationsCenterViewController.swift:641-647 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D3 · God Classes · ClassTooLong · ×21
  • ClassTooLong: PlacesViewController Wikipedia/Code/PlacesViewController.swift:9 — ClassTooLong — 1536 significant lines (blank, comment-only and punctuation-only lines excluded), 102 methods. The bar is 400 significant lines; this is 1136 over it, 3.84× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: WMFAppViewController Wikipedia/Code/WMFAppViewController.swift:49 — ClassTooLong — 1129 significant lines (blank, comment-only and punctuation-only lines excluded), 192 methods. The bar is 400 significant lines; this is 729 over it, 2.82× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: YearInReviewSlideViewModelFactory Wikipedia/Code/YearInReviewSlideViewModelFactory.swift:9 — ClassTooLong — 962 significant lines (blank, comment-only and punctuation-only lines excluded), 74 methods. The bar is 400 significant lines; this is 562 over it, 2.41× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ArticleViewController Wikipedia/Code/ArticleViewController.swift:10 — ClassTooLong — 839 significant lines (blank, comment-only and punctuation-only lines excluded), 255 methods. The bar is 400 significant lines; this is 439 over it, 2.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ReadingListsSyncOperation WMF Framework/ReadingListsSyncOperation.swift:9 — ClassTooLong — 754 significant lines (blank, comment-only and punctuation-only lines excluded), 14 methods. The bar is 400 significant lines; this is 354 over it, 1.89× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: CommonStrings WMFLocalizations/Sources/WMFNativeLocalizations/CommonStrings.swift:7 — ClassTooLong — 706 significant lines (blank, comment-only and punctuation-only lines excluded), 43 methods. The bar is 400 significant lines; this is 306 over it, 1.77× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ExploreViewController Wikipedia/Code/ExploreViewController.swift:9 — ClassTooLong — 642 significant lines (blank, comment-only and punctuation-only lines excluded), 140 methods. The bar is 400 significant lines; this is 242 over it, 1.61× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: SettingsCoordinator Wikipedia/Code/SettingsCoordinator.swift:12 — ClassTooLong — 549 significant lines (blank, comment-only and punctuation-only lines excluded), 47 methods. The bar is 400 significant lines; this is 149 over it, 1.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: PageHistoryViewController Wikipedia/Code/PageHistoryViewController.swift:21 — ClassTooLong — 543 significant lines (blank, comment-only and punctuation-only lines excluded), 44 methods. The bar is 400 significant lines; this is 143 over it, 1.36× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: TalkPageViewController Wikipedia/Code/TalkPageViewController.swift:12 — ClassTooLong — 540 significant lines (blank, comment-only and punctuation-only lines excluded), 98 methods. The bar is 400 significant lines; this is 140 over it, 1.35× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Colors WMF Framework/Theme.swift:94 — ClassTooLong — 524 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 124 over it, 1.31× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: WMFActivityTabHostingController Wikipedia/Code/ActivityTabViewController.swift:10 — ClassTooLong — 508 significant lines (blank, comment-only and punctuation-only lines excluded), 0 methods. The bar is 400 significant lines; this is 108 over it, 1.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: EditorViewController Wikipedia/Code/EditorViewController.swift:14 — ClassTooLong — 474 significant lines (blank, comment-only and punctuation-only lines excluded), 68 methods. The bar is 400 significant lines; this is 74 over it, 1.19× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: EditSaveViewController Wikipedia/Code/EditSaveViewController.swift:50 — ClassTooLong — 463 significant lines (blank, comment-only and punctuation-only lines excluded), 34 methods. The bar is 400 significant lines; this is 63 over it, 1.16× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: WMFSFSymbolIcon WMFComponents/Sources/WMFComponents/Style/WMFIcon.swift:57 — ClassTooLong — 453 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 53 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: HtmlUtils WMFComponents/Sources/WMFComponents/Utility/HTMLUtils.swift:5 — ClassTooLong — 431 significant lines (blank, comment-only and punctuation-only lines excluded), 31 methods. The bar is 400 significant lines; this is 31 over it, 1.08× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: DonateCoordinator Wikipedia/Code/DonateCoordinator.swift:8 — ClassTooLong — 415 significant lines (blank, comment-only and punctuation-only lines excluded), 33 methods. The bar is 400 significant lines; this is 15 over it, 1.04× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: WMFAccountCreationViewController Wikipedia/Code/WMFAccountCreationViewController.swift:10 — ClassTooLong — 414 significant lines (blank, comment-only and punctuation-only lines excluded), 37 methods. The bar is 400 significant lines; this is 14 over it, 1.04× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Session Wikipedia/Code/Session.swift:26 — ClassTooLong — 413 significant lines (blank, comment-only and punctuation-only lines excluded), 48 methods. The bar is 400 significant lines; this is 13 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: WMFActivityTabView WMFComponents/Sources/WMFComponents/Components/Activity Tab/WMFActivityTabView.swift:6 — ClassTooLong — 402 significant lines (blank, comment-only and punctuation-only lines excluded), 12 methods. The bar is 400 significant lines; this is 2 over it, 1.01× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: CollectionViewEditController WMF Framework/CollectionViewEditController.swift:20 — ClassTooLong — 401 significant lines (blank, comment-only and punctuation-only lines excluded), 25 methods. The bar is 400 significant lines; this is 1 over it, 1.00× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication · Edited copy of a member (5 corresponding lines) · ×21
  • Edited copy of a member (5 corresponding lines) Wikipedia/Code/DiffListContextViewModel.swift:97 — Wikipedia/Code/DiffListContextViewModel.swift:97-101 | Wikipedia/Code/DiffListContextViewModel.swift:219-225 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) Wikipedia/Code/WMFAppViewController.swift:554 — Wikipedia/Code/WMFAppViewController.swift:554-558 | Wikipedia/Code/WMFAppViewController.swift:605-612 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) WMFData/Sources/WMFData/Service/WMFBasicService.swift:224 — WMFData/Sources/WMFData/Service/WMFBasicService.swift:224-228 | WMFData/Sources/WMFData/Service/WMFBasicService.swift:265-269 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) Wikipedia/Code/UIViewController+WMFAlerts.swift:6 — Wikipedia/Code/UIViewController+WMFAlerts.swift:6-10 | Wikipedia/Code/UIViewController+WMFAlerts.swift:12-16 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) WMFData/Sources/WMFData/Data Controllers/Home/WMFHomeDataController.swift:789 — WMFData/Sources/WMFData/Data Controllers/Home/WMFHomeDataController.swift:789-793 | WMFData/Sources/WMFData/Data Controllers/Home/WMFHomeDataController.swift:802-806 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) Wikipedia/Code/ActivityTabViewController.swift:676 — Wikipedia/Code/ActivityTabViewController.swift:676-682 | Wikipedia/Code/SearchViewController.swift:347-351 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) Wikipedia/Code/ArticleViewController+ArticlePreviewing.swift:4 — Wikipedia/Code/ArticleViewController+ArticlePreviewing.swift:4-8 | Wikipedia/Code/ExploreCardViewController.swift:704-708 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) Wikipedia/Code/BaseExploreFeedSettingsViewController.swift:207 — Wikipedia/Code/BaseExploreFeedSettingsViewController.swift:207-211 | Wikipedia/Code/Temp Accounts/TempAccountsSettingsViewController.swift:74-78 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) Wikipedia/Code/TalkPageCoffeeRollViewController.swift:45 — Wikipedia/Code/TalkPageCoffeeRollViewController.swift:45-49 | Wikipedia/Code/TalkPageViewController.swift:249-253 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Activity Tab/WMFActivityTabView.swift:588 — WMFComponents/Sources/WMFComponents/Components/Activity Tab/WMFActivityTabView.swift:588-593 | WMFComponents/Sources/WMFComponents/Components/Activity Tab/WMFImpactViews.swift:361-365 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Activity Tab/WMFImpactViews.swift:355 — WMFComponents/Sources/WMFComponents/Components/Activity Tab/WMFImpactViews.swift:355-359 | WMFComponents/Sources/WMFComponents/Components/Games/Which Came First/Results/WMFWhichCameFirstResultsView.swift:28-33 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Suggested Edits/Image Recommendations/WMFImageRecommendationsViewController.swift:219 — WMFComponents/Sources/WMFComponents/Components/Suggested Edits/Image Recommendations/WMFImageRecommendationsViewController.swift:219-223 | Wikipedia/Code/TalkPageViewController.swift:291-296 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) Wikipedia/Code/DiscoverInstrumentation.swift:54 — Wikipedia/Code/DiscoverInstrumentation.swift:54-58 | Wikipedia/Code/SearchInstrumentation.swift:90-95 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Developer Settings/WMFDeveloperSettingsView.swift:344 — WMFComponents/Sources/WMFComponents/Components/Developer Settings/WMFDeveloperSettingsView.swift:344-348 | WMFComponents/Sources/WMFComponents/Components/Discover/WMFDiscoverSettingsView.swift:62-66 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Developer Settings/WMFDeveloperSettingsView.swift:350 — WMFComponents/Sources/WMFComponents/Components/Developer Settings/WMFDeveloperSettingsView.swift:350-354 | WMFComponents/Sources/WMFComponents/Components/Discover/WMFDiscoverSettingsView.swift:68-72 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Editors/Common Views/Base/WMFEditorToolbarButton.swift:123 — WMFComponents/Sources/WMFComponents/Components/Editors/Common Views/Base/WMFEditorToolbarButton.swift:123-127 | WMFComponents/Sources/WMFComponents/Components/Editors/Common Views/Input Views/WMFEditorMultiButton.swift:127-133 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) Wikipedia/Code/EditSaveViewController.swift:414 — Wikipedia/Code/EditSaveViewController.swift:414-419 | Wikipedia/Code/TalkPageViewController.swift:285-289 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/WMFYearInReviewMostReadDateSlideDataController.swift:18 — WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/WMFYearInReviewMostReadDateSlideDataController.swift:18-22 | WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewLocationSlideDataController.swift:19-24 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) Wikipedia/Code/CollectionViewFooter.swift:58 — Wikipedia/Code/CollectionViewFooter.swift:58-62 | Wikipedia/Code/InsertMediaSettingsButtonView.swift:34-38 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) WMF Framework/ArticleCollectionViewCell+Themeable.swift:20 — WMF Framework/ArticleCollectionViewCell+Themeable.swift:20-24 | Wikipedia/Code/ReadingListsCollectionViewCell.swift:206-210 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Shared/Error View/WMFErrorViewModel.swift:11 — WMFComponents/Sources/WMFComponents/Components/Shared/Error View/WMFErrorViewModel.swift:11-15 | WMFComponents/Sources/WMFComponents/Components/Temp Accounts/WMFTempAccountsSheetViewModel.swift:34-39 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (3 corresponding lines) · ×20
  • Edited copy of a member (3 corresponding lines) Wikipedia/Code/WMFSearchFetcher.swift:25 — Wikipedia/Code/WMFSearchFetcher.swift:25-31 | Wikipedia/Code/WMFSearchFetcher.swift:34-36 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) Wikipedia/Code/NewsCollectionViewCell.swift:15 — Wikipedia/Code/NewsCollectionViewCell.swift:15-17 | Wikipedia/Code/SavedArticlesCollectionViewCell.swift:128-130 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) WMF Framework/UIView+SemanticContent.swift:105 — WMF Framework/UIView+SemanticContent.swift:105-107 | WMF Framework/UIView+SemanticContent.swift:109-111 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) WMF Framework/ReadingListsAPIController.swift:192 — WMF Framework/ReadingListsAPIController.swift:192-194 | WMF Framework/ReadingListsAPIController.swift:200-202 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) WMF Framework/WMFSparklineView.swift:6 — WMF Framework/WMFSparklineView.swift:6-8 | Widgets/Utilities/CGPoint+Extensions.swift:6-8 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) WMF Framework/ImageCacheController.swift:129 — WMF Framework/ImageCacheController.swift:129-131 | WMF Framework/PermanentCacheController.swift:60-62 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) WMF Framework/ImageCacheController.swift:158 — WMF Framework/ImageCacheController.swift:158-160 | WMF Framework/PermanentCacheController.swift:40-42 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Article Tabs/WMFArticleTabsView.swift:487 — WMFComponents/Sources/WMFComponents/Components/Article Tabs/WMFArticleTabsView.swift:487-489 | WMFComponents/Sources/WMFComponents/Components/Games/Which Came First/Results/Articles View/WMFWhichCameFirstArticlesView.swift:153-155 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) WMFData/Sources/WMFData/Service/Protocol/WMFURLSession.swift:24 — WMFData/Sources/WMFData/Service/Protocol/WMFURLSession.swift:24-26 | Wikipedia/Code/TestNetworkFixtures/TestNetworkFixtureURLSession.swift:21-23 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) WMF Framework/MediaWikiFetcher.swift:187 — WMF Framework/MediaWikiFetcher.swift:187-190 | WMFData/Sources/WMFDataMocks/WMFMockWatchlistMediaWikiService.swift:170-172 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) Wikipedia/Code/SessionHTTPClient.swift:65 — Wikipedia/Code/SessionHTTPClient.swift:65-67 | Wikipedia/Code/TestNetworkFixtures/TestNetworkFixtureHTTPClient.swift:30-32 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Editors/Common Views/Base/WMFEditorToolbarButton.swift:104 — WMFComponents/Sources/WMFComponents/Components/Editors/Common Views/Base/WMFEditorToolbarButton.swift:104-106 | WMFComponents/Sources/WMFComponents/Components/Editors/Common Views/WMFEditorToolbarNavigatorButton.swift:79-81 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) Wikipedia/Code/ArticleViewController+LinkPreviewing.swift:32 — Wikipedia/Code/ArticleViewController+LinkPreviewing.swift:32-34 | Wikipedia/Code/EditPreviewViewController.swift:307-310 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewTopArticlesSlideDataController.swift:55 — WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewTopArticlesSlideDataController.swift:55-57 | Wikipedia/Code/WikipediaURLTranslations.swift:15-17 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) Wikipedia/Code/ExploreCardViewController.swift:532 — Wikipedia/Code/ExploreCardViewController.swift:532-534 | Wikipedia/Code/ReadingListsViewController.swift:173-175 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) WMF Framework/CacheFetching.swift:126 — WMF Framework/CacheFetching.swift:126-128 | Wikipedia/Code/Session.swift:794-796 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Year in Review/WMFYearInReviewHighlightsShareView.swift:225 — WMFComponents/Sources/WMFComponents/Components/Year in Review/WMFYearInReviewHighlightsShareView.swift:225-227 | Wikipedia/Code/YearInReviewSlideViewModelFactory.swift:1199-1201 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) Wikipedia/Code/ArticleCollectionViewController.swift:186 — Wikipedia/Code/ArticleCollectionViewController.swift:186-188 | REDACTED:476-478 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) Wikipedia/Code/ArticleViewController+References.swift:4 — Wikipedia/Code/ArticleViewController+References.swift:4-6 | Wikipedia/Code/EditPreviewViewController.swift:231-233 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) WMFData/Sources/WMFDataMocks/WMFMockGrowthTasksService.swift:125 — WMFData/Sources/WMFDataMocks/WMFMockGrowthTasksService.swift:125-127 | WMFData/Sources/WMFDataMocks/WMFMockWatchlistMediaWikiService.swift:170-172 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×19
  • Duplicated block (5 lines × 2) WMFComponents/Sources/WMFComponents/Components/Settings/Home/For You/Whats Driving/Your Interests/WMFInterestArticleCardViewModel.swift:28 — WMFComponents/Sources/WMFComponents/Components/Settings/Home/For You/Whats Driving/Your Interests/WMFInterestArticleCardViewModel.swift:28-32 | WMFComponents/Sources/WMFComponents/Components/Settings/Home/For You/Whats Driving/Your Interests/WMFInterestArticleCardViewModel.swift:53-57 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) Wikipedia/Code/AppOnboardingCoordinator.swift:329 — Wikipedia/Code/AppOnboardingCoordinator.swift:329-333 | Wikipedia/Code/WhichCameFirstCoordinator.swift:417-421 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/AppOnboardingCoordinator.swift:329` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) Wikipedia/Code/DiscoverReadingListCoordinator.swift:170 — Wikipedia/Code/DiscoverReadingListCoordinator.swift:170-174 | Wikipedia/Code/DonationReminderSetupCoordinator.swift:141-147 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/DiscoverReadingListCoordinator.swift:170` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) Wikipedia/Code/EditorViewController.swift:850 — Wikipedia/Code/EditorViewController.swift:850-854 | Wikipedia/Code/EditorViewController.swift:861-865 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/EditorViewController.swift:850` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) Wikipedia/Code/TalkPageFindInPageSearchController.swift:48 — Wikipedia/Code/TalkPageFindInPageSearchController.swift:48-52 | Wikipedia/Code/TalkPageFindInPageSearchController.swift:89-93 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/TalkPageFindInPageSearchController.swift:48` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) WMFComponents/Sources/WMFComponents/Components/Editors/Common Views/Base/WMFEditorToolbarButton.swift:51 — WMFComponents/Sources/WMFComponents/Components/Editors/Common Views/Base/WMFEditorToolbarButton.swift:51-55 | WMFComponents/Sources/WMFComponents/Components/Editors/Common Views/WMFEditorToolbarNavigatorButton.swift:47-51 — before extracting anything, compare `WMFComponents/Sources/WMFComponents/Components/Editors/Common Views/Base/WMFEditorToolbarButton.swift` and `WMFComponents/Sources/WMFComponents/Components/Editors/Common Views/WMFEditorToolbarNavigatorButton.swift` as WHOLE FILES: 85% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) Wikipedia/Code/Advanced Settings/InsertMediaImagePositionSettingsViewController.swift:121 — Wikipedia/Code/Advanced Settings/InsertMediaImagePositionSettingsViewController.swift:121-125 | Wikipedia/Code/Advanced Settings/InsertMediaImageTypeSettingsViewController.swift:140-144 — before extracting anything, compare `Wikipedia/Code/Advanced Settings/InsertMediaImagePositionSettingsViewController.swift` and `Wikipedia/Code/Advanced Settings/InsertMediaImageTypeSettingsViewController.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) Wikipedia/Code/ArticleViewController+Editing.swift:358 — Wikipedia/Code/ArticleViewController+Editing.swift:358-362 | Wikipedia/Code/TalkPageViewController.swift:1442-1446 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) Wikipedia/Code/TalkPageTopicReplyOnboardingHostingController.swift:46 — Wikipedia/Code/TalkPageTopicReplyOnboardingHostingController.swift:46-50 | Wikipedia/Code/VanishAccountWarningViewHostingViewController.swift:58-62 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) WMFComponents/Sources/WMFComponents/Components/Discover/WMFDiscoverSettingsHostingController.swift:8 — WMFComponents/Sources/WMFComponents/Components/Discover/WMFDiscoverSettingsHostingController.swift:8-12 | WMFComponents/Sources/WMFComponents/Components/Discover/WMFDiscoverSetupHostingController.swift:8-12 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Note first that the copies are not typed on the same thing: the declarations holding them bind `viewModel` to `WMFDiscoverSettingsViewModel` in one and `WMFDiscoverSetupViewModel` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (5 lines × 2) Widgets/Widgets/LockscreenSearchWidget.swift:65 — Widgets/Widgets/LockscreenSearchWidget.swift:65-69 | Widgets/Widgets/SearchWidget.swift:67-71 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Note first that the copies are not typed on the same thing: the declarations holding them bind `completion` to `@escaping (Timeline<LockscreenSearchEntry>) -> Void` in one and `@escaping (Timeline<SearchEntry>) -> Void` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (5 lines × 2) Widgets/Widgets/OnThisDayWidget.swift:58 — Widgets/Widgets/OnThisDayWidget.swift:58-62 | Widgets/Widgets/TopReadWidget.swift:156-160 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Note first that the copies are not typed on the same thing: the declarations holding them bind `completion` to `@escaping (OnThisDayEntry) -> Void` in one and `@escaping (TopReadEntry) -> Void` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (5 lines × 2) Wikipedia/Code/Advanced Settings/InsertMediaImagePositionSettingsViewController.swift:24 — Wikipedia/Code/Advanced Settings/InsertMediaImagePositionSettingsViewController.swift:24-28 | Wikipedia/Code/Advanced Settings/InsertMediaImageTypeSettingsViewController.swift:23-27 — before extracting anything, compare `Wikipedia/Code/Advanced Settings/InsertMediaImagePositionSettingsViewController.swift` and `Wikipedia/Code/Advanced Settings/InsertMediaImageTypeSettingsViewController.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) Wikipedia/Code/EditNoticesViewController.swift:21 — Wikipedia/Code/EditNoticesViewController.swift:21-25 | Wikipedia/Code/TalkPageCoffeeRollViewController.swift:24-28 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Note first that the copies are not typed on the same thing: the declarations holding them bind `viewModel` to `EditNoticesViewModel` in one and `TalkPageCoffeeRollViewModel` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (5 lines × 2) WMF Framework/TimelineView.swift:274 — WMF Framework/TimelineView.swift:274-278 | WMF Framework/TimelineView.swift:280-284 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) Wikipedia/Code/DiffListChangeCell.swift:139 — Wikipedia/Code/DiffListChangeCell.swift:139-143 | Wikipedia/Code/DiffListChangeCell.swift:168-172 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) Wikipedia/Code/DiffListContextViewModel.swift:208 — Wikipedia/Code/DiffListContextViewModel.swift:208-212 | Wikipedia/Code/DiffListUneditedViewModel.swift:63-67 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) Wikipedia/Code/HomeFeedSettingsCoordinator.swift:84 — Wikipedia/Code/HomeFeedSettingsCoordinator.swift:84-88 | Wikipedia/Code/HomeFeedSettingsCoordinator.swift:169-173 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) WMFData/Sources/WMFDataMocks/WMFMockURLSession.swift:62 — WMFData/Sources/WMFDataMocks/WMFMockURLSession.swift:62-66 | WMFData/Sources/WMFDataMocks/WMFMockURLSession.swift:89-93 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Edited copy of a member (12 corresponding lines) · ×18
  • Edited copy of a member (12 corresponding lines) WMF Framework/Fetcher.swift:105 — WMF Framework/Fetcher.swift:105-116 | WMF Framework/Fetcher.swift:118-129 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) WMFComponents/Sources/WMFComponents/Base/WMFCanvasViewController.swift:24 — WMFComponents/Sources/WMFComponents/Base/WMFCanvasViewController.swift:24-35 | WMFComponents/Sources/WMFComponents/Base/WMFCanvasViewController.swift:37-48 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) Wikipedia/Code/ScrollableEducationPanelViewController.swift:338 — Wikipedia/Code/ScrollableEducationPanelViewController.swift:338-349 | Wikipedia/Code/ScrollableEducationPanelViewController.swift:351-365 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) Wikipedia/Code/ColumnarCollectionViewLayoutManager.swift:54 — Wikipedia/Code/ColumnarCollectionViewLayoutManager.swift:54-66 | Wikipedia/Code/ColumnarCollectionViewLayoutManager.swift:68-79 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) WMF Framework/MWKSearchResult.swift:40 — WMF Framework/MWKSearchResult.swift:40-53 | WMF Framework/WMFFeedArticlePreview.swift:32-43 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) WMFData/Sources/WMFData/Data Controllers/Shared/WMFArticleSearchDataController.swift:380 — WMFData/Sources/WMFData/Data Controllers/Shared/WMFArticleSearchDataController.swift:380-391 | Wikipedia/Code/TalkPageFetcher.swift:43-54 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) Wikipedia/Code/ReadingListsCoordinator.swift:27 — Wikipedia/Code/ReadingListsCoordinator.swift:27-39 | Wikipedia/Code/SavedAllArticlesCoordinator.swift:22-33 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) Wikipedia/Code/DescriptionEditViewController.swift:268 — Wikipedia/Code/DescriptionEditViewController.swift:268-279 | Wikipedia/Code/DescriptionEditViewController.swift:281-292 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) Wikipedia/Code/ArticleViewController+References.swift:31 — Wikipedia/Code/ArticleViewController+References.swift:31-45 | Wikipedia/Code/ReferenceBackLinksViewControllerDelegate.swift:45-56 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) WMF Framework/Remote Notifications/Model/RemoteNotificationFilterType.swift:221 — WMF Framework/Remote Notifications/Model/RemoteNotificationFilterType.swift:221-232 | WMF Framework/Remote Notifications/Model/RemoteNotificationType.swift:68-79 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) WMFData/Sources/WMFData/Data Controllers/Article Tabs/WMFArticleTabsDataController.swift:138 — WMFData/Sources/WMFData/Data Controllers/Article Tabs/WMFArticleTabsDataController.swift:138-149 | WMFData/Sources/WMFData/Data Controllers/Year In Review/WMFYearInReviewDataController.swift:66-79 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/WMFYearInReviewViewCountSlideDataController.swift:47 — WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/WMFYearInReviewViewCountSlideDataController.swift:47-58 | WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewEditCountSlideDataController.swift:30-41 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) Wikipedia/Code/NotificationsCenterViewController.swift:502 — Wikipedia/Code/NotificationsCenterViewController.swift:502-513 | Wikipedia/Code/NotificationsCenterViewController.swift:515-526 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Settings/Account/WMFAccountSettingsViewModel.swift:90 — WMFComponents/Sources/WMFComponents/Components/Settings/Account/WMFAccountSettingsViewModel.swift:90-101 | WMFComponents/Sources/WMFComponents/Components/Settings/Push Notifications/WMFPushNotificationsSettingsViewModel.swift:117-128 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Discover/WMFDiscoverReadingListRowView.swift:88 — WMFComponents/Sources/WMFComponents/Components/Discover/WMFDiscoverReadingListRowView.swift:88-99 | WMFComponents/Sources/WMFComponents/Components/Search/Results/WMFSearchResultRow.swift:159-171 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) WMF Framework/Remote Notifications/Operations/RemoteNotificationsRefreshCrossWikiOperation.swift:9 — WMF Framework/Remote Notifications/Operations/RemoteNotificationsRefreshCrossWikiOperation.swift:9-20 | WMF Framework/Remote Notifications/RemoteNotificationsOperationsController.swift:9-21 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Editors/Common Views/Base/WMFEditorToolbarButton.swift:91 — WMFComponents/Sources/WMFComponents/Components/Editors/Common Views/Base/WMFEditorToolbarButton.swift:91-102 | WMFComponents/Sources/WMFComponents/Components/Editors/Common Views/WMFEditorToolbarNavigatorButton.swift:66-77 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) Wikipedia/Code/ArticleViewController+FindInPage.swift:33 — Wikipedia/Code/ArticleViewController+FindInPage.swift:33-44 | Wikipedia/Code/TalkPageFindInPageState.swift:47-58 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×18
  • Duplicated block (7 lines × 2) WMF Framework/ReadingListsSyncOperation.swift:587 — WMF Framework/ReadingListsSyncOperation.swift:587-593 | WMF Framework/ReadingListsSyncOperation.swift:721-727 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `WMF Framework/ReadingListsSyncOperation.swift:587` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
  • Duplicated block (7 lines × 2) WMFData/Sources/WMFData/Data Controllers/Shared/WMFPageTopicsDataController.swift:169 — WMFData/Sources/WMFData/Data Controllers/Shared/WMFPageTopicsDataController.swift:169-175 | WMFData/Sources/WMFData/Data Controllers/Shared/WMFPageTopicsDataController.swift:212-218 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) Widgets/Widgets/FeaturedArticleWidget.swift:82 — Widgets/Widgets/FeaturedArticleWidget.swift:82-88 | Widgets/Widgets/FeaturedArticleWidget.swift:98-104 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Widgets/Widgets/FeaturedArticleWidget.swift:82` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) Wikipedia/Code/ArticleFetcher.swift:174 — Wikipedia/Code/ArticleFetcher.swift:174-180 | Wikipedia/Code/ArticleFetcher.swift:243-249 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) Wikipedia/Code/TalkPageFindInPageSearchController.swift:60 — Wikipedia/Code/TalkPageFindInPageSearchController.swift:60-66 | Wikipedia/Code/TalkPageFindInPageSearchController.swift:74-80 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/TalkPageFindInPageSearchController.swift:60` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) WMFComponents/Sources/WMFComponents/Components/Watchlist/WMFWatchlistViewController.swift:55 — WMFComponents/Sources/WMFComponents/Components/Watchlist/WMFWatchlistViewController.swift:55-61 | WMFComponents/Sources/WMFComponents/Components/Watchlist/WMFWatchlistViewController.swift:88-94 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `WMFComponents/Sources/WMFComponents/Components/Watchlist/WMFWatchlistViewController.swift:64` calls `logWatchlistUserDidTapUserButton` and `WMFComponents/Sources/WMFComponents/Components/Watchlist/WMFWatchlistViewController.swift:96` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 2) Wikipedia/Code/WMFAccountCreationViewController.swift:213 — Wikipedia/Code/WMFAccountCreationViewController.swift:213-219 | Wikipedia/Code/WMFLoginViewController.swift:471-477 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/WMFAccountCreationViewController.swift:213` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) WMFData/Sources/WMFData/Data Controllers/Discover/WMFDiscoverInterestsDataController.swift:289 — WMFData/Sources/WMFData/Data Controllers/Discover/WMFDiscoverInterestsDataController.swift:289-295 | WMFData/Sources/WMFData/Data Controllers/Discover/WMFDiscoverReadingListDataController+Seeds.swift:108-114 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) Wikipedia/Code/ArticleViewController+ArticlePreviewing.swift:19 — Wikipedia/Code/ArticleViewController+ArticlePreviewing.swift:19-25 | Wikipedia/Code/ColumnarCollectionViewController.swift:546-552 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) Wikipedia/Code/DescriptionWelcomeInitialViewController.swift:7 — Wikipedia/Code/DescriptionWelcomeInitialViewController.swift:7-13 | Wikipedia/Code/EmptyViewController.swift:30-39 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) Wikipedia/Code/NotificationsCenterViewController.swift:982 — Wikipedia/Code/NotificationsCenterViewController.swift:982-988 | Wikipedia/Code/TalkPageViewController.swift:535-541 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/TalkPageViewController.swift:535` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (7 lines × 2) Wikipedia/Code/TalkPageCellCommentView.swift:176 — Wikipedia/Code/TalkPageCellCommentView.swift:176-182 | Wikipedia/Code/TalkPageCellTopicView.swift:440-446 — before extracting anything, compare `Wikipedia/Code/TalkPageCellCommentView.swift` and `Wikipedia/Code/TalkPageCellTopicView.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) Wikipedia/Code/WMFAccountCreationViewController.swift:280 — Wikipedia/Code/WMFAccountCreationViewController.swift:280-287 | Wikipedia/Code/WMFLoginViewController.swift:198-204 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) Wikipedia/Code/WMFAccountCreationViewController.swift:328 — Wikipedia/Code/WMFAccountCreationViewController.swift:328-334 | Wikipedia/Code/WMFLoginViewController.swift:162-168 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) WMFData/Sources/WMFData/Data Controllers/Discover/WMFDiscoverDataController.swift:197 — WMFData/Sources/WMFData/Data Controllers/Discover/WMFDiscoverDataController.swift:197-203 | WMFData/Sources/WMFData/Data Controllers/Semantic Search/WMFSemanticSearchDataController.swift:218-224 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (7 lines × 2) Wikipedia/Code/ArticleViewController.swift:985 — Wikipedia/Code/ArticleViewController.swift:985-991 | Wikipedia/Code/SinglePageWebViewController.swift:289-295 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) Wikipedia/Code/InsertMediaSettingsImageView.swift:47 — Wikipedia/Code/InsertMediaSettingsImageView.swift:47-53 | Wikipedia/Code/InsertMediaSettingsTextTableViewCell.swift:64-70 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) Widgets/Widgets/RandomWidget.swift:16 — Widgets/Widgets/RandomWidget.swift:16-22 | Widgets/Widgets/RandomWidget.swift:24-30 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D3 · God Classes · MethodTooLong · ×17
  • MethodTooLong: WMFSFSymbolIcon.`for` WMFComponents/Sources/WMFComponents/Style/WMFIcon.swift:212 — MethodTooLong — `for` runs 302 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 202 over it, 3.02× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ProfileState.sections WMFComponents/Sources/WMFComponents/Components/Profile/WMFProfileViewModel.swift:92 — MethodTooLong — sections runs 274 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 174 over it, 2.74× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: WMFDeveloperSettingsView.body WMFComponents/Sources/WMFComponents/Components/Developer Settings/WMFDeveloperSettingsView.swift:13 — MethodTooLong — body runs 239 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 139 over it, 2.39× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: WMFFont.`for` WMFComponents/Sources/WMFComponents/Style/WMFFont.swift:61 — MethodTooLong — `for` runs 186 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 86 over it, 1.86× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ReadingListsSyncOperation.processLocalUpdates WMF Framework/ReadingListsSyncOperation.swift:510 — MethodTooLong — processLocalUpdates runs 176 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 76 over it, 1.76× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: DonateCoordinator.presentActionSheet Wikipedia/Code/DonateCoordinator.swift:219 — MethodTooLong — presentActionSheet runs 176 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 76 over it, 1.76× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: PlacesViewController.regroupArticlesIfNecessary Wikipedia/Code/PlacesViewController.swift:1414 — MethodTooLong — regroupArticlesIfNecessary runs 161 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 61 over it, 1.61× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: WMFAppViewController.generateActivityTab Wikipedia/Code/WMFAppViewController+Extensions.swift:1038 — MethodTooLong — generateActivityTab runs 157 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 57 over it, 1.57× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ReadingListsSyncOperation.executeSync WMF Framework/ReadingListsSyncOperation.swift:72 — MethodTooLong — executeSync runs 131 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 31 over it, 1.31× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: WMFAccountLoginLogoutFetcher.login Wikipedia/Code/WMFAccountLoginLogoutFetcher.swift:89 — MethodTooLong — login runs 130 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 30 over it, 1.30× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: WMFAppViewController.viewDidLoad Wikipedia/Code/WMFAppViewController.swift:155 — MethodTooLong — viewDidLoad runs 123 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 23 over it, 1.23× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: WMFNavigationBarConfiguring.configureNavigationBar WMFComponents/Sources/WMFComponents/Extensions/Navigation Bar/WMFNavigationBarConfiguring.swift:122 — MethodTooLong — configureNavigationBar runs 121 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 21 over it, 1.21× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: DetailTransition.animateTransition Wikipedia/Code/DetailTransition.swift:36 — MethodTooLong — animateTransition runs 107 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 7 over it, 1.07× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ArticlePlaceView.setup Wikipedia/Code/ArticlePlaceView.swift:61 — MethodTooLong — setup runs 106 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 6 over it, 1.06× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ArticleCacheDBWriter.syncResources WMF Framework/ArticleCacheDBWriter+SyncResources.swift:35 — MethodTooLong — syncResources runs 104 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 4 over it, 1.04× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AppOnboardingCoordinator.start Wikipedia/Code/AppOnboardingCoordinator.swift:33 — MethodTooLong — start runs 103 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 3 over it, 1.03× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: NotificationsCenterCell.setup Wikipedia/Code/NotificationsCenterCell.swift:312 — MethodTooLong — setup runs 102 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 2 over it, 1.02× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×17
  • Swallowed exception (caught, then discarded) Wikipedia/Code/UIViewController+Extensions.swift:25 — `catch _` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) Wikipedia/Code/WMFAccountCreationViewController.swift:227 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) Wikipedia/Code/WMFKeychainCredentials.swift:19 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) Wikipedia/Code/WMFKeychainCredentials.swift:36 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) Wikipedia/Code/WMFKeychainCredentials.swift:53 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) Wikipedia/Code/WMFLoginViewController.swift:482 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) WMFData/Sources/WMFData/Data Controllers/Year In Review/WMFYearInReviewDataController.swift:694 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) WMFData/Sources/WMFData/Data Controllers/Year In Review/WMFYearInReviewDataController.swift:943 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) WMFData/Sources/WMFData/Data Controllers/Settings/WMFSettingsDataController.swift:130 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) WMFData/Sources/WMFData/Data Controllers/Saved Articles/WMFSavedArticlesDataController.swift:252 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) WMFData/Sources/WMFData/Data Controllers/Discover/WMFDiscoverReadingListDataController.swift:386 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) WMFComponents/Sources/WMFComponents/Components/Settings/Home/For You/Whats Driving/Your Interests/WMFHomeFeedInterestsSettingsViewModel.swift:268 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) WMFComponents/Sources/WMFComponents/Components/Discover/WMFDiscoverReadingListViewModel.swift:110 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) WMFComponents/Sources/WMFComponents/Components/Article Tabs/WMFArticleTabsViewModel.swift:364 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) WMF Framework/CacheController.swift:30 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) WMF Framework/CacheDBWriterHelper.swift:85 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) WMF Framework/CacheDBWriterHelper.swift:96 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
D4 · Code Duplication · Edited copy of a member (11 corresponding lines) · ×16
  • Edited copy of a member (11 corresponding lines) Wikipedia/Code/ArticleFetcher.swift:173 — Wikipedia/Code/ArticleFetcher.swift:173-184 | Wikipedia/Code/ArticleFetcher.swift:242-252 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) Wikipedia/Code/Session.swift:659 — Wikipedia/Code/Session.swift:659-673 | Wikipedia/Code/Session.swift:683-693 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) Wikipedia/Code/ArticlePeekPreviewViewController.swift:244 — Wikipedia/Code/ArticlePeekPreviewViewController.swift:244-257 | Wikipedia/Code/ArticleViewController+Sharing.swift:36-46 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) WMFData/Sources/WMFData/Data Controllers/History /WMFHistoryDataController.swift:16 — WMFData/Sources/WMFData/Data Controllers/History /WMFHistoryDataController.swift:16-27 | WMFData/Sources/WMFData/Data Controllers/History /WMFHistoryDataController.swift:163-173 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Settings/WMFSettingsViewModel.swift:166 — WMFComponents/Sources/WMFComponents/Components/Settings/WMFSettingsViewModel.swift:166-176 | WMFComponents/Sources/WMFComponents/Components/Settings/WMFSettingsViewModel.swift:204-223 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) Wikipedia/Code/WMFAppViewController.swift:2311 — Wikipedia/Code/WMFAppViewController.swift:2311-2325 | Wikipedia/Code/WMFAppViewController.swift:2327-2337 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) Wikipedia/Code/ExploreViewController.swift:1212 — Wikipedia/Code/ExploreViewController.swift:1212-1226 | Wikipedia/Code/YearInReviewCoordinator.swift:533-543 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) Wikipedia/Code/ExploreCardViewController.swift:465 — Wikipedia/Code/ExploreCardViewController.swift:465-475 | Wikipedia/Code/ExploreCardViewController.swift:477-488 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) Wikipedia/Code/CircledRankView.swift:17 — Wikipedia/Code/CircledRankView.swift:17-27 | Wikipedia/Code/IconTitleBadge.swift:51-63 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) Wikipedia/Code/TalkPageViewController.swift:611 — Wikipedia/Code/TalkPageViewController.swift:611-621 | Wikipedia/Code/TalkPageViewController.swift:678-690 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) WMFComponents/Sources/WMFComponents/Utility/HTMLUtils.swift:453 — WMFComponents/Sources/WMFComponents/Utility/HTMLUtils.swift:453-463 | WMFComponents/Sources/WMFComponents/Utility/HTMLUtils.swift:465-475 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) Wikipedia/Code/InsertMediaSettingsViewController.swift:514 — Wikipedia/Code/InsertMediaSettingsViewController.swift:514-525 | Wikipedia/Code/InsertMediaViewController.swift:150-160 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Activity Tab/View Models/ArticlesReadViewModel.swift:22 — WMFComponents/Sources/WMFComponents/Components/Activity Tab/View Models/ArticlesReadViewModel.swift:22-34 | WMFComponents/Sources/WMFComponents/Components/Activity Tab/View Models/ArticlesSavedViewModel.swift:18-28 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) Wikipedia/Code/Advanced Settings/InsertMediaImageTypeSettingsViewController.swift:87 — Wikipedia/Code/Advanced Settings/InsertMediaImageTypeSettingsViewController.swift:87-97 | Wikipedia/Code/PageHistoryViewController.swift:365-376 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) Wikipedia/Code/ExploreViewController.swift:1788 — Wikipedia/Code/ExploreViewController.swift:1788-1799 | Wikipedia/Code/ExploreViewController.swift:1878-1888 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) Wikipedia/Code/DiffListChangeCell.swift:196 — Wikipedia/Code/DiffListChangeCell.swift:196-206 | Wikipedia/Code/DiffListContextCell.swift:167-177 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D10 · Test Quality · No assertions · ×15
  • No assertions: testUndoOnSettingsMakesTheListWhenItIsOutOfDate WikipediaUnitTests/Code/DiscoverSettingsCoordinatorTests.swift:78 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testBackFromTheDiscoverSettingsMakesTheList WikipediaUnitTests/Code/DiscoverSettingsCoordinatorTests.swift:192 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testDismissalWithAPushedScreenOnTopCallsDidDismissOnce WikipediaUnitTests/Code/WMFComponentNavigationControllerTests.swift:27 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testDiscoverSettingsViewModelIsReleased WMFComponents/Tests/WMFComponentsTests/WMFSettingsViewModelsReleaseTests.swift:66 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: successDoesNotCallHTTPErrorLogger WMFData/Tests/WMFDataTests/WMFBasicServiceHTTPErrorLoggerTests.swift:50 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: donateSubmitPayment WMFData/Tests/WMFDataTests/WMFDonateDataControllerTests.swift:37 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testFetchFeedSucceeds WMFData/Tests/WMFDataTests/WMFFeedDataControllerTests.swift:25 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testFetchCommunitySucceeds WMFData/Tests/WMFDataTests/WMFHomeDataControllerTests.swift:370 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: fetchImageInfoReturnsUnexpectedResponseWhenNoPages WMFData/Tests/WMFDataTests/WMFImageDataControllerTests.swift:161 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: fetchImageInfoFailsWhenMediaWikiServiceUnavailable WMFData/Tests/WMFDataTests/WMFImageDataControllerTests.swift:177 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: fetchThrowsUnexpectedResponseWhenDataIsNil WMFData/Tests/WMFDataTests/WMFUserImpactDataControllerTests.swift:20 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: fetchWrapsServiceFailureAsServiceError WMFData/Tests/WMFDataTests/WMFUserImpactDataControllerTests.swift:36 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: postWatchArticleExpiryNever WMFData/Tests/WMFDataTests/WMFWatchlistDataControllerTests.swift:212 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: postWatchArticleExpiryDate WMFData/Tests/WMFDataTests/WMFWatchlistDataControllerTests.swift:221 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: postUnwatchArticle WMFData/Tests/WMFDataTests/WMFWatchlistDataControllerTests.swift:230 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
D4 · Code Duplication · Edited copy of a member (17 corresponding lines) · ×14
  • Edited copy of a member (17 corresponding lines) Wikipedia/Code/DescriptionWelcomePageViewController.swift:101 — Wikipedia/Code/DescriptionWelcomePageViewController.swift:101-117 | Wikipedia/Code/DescriptionWelcomePageViewController.swift:119-135 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) Wikipedia/Code/ExploreViewController.swift:747 — Wikipedia/Code/ExploreViewController.swift:747-765 | Wikipedia/Code/PageHistoryViewController.swift:614-630 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) WMF Framework/Collection+AsyncMap.swift:29 — WMF Framework/Collection+AsyncMap.swift:29-45 | WMF Framework/Collection+AsyncMap.swift:47-67 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Shared/Buttons/WMFPriceButton.swift:28 — WMFComponents/Sources/WMFComponents/Components/Shared/Buttons/WMFPriceButton.swift:28-53 | WMFComponents/Sources/WMFComponents/Components/Shared/Buttons/WMFSelectablePillButton.swift:19-35 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) Wikipedia/Code/DiffController.swift:225 — Wikipedia/Code/DiffController.swift:225-241 | Wikipedia/Code/DiffController.swift:243-290 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Year in Review/WMFYearInReviewAnnouncementHostingController.swift:79 — WMFComponents/Sources/WMFComponents/Components/Year in Review/WMFYearInReviewAnnouncementHostingController.swift:79-96 | WMFComponents/Sources/WMFComponents/Components/Year in Review/WMFYearInReviewHostingController.swift:313-329 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) Wikipedia/Code/WMFAppViewController+Extensions.swift:143 — Wikipedia/Code/WMFAppViewController+Extensions.swift:143-159 | Wikipedia/Code/WMFAppViewController+Extensions.swift:161-177 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) WMF Framework/WMFBlocksKit.swift:31 — WMF Framework/WMFBlocksKit.swift:31-47 | WMF Framework/WMFBlocksKit.swift:83-99 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Settings/Home/For You/WMFHomeFeedForYouSettingsView.swift:38 — WMFComponents/Sources/WMFComponents/Components/Settings/Home/For You/WMFHomeFeedForYouSettingsView.swift:38-56 | WMFComponents/Sources/WMFComponents/Components/Settings/Storage and Syncing/WMFStorageAndSyncingSettingsView.swift:51-67 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) Wikipedia/Code/DiffContainerViewController.swift:1226 — Wikipedia/Code/DiffContainerViewController.swift:1226-1244 | Wikipedia/Code/DiffContainerViewController.swift:1271-1287 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) Wikipedia/Code/NotificationsCenterFiltersViewModel.swift:204 — Wikipedia/Code/NotificationsCenterFiltersViewModel.swift:204-220 | Wikipedia/Code/NotificationsCenterFiltersViewModel.swift:222-242 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) WMFData/Sources/WMFData/Data Controllers/Article Tabs/WMFArticleTabsDataController.swift:270 — WMFData/Sources/WMFData/Data Controllers/Article Tabs/WMFArticleTabsDataController.swift:270-286 | WMFData/Sources/WMFData/Data Controllers/Article Tabs/WMFArticleTabsDataController.swift:685-701 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) Wikipedia/Code/ExploreViewController.swift:1103 — Wikipedia/Code/ExploreViewController.swift:1103-1119 | Wikipedia/Code/HomeViewController.swift:157-173 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) WMF Framework/CacheGatekeeper.swift:64 — WMF Framework/CacheGatekeeper.swift:64-80 | WMF Framework/CacheGatekeeper.swift:82-98 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (14 corresponding lines) · ×14
  • Edited copy of a member (14 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Settings/WMFSettingsViewModel.swift:459 — WMFComponents/Sources/WMFComponents/Components/Settings/WMFSettingsViewModel.swift:459-472 | WMFComponents/Sources/WMFComponents/Components/Settings/WMFSettingsViewModel.swift:474-488 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) WMFData/Sources/WMFData/Data Controllers/Page History/WMFPageHistoryDataController.swift:63 — WMFData/Sources/WMFData/Data Controllers/Page History/WMFPageHistoryDataController.swift:63-76 | WMFTestKitchen/Sources/WMFTestKitchen/Context/PerformerData.swift:52-67 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) Wikipedia/Code/ReadingListsAlertController.swift:61 — Wikipedia/Code/ReadingListsAlertController.swift:61-74 | Wikipedia/Code/ReadingListsAlertController.swift:76-89 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Home/WMFForYouEndOfFeedCardView.swift:162 — WMFComponents/Sources/WMFComponents/Components/Home/WMFForYouEndOfFeedCardView.swift:162-175 | WMFComponents/Sources/WMFComponents/Components/Home/WMFForYouView.swift:479-494 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) Wikipedia/Code/InsetLabelView.swift:26 — Wikipedia/Code/InsetLabelView.swift:26-39 | Wikipedia/Code/RoundedImageView.swift:33-50 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) Wikipedia/Code/WMFAppViewController.swift:625 — Wikipedia/Code/WMFAppViewController.swift:625-638 | Wikipedia/Code/WMFAppViewController.swift:640-653 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Shared/Page/WMFPageRow.swift:117 — WMFComponents/Sources/WMFComponents/Components/Shared/Page/WMFPageRow.swift:117-132 | WMFComponents/Sources/WMFComponents/Components/Shared/Page/WMFPageRow.swift:135-148 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) Wikipedia/Code/ReadingListsController.swift:672 — Wikipedia/Code/ReadingListsController.swift:672-685 | Wikipedia/Code/ReadingListsController.swift:687-706 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) Wikipedia/Code/WelcomeContainerViewController.swift:44 — Wikipedia/Code/WelcomeContainerViewController.swift:44-57 | Wikipedia/Code/WelcomePanelViewController.swift:83-96 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) WMFData/Sources/WMFData/Extensions/URL+API.swift:95 — WMFData/Sources/WMFData/Extensions/URL+API.swift:95-108 | WMFData/Sources/WMFData/Extensions/URL+API.swift:110-123 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) Wikipedia/Code/NotificationsCenterCellViewModel+SheetActionExtensions.swift:274 — Wikipedia/Code/NotificationsCenterCellViewModel+SheetActionExtensions.swift:274-292 | Wikipedia/Code/NotificationsCenterDetailViewModel+ActionExtensions.swift:298-311 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Activity Tab/WMFTimelineView.swift:135 — WMFComponents/Sources/WMFComponents/Components/Activity Tab/WMFTimelineView.swift:135-148 | WMFComponents/Sources/WMFComponents/Components/Activity Tab/WMFTimelineView.swift:150-163 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) Wikipedia/Code/DiscoverSetupCoordinator.swift:21 — Wikipedia/Code/DiscoverSetupCoordinator.swift:21-36 | Wikipedia/Code/DiscoverSettingsCoordinator.swift:24-37 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) WMFTestKitchen/Sources/WMFTestKitchen/TestKitchenClient.swift:28 — WMFTestKitchen/Sources/WMFTestKitchen/TestKitchenClient.swift:28-42 | WMFTestKitchen/Sources/WMFTestKitchen/TestKitchenClient.swift:47-60 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (13 corresponding lines) · ×14
  • Edited copy of a member (13 corresponding lines) WMF Framework/WMFFeedArticlePreview.swift:144 — WMF Framework/WMFFeedArticlePreview.swift:144-158 | WMF Framework/WMFFeedImage.swift:144-156 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) Wikipedia/Code/ColumnarCollectionViewController.swift:330 — Wikipedia/Code/ColumnarCollectionViewController.swift:330-349 | Wikipedia/Code/ColumnarCollectionViewController.swift:351-363 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) Wikipedia/Code/DiffListContextViewModel.swift:204 — Wikipedia/Code/DiffListContextViewModel.swift:204-217 | Wikipedia/Code/DiffListUneditedViewModel.swift:58-70 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) Wikipedia/Code/ActivityTabViewController.swift:162 — Wikipedia/Code/ActivityTabViewController.swift:162-174 | Wikipedia/Code/HomeViewController.swift:403-415 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) Wikipedia/Code/ActivityTabFunnel.swift:164 — Wikipedia/Code/ActivityTabFunnel.swift:164-176 | Wikipedia/Code/DonateFunnel.swift:528-543 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) Wikipedia/Code/Advanced Settings/InsertMediaImagePositionSettingsViewController.swift:93 — Wikipedia/Code/Advanced Settings/InsertMediaImagePositionSettingsViewController.swift:93-106 | Wikipedia/Code/Advanced Settings/InsertMediaImageTypeSettingsViewController.swift:111-123 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Editors/Source Editor/Formatter Extensions/WKSourceEditorFormatter+ButtonActions.swift:226 — WMFComponents/Sources/WMFComponents/Components/Editors/Source Editor/Formatter Extensions/WKSourceEditorFormatter+ButtonActions.swift:226-238 | WMFComponents/Sources/WMFComponents/Components/Editors/Source Editor/Formatter Extensions/WKSourceEditorFormatter+ButtonActions.swift:240-252 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Discover/WMFDiscoverEntryCardView.swift:66 — WMFComponents/Sources/WMFComponents/Components/Discover/WMFDiscoverEntryCardView.swift:66-78 | WMFComponents/Sources/WMFComponents/Components/Discover/WMFDiscoverReadingListView.swift:153-165 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) Wikipedia/Code/DonateCoordinator.swift:649 — Wikipedia/Code/DonateCoordinator.swift:649-661 | Wikipedia/Code/DonateCoordinator.swift:663-675 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) Wikipedia/Code/UITextView+Extensions.swift:58 — Wikipedia/Code/UITextView+Extensions.swift:58-70 | Wikipedia/Code/UITextView+Extensions.swift:72-84 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Shared/Buttons/CloseButtons.swift:148 — WMFComponents/Sources/WMFComponents/Components/Shared/Buttons/CloseButtons.swift:148-160 | WMFComponents/Sources/WMFComponents/Components/Shared/Buttons/CloseButtons.swift:162-174 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) Wikipedia/Code/DiscoverReadingListCoordinator.swift:70 — Wikipedia/Code/DiscoverReadingListCoordinator.swift:70-82 | Wikipedia/Code/SavedAllArticlesCoordinator.swift:129-148 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) Wikipedia/Code/NotificationsCenterViewModel.swift:158 — Wikipedia/Code/NotificationsCenterViewModel.swift:158-173 | Wikipedia/Code/NotificationsCenterViewModel.swift:193-205 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Settings/WMFSettingsViewController.swift:21 — WMFComponents/Sources/WMFComponents/Components/Settings/WMFSettingsViewController.swift:21-36 | Wikipedia/Code/SettingsTabViewController.swift:153-165 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×14
  • Duplicated block (11 lines × 2) WMF Framework/WMFFeedContentFetcher.swift:42 — WMF Framework/WMFFeedContentFetcher.swift:42-52 | WMF Framework/WMFLocationSearchFetcher.swift:57-67 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `WMF Framework/WMFFeedContentFetcher.swift:42` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) WMFComponents/Sources/WMFComponents/Components/Discover/WMFDiscoverEntryCardView.swift:66 — WMFComponents/Sources/WMFComponents/Components/Discover/WMFDiscoverEntryCardView.swift:66-76 | WMFComponents/Sources/WMFComponents/Components/Discover/WMFDiscoverReadingListView.swift:153-163 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `WMFComponents/Sources/WMFComponents/Components/Discover/WMFDiscoverEntryCardView.swift:66` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `spacing` to `WMFSpacing.xSmall` in one and `WMFSpacing.small` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (11 lines × 2) WMFData/Sources/WMFData/Data Controllers/Discover/WMFDiscoverDataController.swift:141 — WMFData/Sources/WMFData/Data Controllers/Discover/WMFDiscoverDataController.swift:141-151 | WMFData/Sources/WMFData/Data Controllers/Semantic Search/WMFSemanticSearchDataController.swift:161-171 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) WMFData/Sources/WMFData/Data Controllers/Home/WMFPageInterestDataController.swift:64 — WMFData/Sources/WMFData/Data Controllers/Home/WMFPageInterestDataController.swift:64-74 | WMFData/Sources/WMFData/Data Controllers/Home/WMFPageInterestDataController.swift:97-107 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `WMFData/Sources/WMFData/Data Controllers/Home/WMFPageInterestDataController.swift:64` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) WMFData/Sources/WMFData/Data Controllers/Watchlist/WMFWatchlistDataController.swift:437 — WMFData/Sources/WMFData/Data Controllers/Watchlist/WMFWatchlistDataController.swift:437-447 | WMFData/Sources/WMFData/Data Controllers/Watchlist/WMFWatchlistDataController.swift:489-499 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `WMFData/Sources/WMFData/Data Controllers/Watchlist/WMFWatchlistDataController.swift:437` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) Widgets/Widgets/FeaturedArticleWidget.swift:298 — Widgets/Widgets/FeaturedArticleWidget.swift:298-308 | Widgets/Widgets/PictureOfTheDayWidget.swift:263-273 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (11 lines × 2) Wikipedia/Code/DonateCoordinator.swift:887 — Wikipedia/Code/DonateCoordinator.swift:887-897 | Wikipedia/Code/DonateCoordinator.swift:1012-1022 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/DonateCoordinator.swift:887` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) Wikipedia/Code/ShareActivityController.swift:178 — Wikipedia/Code/ShareActivityController.swift:178-188 | Wikipedia/Code/ShareActivityController.swift:196-206 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) Wikipedia/Code/TalkPageViewController+FindInPage.swift:79 — Wikipedia/Code/TalkPageViewController+FindInPage.swift:79-89 | Wikipedia/Code/TalkPageViewController+FindInPage.swift:92-102 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) Wikipedia/Code/WMFAccountLoginLogoutFetcher.swift:239 — Wikipedia/Code/WMFAccountLoginLogoutFetcher.swift:239-249 | Wikipedia/Code/WMFAccountLoginLogoutFetcher.swift:266-276 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/WMFAccountLoginLogoutFetcher.swift:239` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (11 lines × 2) WMF Framework/Widget/WidgetController.swift:37 — WMF Framework/Widget/WidgetController.swift:37-47 | WMF Framework/Widget/WidgetController.swift:53-63 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) Wikipedia/Code/ActivityTabViewController.swift:898 — Wikipedia/Code/ActivityTabViewController.swift:898-908 | Wikipedia/Code/TabsOverviewCoordinator.swift:44-54 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/ActivityTabViewController.swift:898` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/WMFYearInReviewSaveCountSlideDataController.swift:38 — WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/WMFYearInReviewSaveCountSlideDataController.swift:38-48 | WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewEditCountSlideDataController.swift:43-53 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (11 lines × 2) Wikipedia/Code/TalkPageReplyComposeContentView.swift:349 — Wikipedia/Code/TalkPageReplyComposeContentView.swift:349-359 | Wikipedia/Code/TalkPageTopicComposeViewController.swift:250-260 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×14
  • Duplicated block (9 lines × 2) WMFComponents/Sources/WMFComponents/Components/Saved/All Articles/WMFSavedAllArticlesView.swift:93 — WMFComponents/Sources/WMFComponents/Components/Saved/All Articles/WMFSavedAllArticlesView.swift:93-101 | WMFComponents/Sources/WMFComponents/Components/Saved/Reading Lists/WMFReadingListsView.swift:82-90 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (9 lines × 2) WMFData/Sources/WMFData/Data Controllers/Activity Tab/WMFActivityTabDataController.swift:347 — WMFData/Sources/WMFData/Data Controllers/Activity Tab/WMFActivityTabDataController.swift:347-355 | WMFData/Sources/WMFData/Data Controllers/Activity Tab/WMFActivityTabDataController.swift:386-394 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `WMFData/Sources/WMFData/Data Controllers/Activity Tab/WMFActivityTabDataController.swift:347` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) WMFData/Sources/WMFData/Data Controllers/Article Tabs/WMFArticleTabsDataController.swift:392 — WMFData/Sources/WMFData/Data Controllers/Article Tabs/WMFArticleTabsDataController.swift:392-400 | WMFData/Sources/WMFData/Data Controllers/Article Tabs/WMFArticleTabsDataController.swift:457-465 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) Wikipedia/Code/APIURLComponentsBuilder.swift:61 — Wikipedia/Code/APIURLComponentsBuilder.swift:61-69 | Wikipedia/Code/APIURLComponentsBuilder.swift:73-81 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (9 lines × 2) Wikipedia/Code/DiffFetcher.swift:51 — Wikipedia/Code/DiffFetcher.swift:51-59 | Wikipedia/Code/GlobalUserInfoFetcher.swift:16-27 — before extracting anything, compare `Wikipedia/Code/DiffFetcher.swift` and `Wikipedia/Code/GlobalUserInfoFetcher.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/DiffFetcher.swift:51` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind `completion` to `@escaping (Result<String, Error>) -> Void` in one and `@escaping ((Result<Int, Error>) -> Void)` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (9 lines × 2) Wikipedia/Code/DiffHeaderExtendedView.swift:34 — Wikipedia/Code/DiffHeaderExtendedView.swift:34-42 | Wikipedia/Code/DiffHeaderView.swift:20-28 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (9 lines × 2) Wikipedia/Code/SavedArticleDownloadProgressObserver.swift:73 — Wikipedia/Code/SavedArticleDownloadProgressObserver.swift:73-81 | Wikipedia/Code/SavedTabBadgeController.swift:121-129 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (9 lines × 2) Wikipedia/Code/SavedArticlesFetcher.swift:268 — Wikipedia/Code/SavedArticlesFetcher.swift:268-276 | Wikipedia/Code/SavedArticlesFetcher.swift:320-328 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/SavedArticlesFetcher.swift:268` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (9 lines × 2) WMF Framework/Fetcher.swift:108 — WMF Framework/Fetcher.swift:108-116 | WMF Framework/Fetcher.swift:121-129 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `WMF Framework/Fetcher.swift:108` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (9 lines × 2) WMFComponents/Sources/WMFComponents/Components/Saved/All Articles/WMFSavedAllArticlesViewModel.swift:73 — WMFComponents/Sources/WMFComponents/Components/Saved/All Articles/WMFSavedAllArticlesViewModel.swift:73-81 | WMFComponents/Sources/WMFComponents/Components/Saved/Reading Lists/WMFReadingListsViewModel.swift:68-76 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (9 lines × 2) WMFComponents/Sources/WMFComponents/Components/Year in Review/WMFYearInReviewAnnouncementHostingController.swift:66 — WMFComponents/Sources/WMFComponents/Components/Year in Review/WMFYearInReviewAnnouncementHostingController.swift:66-74 | WMFComponents/Sources/WMFComponents/Components/Year in Review/WMFYearInReviewHostingController.swift:134-142 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `WMFComponents/Sources/WMFComponents/Components/Year in Review/WMFYearInReviewAnnouncementHostingController.swift:66` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) Wikipedia/Code/AppearanceSettingsViewController.swift:374 — Wikipedia/Code/AppearanceSettingsViewController.swift:374-382 | Wikipedia/Code/Temp Accounts/TempAccountsSettingsViewController.swift:90-98 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (9 lines × 2) Wikipedia/Code/BaseExploreFeedSettingsViewController.swift:309 — Wikipedia/Code/BaseExploreFeedSettingsViewController.swift:309-317 | Wikipedia/Code/Temp Accounts/TempAccountsSettingsViewController.swift:144-152 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (9 lines × 2) Wikipedia/Code/ColumnarCollectionViewController.swift:229 — Wikipedia/Code/ColumnarCollectionViewController.swift:229-237 | Wikipedia/Code/InsertMediaSearchResultsCollectionViewController.swift:184-192 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×13
  • Duplicated block (8 lines × 2) WMF Framework/ArticleCacheResourceDBWriting.swift:37 — WMF Framework/ArticleCacheResourceDBWriting.swift:37-44 | WMF Framework/ArticleCacheResourceDBWriting.swift:64-71 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `WMF Framework/ArticleCacheResourceDBWriting.swift:37` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register. Note first that the copies are not typed on the same thing: the declarations holding them bind `completion` to `@escaping (Result<[ArticleFetcher.MediaListItem], ArticleCacheDBWriterError>) -> Void` in one and `@escaping (Result<[URL], ArticleCacheDBWriterError>) -> Void` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (8 lines × 2) WMF Framework/CacheDBWriterHelper.swift:81 — WMF Framework/CacheDBWriterHelper.swift:81-88 | WMF Framework/CacheDBWriterHelper.swift:92-99 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (8 lines × 2) WMFComponents/Sources/WMFComponents/Components/Activity Tab/View Models/TimelineViewModel.swift:47 — WMFComponents/Sources/WMFComponents/Components/Activity Tab/View Models/TimelineViewModel.swift:47-54 | WMFComponents/Sources/WMFComponents/Components/Activity Tab/View Models/TimelineViewModel.swift:92-99 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `WMFComponents/Sources/WMFComponents/Components/Activity Tab/View Models/TimelineViewModel.swift:47` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) WMFComponents/Sources/WMFComponents/Components/Saved/Reading Lists/WMFReadingListRow.swift:45 — WMFComponents/Sources/WMFComponents/Components/Saved/Reading Lists/WMFReadingListRow.swift:45-52 | WMFComponents/Sources/WMFComponents/Components/Shared/Page/WMFPageRowSaved.swift:31-38 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (8 lines × 2) WMFComponents/Sources/WMFComponents/Components/Shared/Buttons/CloseButtons.swift:148 — WMFComponents/Sources/WMFComponents/Components/Shared/Buttons/CloseButtons.swift:148-155 | WMFComponents/Sources/WMFComponents/Components/Shared/Buttons/CloseButtons.swift:162-169 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `WMFComponents/Sources/WMFComponents/Components/Shared/Buttons/CloseButtons.swift:148` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) Wikipedia/Code/DiffContainerViewController.swift:1008 — Wikipedia/Code/DiffContainerViewController.swift:1008-1017 | Wikipedia/Code/PageHistoryViewController.swift:819-826 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/DiffContainerViewController.swift:1008` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) Wikipedia/Code/DiffListChangeViewModel.swift:69 — Wikipedia/Code/DiffListChangeViewModel.swift:69-76 | Wikipedia/Code/DiffListChangeViewModel.swift:107-114 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) Wikipedia/Code/TalkPageFetcher.swift:190 — Wikipedia/Code/TalkPageFetcher.swift:190-197 | Wikipedia/Code/TalkPageFetcher.swift:213-220 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/TalkPageFetcher.swift:190` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) Wikipedia/Code/TalkPageViewController.swift:1205 — Wikipedia/Code/TalkPageViewController.swift:1205-1212 | Wikipedia/Code/TalkPageViewController.swift:1292-1299 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/TalkPageViewController.swift:1205` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) Wikipedia/Code/ActivityTabViewController.swift:746 — Wikipedia/Code/ActivityTabViewController.swift:746-753 | Wikipedia/Code/InsertMediaSettingsViewController.swift:372-379 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (8 lines × 2) Wikipedia/Code/Advanced Settings/InsertMediaCustomImageSizeSettingTableViewCell.swift:10 — Wikipedia/Code/Advanced Settings/InsertMediaCustomImageSizeSettingTableViewCell.swift:10-17 | Wikipedia/Code/InsertMediaSettingsTextTableViewCell.swift:25-32 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (8 lines × 2) Wikipedia/Code/TalkPageTopicReplyOnboardingView.swift:41 — Wikipedia/Code/TalkPageTopicReplyOnboardingView.swift:41-48 | Wikipedia/Code/VanishAccountWarningView.swift:41-48 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Wikipedia/Code/VanishAccountWarningView.swift:52` calls `replacingOccurrences` and `Wikipedia/Code/TalkPageTopicReplyOnboardingView.swift:50` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 2) Wikipedia/Code/WMFAccountCreator.swift:10 — Wikipedia/Code/WMFAccountCreator.swift:10-17 | Wikipedia/Code/WMFAccountLoginLogoutFetcher.swift:10-17 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D15 · Churn × Complexity Hotspots · Hotspot · ×11
  • Hotspot: WMFData/Sources/WMFData/Data Controllers/Year In Review/WMFYearInReviewDataController.swift WMFData/Sources/WMFData/Data Controllers/Year In Review/WMFYearInReviewDataController.swift:243 — WMFData/Sources/WMFData/Data Controllers/Year In Review/WMFYearInReviewDataController.swift changed 59 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in WMFYearInReviewDataController.fullSlideCount at line 243. 7 of those changes were fix/bug commits, and the other 52 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 10:36:49 -06:00' --until='2026-11-13 10:36:49 -06:00' --full-history --no-merges -- WMFData/Sources/WMFData/Data Controllers/Year In Review/WMFYearInReviewDataController.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: Wikipedia/Code/WMFAppViewController.swift Wikipedia/Code/WMFAppViewController.swift:1335 — Wikipedia/Code/WMFAppViewController.swift changed 62 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in WMFAppViewController.processUserActivity at line 1335. 9 of those changes were fix/bug commits, and the other 53 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 10:36:49 -06:00' --until='2026-11-13 10:36:49 -06:00' --full-history --no-merges -- Wikipedia/Code/WMFAppViewController.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: Wikipedia/Code/DonateCoordinator.swift Wikipedia/Code/DonateCoordinator.swift:219 — Wikipedia/Code/DonateCoordinator.swift changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 66 in DonateCoordinator.presentActionSheet at line 219. 1 of those changes was a fix/bug commit, and the other 15 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 10:36:49 -06:00' --until='2026-11-13 10:36:49 -06:00' --full-history --no-merges -- Wikipedia/Code/DonateCoordinator.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: Wikipedia/Code/HomeCoordinator.swift Wikipedia/Code/HomeCoordinator.swift:53 — Wikipedia/Code/HomeCoordinator.swift changed 19 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in HomeCoordinator.makeHomeViewController at line 53. 3 of those changes were fix/bug commits, and the other 16 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 10:36:49 -06:00' --until='2026-11-13 10:36:49 -06:00' --full-history --no-merges -- Wikipedia/Code/HomeCoordinator.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: Wikipedia/Code/AppOnboardingCoordinator.swift Wikipedia/Code/AppOnboardingCoordinator.swift:33 — Wikipedia/Code/AppOnboardingCoordinator.swift changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in AppOnboardingCoordinator.start at line 33. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 10:36:49 -06:00' --until='2026-11-13 10:36:49 -06:00' --full-history --no-merges -- Wikipedia/Code/AppOnboardingCoordinator.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: WMFData/Sources/WMFData/Data Controllers/Experiments/WMFExperimentsDataController.swift WMFData/Sources/WMFData/Data Controllers/Experiments/WMFExperimentsDataController.swift:126 — WMFData/Sources/WMFData/Data Controllers/Experiments/WMFExperimentsDataController.swift changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in WMFExperimentsDataController.determineBucketForExperiment at line 126. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 10:36:49 -06:00' --until='2026-11-13 10:36:49 -06:00' --full-history --no-merges -- WMFData/Sources/WMFData/Data Controllers/Experiments/WMFExperimentsDataController.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: WMFComponents/Sources/WMFComponents/Components/Activity Tab/WMFActivityTabView.swift WMFComponents/Sources/WMFComponents/Components/Activity Tab/WMFActivityTabView.swift:80 — WMFComponents/Sources/WMFComponents/Components/Activity Tab/WMFActivityTabView.swift changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in WMFActivityTabView.loggedInList at line 80. 1 of those changes was a fix/bug commit, and the other 7 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 10:36:49 -06:00' --until='2026-11-13 10:36:49 -06:00' --full-history --no-merges -- WMFComponents/Sources/WMFComponents/Components/Activity Tab/WMFActivityTabView.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: Wikipedia/Code/WMFAuthenticationManager.swift Wikipedia/Code/WMFAuthenticationManager.swift:370 — Wikipedia/Code/WMFAuthenticationManager.swift changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in WMFAuthenticationManager.loginWithSavedCredentials at line 370. 1 of those changes was a fix/bug commit, and the other 6 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 10:36:49 -06:00' --until='2026-11-13 10:36:49 -06:00' --full-history --no-merges -- Wikipedia/Code/WMFAuthenticationManager.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: WMFComponents/Sources/WMFComponents/Extensions/Navigation Bar/WMFNavigationBarConfiguring.swift WMFComponents/Sources/WMFComponents/Extensions/Navigation Bar/WMFNavigationBarConfiguring.swift:122 — WMFComponents/Sources/WMFComponents/Extensions/Navigation Bar/WMFNavigationBarConfiguring.swift changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in WMFNavigationBarConfiguring.configureNavigationBar at line 122. 2 of those changes were fix/bug commits, and the other 3 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 10:36:49 -06:00' --until='2026-11-13 10:36:49 -06:00' --full-history --no-merges -- WMFComponents/Sources/WMFComponents/Extensions/Navigation Bar/WMFNavigationBarConfiguring.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: WMF Framework/Widget/WidgetController.swift WMF Framework/Widget/WidgetController.swift:370 — WMF Framework/Widget/WidgetController.swift changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in WidgetController.fetchTopReadContent at line 370. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 10:36:49 -06:00' --until='2026-11-13 10:36:49 -06:00' --full-history --no-merges -- WMF Framework/Widget/WidgetController.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: Wikipedia/Code/SavedArticlesFetcher.swift Wikipedia/Code/SavedArticlesFetcher.swift:221 — Wikipedia/Code/SavedArticlesFetcher.swift changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in SavedArticlesFetcher._update at line 221. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 10:36:49 -06:00' --until='2026-11-13 10:36:49 -06:00' --full-history --no-merges -- Wikipedia/Code/SavedArticlesFetcher.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
D35 · Change Coupling · Change coupling · ×11
  • Change coupling: WMFCommunityFeedView.swift ↔ WMFHomeViewModel.swift WMFComponents/Sources/WMFComponents/Components/Home/WMFCommunityFeedView.swift:1 — `WMFComponents/Sources/WMFComponents/Components/Home/WMFCommunityFeedView.swift` and `WMFComponents/Sources/WMFComponents/Components/Home/WMFHomeViewModel.swift` change together 73% of the time (8 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `5321204f` Allow scrolling to top when tapping the tab button or W button, add a…; `708aac2d` Hide community card implementation; `35333002` Hide community module implementation — run `git show` on any of them.
  • Change coupling: WMFRiveAnimationViewModel.swift ↔ WMFYearInReviewSlideViewModel.swift WMFComponents/Sources/WMFComponents/Components/Shared/Rive/WMFRiveAnimationViewModel.swift:1 — `WMFComponents/Sources/WMFComponents/Components/Shared/Rive/WMFRiveAnimationViewModel.swift` and `WMFComponents/Sources/WMFComponents/Components/Year in Review/WMFYearInReviewSlideViewModel.swift` change together 63% of the time (12 of the 19 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 12 shared commits counted here, the most recent 3 are `43ae1ee6` Remove WMFRiveTextFit; `970baab9` Remove WMFRiveTextFit; `6dcf78cf` Move to the YiR rabbit hole reveal as soon as the reader taps a card — run `git show` on any of them.
  • Change coupling: ExploreViewController.swift ↔ WMFDailyGameContentSource.swift Wikipedia/Code/ExploreViewController.swift:1 — `Wikipedia/Code/ExploreViewController.swift` and `Wikipedia/Code/WMFDailyGameContentSource.swift` change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `a718542c` Add localized strings, cleanup date formatters; `93dd5f4c` Add back in description label spacing + try to improve session clearing; `1626c7bb` More rework - persist game state in Explore persistence — run `git show` on any of them.
  • Change coupling: WMFUserDefaultsKey.swift ↔ WMFMockDeveloperSettingsDataController.swift WMFData/Sources/WMFData/Store/WMFUserDefaultsKey.swift:1 — `WMFData/Sources/WMFData/Store/WMFUserDefaultsKey.swift` and `WMFData/Sources/WMFDataMocks/WMFMockDeveloperSettingsDataController.swift` change together 58% of the time (22 of the 38 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 22 shared commits counted here, the most recent 3 are `a4da54a5` Split YiR eligibility into a data state and a slides experience; `ad82e504` Start dev settings; `10687bcc` Combine dev settings — run `git show` on any of them.
  • Change coupling: WMFRiveAnimationViewModel.swift ↔ WMFYearInReviewSlideView.swift WMFComponents/Sources/WMFComponents/Components/Shared/Rive/WMFRiveAnimationViewModel.swift:1 — `WMFComponents/Sources/WMFComponents/Components/Shared/Rive/WMFRiveAnimationViewModel.swift` and `WMFComponents/Sources/WMFComponents/Components/Year in Review/WMFYearInReviewSlideView.swift` change together 56% of the time (14 of the 25 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 14 shared commits counted here, the most recent 3 are `43ae1ee6` Remove WMFRiveTextFit; `970baab9` Remove WMFRiveTextFit; `f642cbc2` Show the YiR no-image design until the thumbnail is bound — run `git show` on any of them.
  • Change coupling: TimelineViewModel.swift ↔ WMFActivityTabView.swift WMFComponents/Sources/WMFComponents/Components/Activity Tab/View Models/TimelineViewModel.swift:1 — `WMFComponents/Sources/WMFComponents/Components/Activity Tab/View Models/TimelineViewModel.swift` and `WMFComponents/Sources/WMFComponents/Components/Activity Tab/WMFActivityTabView.swift` change together 55% of the time (11 of the 20 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `1470f7ca` Clean up; `03c78cd6` Deep link diff; `3ce2fc5e` UserContributions fetch edits — run `git show` on any of them.
  • Change coupling: WMFArticleTabsDataController.swift ↔ WMFCategoriesDataController.swift WMFData/Sources/WMFData/Data Controllers/Article Tabs/WMFArticleTabsDataController.swift:1 — `WMFData/Sources/WMFData/Data Controllers/Article Tabs/WMFArticleTabsDataController.swift` and `WMFData/Sources/WMFData/Data Controllers/Shared/WMFCategoriesDataController.swift` change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `85b3ba4a` Swift 6 (WMFData): replace legacy NSMergePolicy global vars; `9a38212a` Fix iOS 17+ deprecations and Sendable warnings; `eda77d8a` Cleanup WMFProject identifiers — run `git show` on any of them.
  • Change coupling: NavigationStateController.swift ↔ TabsOverviewCoordinator.swift Wikipedia/Code/NavigationStateController.swift:1 — `Wikipedia/Code/NavigationStateController.swift` and `Wikipedia/Code/TabsOverviewCoordinator.swift` change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `64682f6e` Remove most warnings; `b842cfd1` Move text view delegate to tabs coordinator; `aee58be7` Add link delegate to tabsOverviewCoordinator dor did you know — run `git show` on any of them.
  • Change coupling: WMFSavedAllArticlesViewModel.swift ↔ WMFPageRowSaved.swift WMFComponents/Sources/WMFComponents/Components/Saved/All Articles/WMFSavedAllArticlesViewModel.swift:1 — `WMFComponents/Sources/WMFComponents/Components/Saved/All Articles/WMFSavedAllArticlesViewModel.swift` and `WMFComponents/Sources/WMFComponents/Components/Shared/Page/WMFPageRowSaved.swift` change together 50% of the time (14 of the 28 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 14 shared commits counted here, the most recent 3 are `e8a7ed6d` Remove Async from the name of the saved page row; `ddb60789` Trim the reading lists sheet and the Saved tab view models (at that commit the file was still `WMFComponents/Sources/WMFComponents/Components/Shared/Page/WMFAsyncPageRowSaved.swift`); `9ca84168` Add missing Saved All Articles events (at that commit the file was still `WMFComponents/Sources/WMFComponents/Components/Shared/Page/WMFAsyncPageRowSaved.swift`) — run `git show` on any of them.
  • Change coupling: RandomArticleCoordinator.swift ↔ TabsOverviewCoordinator.swift Wikipedia/Code/RandomArticleCoordinator.swift:1 — `Wikipedia/Code/RandomArticleCoordinator.swift` and `Wikipedia/Code/TabsOverviewCoordinator.swift` change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `152a810e` Move did you know provider to coordinator; `b842cfd1` Move text view delegate to tabs coordinator; `f640b632` Add did you know provider closure call to expore feed, history, artic… — run `git show` on any of them.
  • Change coupling: UserContributionsDataController.swift ↔ WMFYearInReviewDonateCountSlideDataController.swift WMFData/Sources/WMFData/Data Controllers/Shared/UserContributionsDataController.swift:1 — `WMFData/Sources/WMFData/Data Controllers/Shared/UserContributionsDataController.swift` and `WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/WMFYearInReviewDonateCountSlideDataController.swift` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `340dfa4e` Delete unused fetchusercontribs, create ArticleEdit, map to TimelineItem; `b2e32bed` PR Clean ups; `1470f7ca` Clean up (at that commit the file was still `WMFData/Sources/WMFData/Data Controllers/Activity Tab/UserContributionsDataController.swift`) — run `git show` on any of them.
D4 · Code Duplication · Edited copy of a member (15 corresponding lines) · ×11
  • Edited copy of a member (15 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Editors/Source Editor/Formatter Extensions/WKSourceEditorFormatterLink+ButtonActions.swift:79 — WMFComponents/Sources/WMFComponents/Components/Editors/Source Editor/Formatter Extensions/WKSourceEditorFormatterLink+ButtonActions.swift:79-95 | Wikipedia/Code/TalkPageViewController+TalkPageFormattingToolbar.swift:79-93 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) Wikipedia/Code/EditSaveViewController.swift:122 — Wikipedia/Code/EditSaveViewController.swift:122-137 | Wikipedia/Code/TalkPageReplyComposeContentView.swift:372-386 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Watchlist/WMFWatchlistViewModel.swift:25 — WMFComponents/Sources/WMFComponents/Components/Watchlist/WMFWatchlistViewModel.swift:25-40 | WMFComponents/Sources/WMFComponents/Components/Watchlist/WMFWatchlistViewModel.swift:65-79 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) Widgets/Widgets/OnThisDayWidget.swift:42 — Widgets/Widgets/OnThisDayWidget.swift:42-56 | Widgets/Widgets/PictureOfTheDayWidget.swift:147-164 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) Wikipedia/Code/SavedAllArticlesCoordinator.swift:230 — Wikipedia/Code/SavedAllArticlesCoordinator.swift:230-244 | Wikipedia/Code/ViewController+ArticleErrorHandling.swift:5-20 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) WMF Framework/Widget/WidgetController.swift:36 — WMF Framework/Widget/WidgetController.swift:36-50 | WMF Framework/Widget/WidgetController.swift:52-66 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) Wikipedia/Code/DiffFetcher.swift:139 — Wikipedia/Code/DiffFetcher.swift:139-153 | Wikipedia/Code/PageHistoryFetcher.swift:37-51 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) WMF Framework/Remote Notifications/RemoteNotificationsController.swift:176 — WMF Framework/Remote Notifications/RemoteNotificationsController.swift:176-190 | WMF Framework/Remote Notifications/RemoteNotificationsController.swift:194-208 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) Wikipedia/Code/ArticleViewController.swift:569 — Wikipedia/Code/ArticleViewController.swift:569-589 | Wikipedia/Code/ExploreViewController.swift:1124-1138 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Shared/Buttons/WMFLargeButton.swift:15 — WMFComponents/Sources/WMFComponents/Components/Shared/Buttons/WMFLargeButton.swift:15-31 | WMFComponents/Sources/WMFComponents/Components/Shared/Buttons/WMFSmallButton.swift:27-41 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) Wikipedia/Code/WMFAccountCreationViewController.swift:300 — Wikipedia/Code/WMFAccountCreationViewController.swift:300-318 | Wikipedia/Code/WMFLoginViewController.swift:206-220 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (8 corresponding lines) · ×11
  • Edited copy of a member (8 corresponding lines) WMF Framework/WMFFeedArticlePreview.swift:93 — WMF Framework/WMFFeedArticlePreview.swift:93-100 | WMFData/Sources/WMFData/Models/Home/WMFFeedNewsItem+StoryDate.swift:25-32 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) WMF Framework/WMFFeedArticlePreview.swift:93 — WMF Framework/WMFFeedArticlePreview.swift:93-100 | WMFData/Sources/WMFData/Models/Home/WMFFeedNewsItem+FeaturedArticle.swift:59-68 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Discover/WMFDiscoverEntryCardView.swift:80 — WMFComponents/Sources/WMFComponents/Components/Discover/WMFDiscoverEntryCardView.swift:80-87 | WMFComponents/Sources/WMFComponents/Components/Discover/WMFDiscoverReadingListView.swift:167-174 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Home/WMFForYouViewModel.swift:372 — WMFComponents/Sources/WMFComponents/Components/Home/WMFForYouViewModel.swift:372-379 | WMFData/Sources/WMFData/Utility/ImageUtils.swift:49-56 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) WMF Framework/WMFFeedNewsStory.swift:95 — WMF Framework/WMFFeedNewsStory.swift:95-102 | WMF Framework/WMFFeedOnThisDayEvent.swift:101-108 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) Wikipedia/Code/HomeViewController.swift:420 — Wikipedia/Code/HomeViewController.swift:420-427 | Wikipedia/Code/SavedCoordinator.swift:160-171 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) Wikipedia/Code/Controllers/ShortDescriptionController.swift:251 — Wikipedia/Code/Controllers/ShortDescriptionController.swift:251-260 | Wikipedia/Code/Controllers/ShortDescriptionController.swift:267-274 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) Wikipedia/Code/TalkPageTopicComposeViewController.swift:609 — Wikipedia/Code/TalkPageTopicComposeViewController.swift:609-616 | WMFComponents/Sources/WMFComponents/Components/Suggested Edits/Image Recommendations/WMFImageRecommendationBottomSheetView.swift:414-421 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) Wikipedia/Code/FontSizeSliderViewController.swift:44 — Wikipedia/Code/FontSizeSliderViewController.swift:44-51 | Wikipedia/Code/ReadingThemesControlsViewController.swift:153-160 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) WMF Framework/BatchEditToolbarViewController.swift:39 — WMF Framework/BatchEditToolbarViewController.swift:39-46 | Wikipedia/Code/PageHistoryComparisonSelectionViewController.swift:107-114 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) Wikipedia/Code/EditPreviewViewController.swift:111 — Wikipedia/Code/EditPreviewViewController.swift:111-119 | Wikipedia/Code/EditSaveViewController.swift:449-456 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×11
  • Duplicated block (12 lines × 2) WMFComponents/Sources/WMFComponents/Components/Editors/Common Views/Base/WMFEditorToolbarButton.swift:36 — WMFComponents/Sources/WMFComponents/Components/Editors/Common Views/Base/WMFEditorToolbarButton.swift:36-47 | WMFComponents/Sources/WMFComponents/Components/Editors/Common Views/WMFEditorToolbarNavigatorButton.swift:32-43 — before extracting anything, compare `WMFComponents/Sources/WMFComponents/Components/Editors/Common Views/Base/WMFEditorToolbarButton.swift` and `WMFComponents/Sources/WMFComponents/Components/Editors/Common Views/WMFEditorToolbarNavigatorButton.swift` as WHOLE FILES: 85% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `WMFComponents/Sources/WMFComponents/Components/Editors/Common Views/Base/WMFEditorToolbarButton.swift:36` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) WMFComponents/Sources/WMFComponents/Components/Shared/Page/WMFPageRow.swift:66 — WMFComponents/Sources/WMFComponents/Components/Shared/Page/WMFPageRow.swift:66-77 | WMFComponents/Sources/WMFComponents/Components/Shared/Page/WMFPageRow.swift:136-147 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) WMFData/Sources/WMFData/Data Controllers/Page History/WMFPageHistoryDataController.swift:242 — WMFData/Sources/WMFData/Data Controllers/Page History/WMFPageHistoryDataController.swift:242-253 | WMFData/Sources/WMFData/Data Controllers/Shared/WMFArticleSearchDataController.swift:237-248 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (12 lines × 2) WMFData/Sources/WMFData/Extensions/URL+API.swift:97 — WMFData/Sources/WMFData/Extensions/URL+API.swift:97-108 | WMFData/Sources/WMFData/Extensions/URL+API.swift:112-123 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (12 lines × 2) Wikipedia/Code/SizeThatFitsReusableView.swift:62 — Wikipedia/Code/SizeThatFitsReusableView.swift:62-73 | Wikipedia/Code/SizeThatFitsView.swift:35-46 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (12 lines × 2) Wikipedia/Code/WMFAccountCreationViewController.swift:135 — Wikipedia/Code/WMFAccountCreationViewController.swift:135-146 | Wikipedia/Code/WMFLoginViewController.swift:115-126 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/WMFAccountCreationViewController.swift:135` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (12 lines × 2) Wikipedia/Code/WatchlistController.swift:49 — Wikipedia/Code/WatchlistController.swift:49-60 | Wikipedia/Code/WatchlistController.swift:229-240 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/WatchlistController.swift:49` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) Wikipedia/Code/YearInReviewSlideViewModelFactory.swift:891 — Wikipedia/Code/YearInReviewSlideViewModelFactory.swift:891-902 | Wikipedia/Code/YearInReviewSlideViewModelFactory.swift:1000-1011 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/YearInReviewSlideViewModelFactory.swift:891` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) Wikipedia/Code/ArticleViewController+ArticleToolbarHandling.swift:16 — Wikipedia/Code/ArticleViewController+ArticleToolbarHandling.swift:16-27 | Wikipedia/Code/ArticleViewController+ArticleToolbarHandling.swift:30-41 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (12 lines × 2) Wikipedia/Code/AppOnboardingCoordinator.swift:119 — Wikipedia/Code/AppOnboardingCoordinator.swift:119-130 | Wikipedia/Code/AppOnboardingCoordinator.swift:142-153 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/AppOnboardingCoordinator.swift:119` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) Wikipedia/Code/WMFAccountCreationViewController.swift:640 — Wikipedia/Code/WMFAccountCreationViewController.swift:640-651 | Wikipedia/Code/WMFLoginViewController.swift:584-595 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×11
  • Duplicated block (10 lines × 2) WMF Framework/ArticleCacheDBWriter+SyncResources.swift:215 — WMF Framework/ArticleCacheDBWriter+SyncResources.swift:215-224 | WMF Framework/ArticleCacheResourceDBWriting.swift:82-91 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `WMF Framework/ArticleCacheDBWriter+SyncResources.swift:215` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) WMF Framework/ImageCacheDBWriter.swift:44 — WMF Framework/ImageCacheDBWriter.swift:44-53 | Wikipedia/Code/ArticleCacheDBWriter.swift:139-148 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `WMF Framework/ImageCacheDBWriter.swift:44` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) WMFComponents/Sources/WMFComponents/Components/Settings/Home/For You/Whats Driving/Your Interests/WMFHomeFeedInterestsSettingsView.swift:332 — WMFComponents/Sources/WMFComponents/Components/Settings/Home/For You/Whats Driving/Your Interests/WMFHomeFeedInterestsSettingsView.swift:332-341 | WMFComponents/Sources/WMFComponents/Components/Settings/Home/For You/Whats Driving/Your Interests/WMFHomeFeedInterestsSettingsView.swift:357-366 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `WMFComponents/Sources/WMFComponents/Components/Settings/Home/For You/Whats Driving/Your Interests/WMFHomeFeedInterestsSettingsView.swift:332` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) WMFComponents/Sources/WMFComponents/Components/Year in Review/WMFYearInReviewAnnouncementHostingController.swift:79 — WMFComponents/Sources/WMFComponents/Components/Year in Review/WMFYearInReviewAnnouncementHostingController.swift:79-88 | WMFComponents/Sources/WMFComponents/Components/Year in Review/WMFYearInReviewHostingController.swift:313-322 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `WMFComponents/Sources/WMFComponents/Components/Year in Review/WMFYearInReviewAnnouncementHostingController.swift:79` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) Widgets/Widgets/OnThisDayWidget.swift:47 — Widgets/Widgets/OnThisDayWidget.swift:47-56 | Widgets/Widgets/PictureOfTheDayWidget.swift:155-164 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Widgets/Widgets/OnThisDayWidget.swift:47` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `completion` to `@escaping (Timeline<OnThisDayEntry>) -> Void` in one and `@escaping (Timeline<PictureOfTheDayEntry>) -> Void` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (10 lines × 2) Wikipedia/Code/ArticleCollectionViewController.swift:138 — Wikipedia/Code/ArticleCollectionViewController.swift:138-147 | REDACTED:460-469 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (10 lines × 2) Wikipedia/Code/DiffFetcher.swift:160 — Wikipedia/Code/DiffFetcher.swift:160-169 | Wikipedia/Code/GlobalUserInfoFetcher.swift:18-28 — before extracting anything, compare `Wikipedia/Code/DiffFetcher.swift` and `Wikipedia/Code/GlobalUserInfoFetcher.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/DiffFetcher.swift:160` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `completion` to `@escaping (Result<String, Error>) -> Void` in one and `@escaping ((Result<Int, Error>) -> Void)` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (10 lines × 2) Wikipedia/Code/ViewControllerRouter.swift:151 — Wikipedia/Code/ViewControllerRouter.swift:151-160 | Wikipedia/Code/ViewControllerRouter.swift:164-173 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/ViewControllerRouter.swift:151` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) Wikipedia/Code/WMFAuthenticationManager.swift:410 — Wikipedia/Code/WMFAuthenticationManager.swift:410-419 | Wikipedia/Code/WMFAuthenticationManager.swift:485-494 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/WMFAuthenticationManager.swift:410` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Wikipedia/Code/WMFAuthenticationManager.swift:496` calls `submitInteraction` and `Wikipedia/Code/WMFAuthenticationManager.swift:420` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 2) Wikipedia/Code/ArticleRightAlignedImageCollectionViewCell.swift:56 — Wikipedia/Code/ArticleRightAlignedImageCollectionViewCell.swift:56-65 | Wikipedia/Code/SavedArticlesCollectionViewCell.swift:158-167 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/ArticleRightAlignedImageCollectionViewCell.swift:56` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) Wikipedia/Code/Advanced Settings/InsertMediaImagePositionSettingsViewController.swift:110 — Wikipedia/Code/Advanced Settings/InsertMediaImagePositionSettingsViewController.swift:110-119 | Wikipedia/Code/Advanced Settings/InsertMediaImageTypeSettingsViewController.swift:129-138 — before extracting anything, compare `Wikipedia/Code/Advanced Settings/InsertMediaImagePositionSettingsViewController.swift` and `Wikipedia/Code/Advanced Settings/InsertMediaImageTypeSettingsViewController.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×10
  • Duplicated block (13 lines × 2) WMF Framework/CacheFileWriterHelper.swift:14 — WMF Framework/CacheFileWriterHelper.swift:14-26 | WMF Framework/CacheFileWriterHelper.swift:41-53 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `WMF Framework/CacheFileWriterHelper.swift:14` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `completion` to `@escaping (FileSaveResult) -> Void` in one and `(FileSaveResult) -> Void` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (13 lines × 2) WMFComponents/Sources/WMFComponents/Components/Settings/Home/For You/WMFHomeFeedForYouSettingsView.swift:44 — WMFComponents/Sources/WMFComponents/Components/Settings/Home/For You/WMFHomeFeedForYouSettingsView.swift:44-56 | WMFComponents/Sources/WMFComponents/Components/Settings/Storage and Syncing/WMFStorageAndSyncingSettingsView.swift:55-67 — before extracting anything, compare `WMFComponents/Sources/WMFComponents/Components/Settings/Home/For You/WMFHomeFeedForYouSettingsView.swift` and `WMFComponents/Sources/WMFComponents/Components/Settings/Storage and Syncing/WMFStorageAndSyncingSettingsView.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `WMFComponents/Sources/WMFComponents/Components/Settings/Home/For You/WMFHomeFeedForYouSettingsView.swift:44` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) WMFComponents/Sources/WMFComponents/Components/Settings/Search/WMFSearchSettingsView.swift:51 — WMFComponents/Sources/WMFComponents/Components/Settings/Search/WMFSearchSettingsView.swift:51-63 | WMFComponents/Sources/WMFComponents/Components/Settings/Year In Review/WMFYearInReviewSettingsView.swift:61-73 — before extracting anything, compare `WMFComponents/Sources/WMFComponents/Components/Settings/Search/WMFSearchSettingsView.swift` and `WMFComponents/Sources/WMFComponents/Components/Settings/Year In Review/WMFYearInReviewSettingsView.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) WMFData/Sources/WMFData/Data Controllers/Shared/WMFPageViewsDataController.swift:358 — WMFData/Sources/WMFData/Data Controllers/Shared/WMFPageViewsDataController.swift:358-370 | WMFData/Sources/WMFData/Data Controllers/Shared/WMFPageViewsDataController.swift:387-399 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `WMFData/Sources/WMFData/Data Controllers/Shared/WMFPageViewsDataController.swift:358` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `WMFData/Sources/WMFData/Data Controllers/Shared/WMFPageViewsDataController.swift:386` calls `NSPredicate` and `WMFData/Sources/WMFData/Data Controllers/Shared/WMFPageViewsDataController.swift:357` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (13 lines × 2) WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewDaysVisitedSlideDataController.swift:43 — WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewDaysVisitedSlideDataController.swift:43-55 | WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewReadingStreakSlideDataController.swift:77-89 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (13 lines × 2) WMFData/Sources/WMFData/Service/WMFBasicService.swift:234 — WMFData/Sources/WMFData/Service/WMFBasicService.swift:234-246 | WMFData/Sources/WMFData/Service/WMFBasicService.swift:297-309 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `WMFData/Sources/WMFData/Service/WMFBasicService.swift:234` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) Wikipedia/Code/HomeFeedSettingsCoordinator.swift:90 — Wikipedia/Code/HomeFeedSettingsCoordinator.swift:90-102 | Wikipedia/Code/HomeFeedSettingsCoordinator.swift:175-187 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/HomeFeedSettingsCoordinator.swift:90` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) Wikipedia/Code/NotificationsCenterCellViewModel+SheetActionExtensions.swift:73 — Wikipedia/Code/NotificationsCenterCellViewModel+SheetActionExtensions.swift:73-85 | Wikipedia/Code/NotificationsCenterCellViewModel+SheetActionExtensions.swift:91-103 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Wikipedia/Code/NotificationsCenterCellViewModel+SheetActionExtensions.swift:105` calls `titleAction` and `Wikipedia/Code/NotificationsCenterCellViewModel+SheetActionExtensions.swift:87` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (13 lines × 2) Wikipedia/Code/TalkPageCellCommentView.swift:130 — Wikipedia/Code/TalkPageCellCommentView.swift:130-142 | Wikipedia/Code/TalkPageCellTopicView.swift:380-392 — before extracting anything, compare `Wikipedia/Code/TalkPageCellCommentView.swift` and `Wikipedia/Code/TalkPageCellTopicView.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/TalkPageCellCommentView.swift:130` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) WMFComponents/Sources/WMFComponents/Components/Watchlist/WMFWatchlistViewController.swift:73 — WMFComponents/Sources/WMFComponents/Components/Watchlist/WMFWatchlistViewController.swift:73-85 | WMFComponents/Sources/WMFComponents/Components/Watchlist/WMFWatchlistViewController.swift:102-114 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `WMFComponents/Sources/WMFComponents/Components/Watchlist/WMFWatchlistViewController.swift:73` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `WMFComponents/Sources/WMFComponents/Components/Watchlist/WMFWatchlistViewController.swift:100` calls `watchlistUserDidTapDiff` and `WMFComponents/Sources/WMFComponents/Components/Watchlist/WMFWatchlistViewController.swift:72` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×8
  • Members sharing a duplicated core (4 members, 50+ identical tokens) WMFData/Sources/WMFData/Data Controllers/Watchlist/WMFWatchlistDataController.swift:327 — WMFData/Sources/WMFData/Data Controllers/Watchlist/WMFWatchlistDataController.swift:327-364 | WMFData/Sources/WMFData/Data Controllers/Watchlist/WMFWatchlistDataController.swift:368-405 | WMFData/Sources/WMFData/Data Controllers/Watchlist/WMFWatchlistDataController.swift:409-448 | WMFData/Sources/WMFData/Data Controllers/Watchlist/WMFWatchlistDataController.swift:452-505 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) Wikipedia/Code/ActivityTabViewController.swift:40 — Wikipedia/Code/ActivityTabViewController.swift:40-122 | Wikipedia/Code/ExploreViewController.swift:122-153 | Wikipedia/Code/PlacesViewController.swift:121-211 | Wikipedia/Code/SearchViewController.swift:375-394 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) Wikipedia/Code/ActivityTabViewController.swift:578 — Wikipedia/Code/ActivityTabViewController.swift:578-599 | Wikipedia/Code/ExploreViewController.swift:1681-1699 | Wikipedia/Code/HelpViewController.swift:128-145 | Wikipedia/Code/YearInReviewCoordinator.swift:545-567 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) Wikipedia/Code/ArticleLocationCollectionViewController.swift:217 — Wikipedia/Code/ArticleLocationCollectionViewController.swift:217-231 | Wikipedia/Code/ColumnarCollectionViewController.swift:506-520 | Wikipedia/Code/NewsViewController.swift:259-273 | Wikipedia/Code/OnThisDayViewController.swift:262-276 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) Wikipedia/Code/TalkPageCellCommentView.swift:205 — Wikipedia/Code/TalkPageCellCommentView.swift:205-216 | Wikipedia/Code/TalkPageCellTopicView.swift:484-495 | Wikipedia/Code/TalkPageCoffeeRollView.swift:113-124 | Wikipedia/Code/TalkPageReplyComposeContentView.swift:428-439 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) Wikipedia/Code/WMFAuthAccountCreationInfoFetcher.swift:22 — Wikipedia/Code/WMFAuthAccountCreationInfoFetcher.swift:22-49 | Wikipedia/Code/WMFAuthLoginInfoFetcher.swift:22-50 | Wikipedia/Code/WMFCaptchaResetter.swift:21-44 | Wikipedia/Code/WMFCurrentUserFetcher.swift:68-110 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) WMFData/Sources/WMFDataMocks/WMFMockBasicService.swift:173 — WMFData/Sources/WMFDataMocks/WMFMockBasicService.swift:173-188 | WMFData/Sources/WMFDataMocks/WMFMockBasicService.swift:197-212 | WMFData/Sources/WMFDataMocks/WMFMockGrowthTasksService.swift:108-123 | WMFData/Sources/WMFDataMocks/WMFMockWatchlistMediaWikiService.swift:153-168 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) WMFData/Sources/WMFDataMocks/WMFMockWatchlistMediaWikiService.swift:7 — WMFData/Sources/WMFDataMocks/WMFMockWatchlistMediaWikiService.swift:7-16 | WMFData/Sources/WMFDataMocks/WMFMockWatchlistMediaWikiService.swift:18-27 | WMFData/Sources/WMFDataMocks/WMFMockWatchlistMediaWikiService.swift:59-71 | WMFData/Sources/WMFDataMocks/WMFMockWatchlistMediaWikiService.swift:97-106 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Edited copy of a member (20 corresponding lines) · ×8
  • Edited copy of a member (20 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Watchlist/Filter/WMFWatchlistFilterViewModel.swift:92 — WMFComponents/Sources/WMFComponents/Components/Watchlist/Filter/WMFWatchlistFilterViewModel.swift:92-115 | WMFComponents/Sources/WMFComponents/Components/Watchlist/Filter/WMFWatchlistFilterViewModel.swift:279-298 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) Wikipedia/Code/TalkPageFetcher.swift:189 — Wikipedia/Code/TalkPageFetcher.swift:189-209 | Wikipedia/Code/TalkPageFetcher.swift:211-230 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) WMF Framework/ReadingListsAPIController.swift:474 — WMF Framework/ReadingListsAPIController.swift:474-494 | WMF Framework/ReadingListsAPIController.swift:496-515 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) WMFData/Sources/WMFData/Data Controllers/Home/WMFPageInterestDataController.swift:16 — WMFData/Sources/WMFData/Data Controllers/Home/WMFPageInterestDataController.swift:16-37 | WMFData/Sources/WMFData/Data Controllers/Shared/WMFPageTopicsDataController.swift:106-125 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) WMF Framework/WMFFeedContentFetcher.swift:40 — WMF Framework/WMFFeedContentFetcher.swift:40-59 | WMF Framework/WMFOnThisDayEventsFetcher.swift:31-52 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) WMF Framework/ThemeableTextField.swift:66 — WMF Framework/ThemeableTextField.swift:66-89 | Wikipedia/Code/ThemeableTextView.swift:197-216 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) Wikipedia/Code/ReadingListsCoordinator.swift:141 — Wikipedia/Code/ReadingListsCoordinator.swift:141-163 | Wikipedia/Code/ReadingListsViewController.swift:264-283 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) Wikipedia/Code/NotificationsCenterFiltersViewModel.swift:162 — Wikipedia/Code/NotificationsCenterFiltersViewModel.swift:162-181 | Wikipedia/Code/NotificationsCenterFiltersViewModel.swift:183-202 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D8 · Code Coverage · Low coverage · ×8
  • Low coverage: WMFTestKitchen/Sources/WMFTestKitchen/Config/SourceConfig.swift WMFTestKitchen/Sources/WMFTestKitchen/Config/SourceConfig.swift:1 — 0.0% line coverage (0/6).
  • Low coverage: WMFTestKitchen/Sources/WMFTestKitchen/Context/AgentData.swift WMFTestKitchen/Sources/WMFTestKitchen/Context/AgentData.swift:1 — 0.0% line coverage (0/12).
  • Low coverage: WMFTestKitchen/Sources/WMFTestKitchen/Context/PageData.swift WMFTestKitchen/Sources/WMFTestKitchen/Context/PageData.swift:1 — 0.0% line coverage (0/9).
  • Low coverage: WMFTestKitchen/Sources/WMFTestKitchen/Context/PerformerData.swift WMFTestKitchen/Sources/WMFTestKitchen/Context/PerformerData.swift:1 — 0.0% line coverage (0/28).
  • Low coverage: WMFTestKitchen/Sources/WMFTestKitchen/ContextController.swift WMFTestKitchen/Sources/WMFTestKitchen/ContextController.swift:1 — 3.9% line coverage (2/51).
  • Low coverage: WMFTestKitchen/Sources/WMFTestKitchen/Error+Extension.swift WMFTestKitchen/Sources/WMFTestKitchen/Error+Extension.swift:1 — 0.0% line coverage (0/14).
  • Low coverage: WMFTestKitchen/Sources/WMFTestKitchen/Instrument/Funnel.swift WMFTestKitchen/Sources/WMFTestKitchen/Instrument/Funnel.swift:1 — 0.0% line coverage (0/34).
  • Low coverage: WMFTestKitchen/Sources/WMFTestKitchen/Instrument/InstrumentImpl.swift WMFTestKitchen/Sources/WMFTestKitchen/Instrument/InstrumentImpl.swift:1 — 0.0% line coverage (0/54).
D4 · Code Duplication · Edited copy of a member (22 corresponding lines) · ×7
  • Edited copy of a member (22 corresponding lines) Wikipedia/Code/TalkPageTopicComposeViewController+TalkPageFormattingToolbar.swift:16 — Wikipedia/Code/TalkPageTopicComposeViewController+TalkPageFormattingToolbar.swift:16-41 | Wikipedia/Code/TalkPageViewController+TalkPageFormattingToolbar.swift:19-45 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) WMFData/Sources/WMFData/Data Controllers/Games/WMFGamesDataController.swift:327 — WMFData/Sources/WMFData/Data Controllers/Games/WMFGamesDataController.swift:327-361 | WMFData/Sources/WMFData/Data Controllers/Games/WMFGamesDataController.swift:514-535 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) WMF Framework/CacheController.swift:149 — WMF Framework/CacheController.swift:149-170 | WMF Framework/ImageCacheController.swift:11-33 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) Wikipedia/Code/WMFAccountCreationViewController.swift:209 — Wikipedia/Code/WMFAccountCreationViewController.swift:209-236 | Wikipedia/Code/WMFLoginViewController.swift:467-488 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) Wikipedia/Code/DiffContainerViewController.swift:339 — Wikipedia/Code/DiffContainerViewController.swift:339-360 | Wikipedia/Code/DiffContainerViewController.swift:362-393 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) Wikipedia/Code/ActivityTabViewController.swift:545 — Wikipedia/Code/ActivityTabViewController.swift:545-567 | Wikipedia/Code/SearchViewController.swift:548-569 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Settings/WMFSettingsViewModel.swift:180 — WMFComponents/Sources/WMFComponents/Components/Settings/WMFSettingsViewModel.swift:180-201 | WMFComponents/Sources/WMFComponents/Components/Settings/WMFSettingsViewModel.swift:225-246 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (25 corresponding lines) · ×7
  • Edited copy of a member (25 corresponding lines) Wikipedia/Code/HomeFeedSettingsCoordinator.swift:83 — Wikipedia/Code/HomeFeedSettingsCoordinator.swift:83-107 | Wikipedia/Code/HomeFeedSettingsCoordinator.swift:165-194 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (25 corresponding lines) WMFData/Sources/WMFData/Data Controllers/Page History/WMFPageHistoryDataController.swift:241 — WMFData/Sources/WMFData/Data Controllers/Page History/WMFPageHistoryDataController.swift:241-265 | WMFData/Sources/WMFData/Data Controllers/Shared/WMFArticleSearchDataController.swift:236-267 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (25 corresponding lines) WMF Framework/ImageCacheDBWriter.swift:44 — WMF Framework/ImageCacheDBWriter.swift:44-68 | Wikipedia/Code/ArticleCacheDBWriter.swift:139-170 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (25 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Settings/Home/Main/WMFHomeFeedSettingsView.swift:14 — WMFComponents/Sources/WMFComponents/Components/Settings/Home/Main/WMFHomeFeedSettingsView.swift:14-38 | WMFComponents/Sources/WMFComponents/Components/Settings/WMFSettingsView.swift:95-127 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (25 corresponding lines) Wikipedia/Code/EditorViewController.swift:701 — Wikipedia/Code/EditorViewController.swift:701-725 | Wikipedia/Code/EditorViewController.swift:1097-1128 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (25 corresponding lines) Wikipedia/Code/WMFAccountCreationViewController.swift:254 — Wikipedia/Code/WMFAccountCreationViewController.swift:254-278 | Wikipedia/Code/WMFLoginViewController.swift:490-517 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (25 corresponding lines) Wikipedia/Code/ArticleViewController+Tooltips.swift:10 — Wikipedia/Code/ArticleViewController+Tooltips.swift:10-34 | Wikipedia/Code/SearchLanguagesBarViewController.swift:368-392 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (16 corresponding lines) · ×7
  • Edited copy of a member (16 corresponding lines) Command Line Tools/Update Localizations/localization.swift:215 — Command Line Tools/Update Localizations/localization.swift:215-237 | Command Line Tools/Update Localizations/localization.swift:239-254 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) Wikipedia/Code/UIViewController+Extensions.swift:45 — Wikipedia/Code/UIViewController+Extensions.swift:45-61 | Wikipedia/Code/UIViewController+Extensions.swift:64-79 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) Wikipedia/Code/ShareActivityController.swift:177 — Wikipedia/Code/ShareActivityController.swift:177-193 | Wikipedia/Code/ShareActivityController.swift:195-210 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Editors/Source Editor/Formatter Extensions/WKSourceEditorFormatterLink+ButtonActions.swift:51 — WMFComponents/Sources/WMFComponents/Components/Editors/Source Editor/Formatter Extensions/WKSourceEditorFormatterLink+ButtonActions.swift:51-69 | Wikipedia/Code/UITextView+FormattingToolbarExtension.swift:5-20 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) WMFData/Sources/WMFData/Data Controllers/Shared/WMFPageTopicsDataController.swift:128 — WMFData/Sources/WMFData/Data Controllers/Shared/WMFPageTopicsDataController.swift:128-143 | WMFData/Sources/WMFData/Data Controllers/Shared/WMFPageTopicsDataController.swift:146-161 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) Wikipedia/Code/SavedArticleDownloadProgressObserver.swift:83 — Wikipedia/Code/SavedArticleDownloadProgressObserver.swift:83-103 | Wikipedia/Code/SavedTabBadgeController.swift:131-146 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) Wikipedia/Code/SettingsCoordinator.swift:566 — Wikipedia/Code/SettingsCoordinator.swift:566-581 | Wikipedia/Code/SettingsTabViewController.swift:259-276 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 3+ corresponding lines) · ×7
  • Edited copies of one member (3 members, 3+ corresponding lines) WMFComponents/Sources/WMFComponents/Components/Search/Results/WMFSearchResultRow.swift:17 — WMFComponents/Sources/WMFComponents/Components/Search/Results/WMFSearchResultRow.swift:17-27 | WMFComponents/Sources/WMFComponents/Components/Shared/WMFArticleSummaryView.swift:19-21 | WMFComponents/Sources/WMFComponents/Components/Temp Accounts/WMFTempAccountsToastView.swift:102-112 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 3+ corresponding lines) WMFComponents/Sources/WMFComponents/Components/Activity Tab/WMFSimpleEmptyStateView.swift:47 — WMFComponents/Sources/WMFComponents/Components/Activity Tab/WMFSimpleEmptyStateView.swift:47-49 | WMFComponents/Sources/WMFComponents/Components/Shared/Empty View/WMFEmptyView.swift:137-139 | WMFComponents/Sources/WMFComponents/Components/Temp Accounts/WMFTempAccountsSheetView.swift:17-19 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 3+ corresponding lines) Command Line Tools/Update Localizations/localization.swift:78 — Command Line Tools/Update Localizations/localization.swift:78-80 | Wikipedia/Code/ArticleViewController+DonationReminder.swift:391-396 | scripts/GenerateTopicsStrings.swift:271-276 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 3+ corresponding lines) Wikipedia/Code/Session.swift:400 — Wikipedia/Code/Session.swift:400-403 | Wikipedia/Code/SessionHTTPClient.swift:69-71 | Wikipedia/Code/TestNetworkFixtures/TestNetworkFixtureHTTPClient.swift:34-36 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 3+ corresponding lines) WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/WMFYearInReviewViewCountSlideDataController.swift:68 — WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/WMFYearInReviewViewCountSlideDataController.swift:68-70 | WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewEditCountSlideDataController.swift:55-57 | WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewMostViewedArticlesSlideDataController.swift:79-81 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 3+ corresponding lines) WMF Framework/CacheFetching.swift:102 — WMF Framework/CacheFetching.swift:102-104 | WMF Framework/CacheFileWriter.swift:126-128 | Wikipedia/Code/Session.swift:770-772 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 3+ corresponding lines) WMFComponents/Sources/WMFComponents/Components/Settings/Home/For You/Whats Driving/Your Interests/WMFInterestArticleCardViewModel.swift:23 — WMFComponents/Sources/WMFComponents/Components/Settings/Home/For You/Whats Driving/Your Interests/WMFInterestArticleCardViewModel.swift:23-25 | WMFData/Sources/WMFData/Data Controllers/Home/WMFHomeDataController.swift:204-206 | Wikipedia/Code/LegacyReadingListsDataSource.swift:226-228 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
X3 · Exception handling · Swallowed exception (empty catch) · ×7
  • Swallowed exception (empty catch) WMFComponents/Sources/WMFComponents/Components/Settings/Home/For You/Whats Driving/Your Interests/WMFHomeFeedInterestsSettingsViewModel.swift:338 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) WMFComponents/Sources/WMFComponents/Components/Settings/Home/For You/Whats Driving/Your Interests/WMFHomeFeedInterestsSettingsViewModel.swift:385 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) WMFComponents/Sources/WMFComponents/Components/Games/Which Came First/Results/Articles View/WMFWhichCameFirstArticlesViewModel.swift:59 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) WMFComponents/Sources/WMFComponents/Components/Games/Which Came First/Core/Cards/WMFWhichCameFirstCardViewModel.swift:61 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) WMF Framework/PermanentlyPersistableURLCache.swift:613 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) WMF Framework/Event Platform/StorageManager.swift:41 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) Command Line Tools/Update Localizations/localization.swift:324 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
D10 · Test Quality · Skipped test · ×6
  • Skipped test: testArticleNonLeadImageCanBeTapped WikipediaUITests/ArticleControlsUITests.swift:111 — Skipped — throws XCTSkip
  • Skipped test: testArticleLinkLongPressShowsPreviewAndMenuItems WikipediaUITests/ArticleControlsUITests.swift:124 — Skipped — throws XCTSkip
  • Skipped test: testQuickFactsArticleLinkLongPressShowsPreviewAndMenuItems WikipediaUITests/ArticleControlsUITests.swift:136 — Skipped — throws XCTSkip
  • Skipped test: testArticleTableItemsCanBeTapped WikipediaUITests/ArticleControlsUITests.swift:159 — Skipped — throws XCTSkip
  • Skipped test: testBohemiaLeadImageOpensImageGalleryAndCanShare WikipediaUITests/ArticleImageGalleryUITests.swift:4 — Skipped — throws XCTSkip
  • Skipped test: testHostingItemPrefersTheVerticalBarOnIPhoneDuo WMFComponents/Tests/WMFComponentsTests/WMFBarButtonHostingViewTests.swift:64 — Skipped — throws XCTSkip
D4 · Code Duplication · Edited copy of a member (21 corresponding lines) · ×6
  • Edited copy of a member (21 corresponding lines) WMFData/Sources/WMFData/Data Controllers/Home/WMFHomeDataController.swift:528 — WMFData/Sources/WMFData/Data Controllers/Home/WMFHomeDataController.swift:528-548 | WMFData/Sources/WMFData/Data Controllers/Home/WMFHomeDataController.swift:550-570 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Settings/Home/Community/WMFHomeFeedCommunitySettingsViewModel.swift:102 — WMFComponents/Sources/WMFComponents/Components/Settings/Home/Community/WMFHomeFeedCommunitySettingsViewModel.swift:102-126 | WMFComponents/Sources/WMFComponents/Components/Settings/Home/For You/WMFHomeFeedForYouSettingsViewModel.swift:79-99 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) WMFTestKitchen/Sources/WMFTestKitchen/Context/AgentData.swift:15 — WMFTestKitchen/Sources/WMFTestKitchen/Context/AgentData.swift:15-37 | WMFTestKitchen/Sources/WMFTestKitchen/Context/InteractionData.swift:14-34 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Editors/Common Views/Base/WMFEditorToolbarButton.swift:23 — WMFComponents/Sources/WMFComponents/Components/Editors/Common Views/Base/WMFEditorToolbarButton.swift:23-47 | WMFComponents/Sources/WMFComponents/Components/Editors/Common Views/WMFEditorToolbarNavigatorButton.swift:23-43 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) Wikipedia/Code/WMFAccountLoginLogoutFetcher.swift:33 — Wikipedia/Code/WMFAccountLoginLogoutFetcher.swift:33-53 | Wikipedia/Code/WMFAccountLoginLogoutFetcher.swift:55-75 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) Wikipedia/Code/WMFChangePasswordViewController.swift:128 — Wikipedia/Code/WMFChangePasswordViewController.swift:128-148 | Wikipedia/Code/WMFForgotPasswordViewController.swift:113-133 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×6
  • Duplicated block (15 lines × 2) WMF Framework/WMFBlocksKit.swift:33 — WMF Framework/WMFBlocksKit.swift:33-47 | WMF Framework/WMFBlocksKit.swift:85-99 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `WMF Framework/WMFBlocksKit.swift:33` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (15 lines × 2) WMFComponents/Sources/WMFComponents/Components/Activity Tab/WMFActivityTabView.swift:130 — WMFComponents/Sources/WMFComponents/Components/Activity Tab/WMFActivityTabView.swift:130-144 | WMFComponents/Sources/WMFComponents/Components/Activity Tab/WMFActivityTabView.swift:185-199 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `WMFComponents/Sources/WMFComponents/Components/Activity Tab/WMFActivityTabView.swift:130` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `WMFComponents/Sources/WMFComponents/Components/Activity Tab/WMFActivityTabView.swift:128` calls `padding` and `WMFComponents/Sources/WMFComponents/Components/Activity Tab/WMFActivityTabView.swift:183` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (15 lines × 2) Wikipedia/Code/ExploreViewController.swift:1105 — Wikipedia/Code/ExploreViewController.swift:1105-1119 | Wikipedia/Code/HomeViewController.swift:159-173 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/ExploreViewController.swift:1105` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (15 lines × 2) Wikipedia/Code/NewsViewController.swift:259 — Wikipedia/Code/NewsViewController.swift:259-273 | Wikipedia/Code/OnThisDayViewController.swift:262-276 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (15 lines × 2) WMF Framework/SetupButton.swift:6 — WMF Framework/SetupButton.swift:6-20 | WMF Framework/SetupView.swift:6-20 — before extracting anything, compare `WMF Framework/SetupButton.swift` and `WMF Framework/SetupView.swift` as WHOLE FILES: 83% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (15 lines × 2) Wikipedia/Code/ArticleViewController.swift:125 — Wikipedia/Code/ArticleViewController.swift:125-139 | Wikipedia/Code/PlacesViewController.swift:410-424 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×6
  • Duplicated block (14 lines × 2) WMF Framework/MWKDataStore+LegacyPageViews.swift:26 — WMF Framework/MWKDataStore+LegacyPageViews.swift:26-39 | WMF Framework/MWKDataStore+LegacyPageViews.swift:72-85 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `WMF Framework/MWKDataStore+LegacyPageViews.swift:26` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) WMF Framework/Remote Notifications/RemoteNotificationsOperationsController.swift:114 — WMF Framework/Remote Notifications/RemoteNotificationsOperationsController.swift:114-127 | WMF Framework/Remote Notifications/RemoteNotificationsOperationsController.swift:147-160 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) WMFComponents/Sources/WMFComponents/Components/Games/Splash Screen/WMFGamesSplashScreenViewController.swift:79 — WMFComponents/Sources/WMFComponents/Components/Games/Splash Screen/WMFGamesSplashScreenViewController.swift:79-92 | WMFComponents/Sources/WMFComponents/Components/Games/Which Came First/Core/WMFWhichCameFirstViewController.swift:29-42 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 2) Wikipedia/Code/ArticlePlaceView.swift:261 — Wikipedia/Code/ArticlePlaceView.swift:261-274 | Wikipedia/Code/ArticlePlaceView.swift:488-501 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/ArticlePlaceView.swift:261` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) Wikipedia/Code/ScrollViewGradientView.swift:39 — Wikipedia/Code/ScrollViewGradientView.swift:39-52 | Wikipedia/Code/WMFImageGalleryGradientViews.swift:35-48 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (14 lines × 2) Wikipedia/Code/YearInReviewSlideViewModelFactory.swift:503 — Wikipedia/Code/YearInReviewSlideViewModelFactory.swift:503-516 | Wikipedia/Code/YearInReviewSlideViewModelFactory.swift:1303-1316 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/YearInReviewSlideViewModelFactory.swift:503` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×6
  • Duplicated block (8 lines × 3) WMF Framework/SharedContainerCacheStore.swift:15 — WMF Framework/SharedContainerCacheStore.swift:15-22 | WMF Framework/SharedContainerCacheStore.swift:29-36 | WMF Framework/SharedContainerCacheStore.swift:41-48 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (8 lines × 3) WMFData/Sources/WMFData/Data Controllers/Home/WMFPageInterestDataController.swift:64 — WMFData/Sources/WMFData/Data Controllers/Home/WMFPageInterestDataController.swift:64-72 | WMFData/Sources/WMFData/Data Controllers/Home/WMFPageInterestDataController.swift:97-105 | WMFData/Sources/WMFData/Data Controllers/Shared/WMFCategoriesDataController.swift:24-31 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `WMFData/Sources/WMFData/Data Controllers/Home/WMFPageInterestDataController.swift:64` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (8 lines × 3) Wikipedia/Code/Advanced Settings/InsertMediaImagePositionSettingsViewController.swift:61 — Wikipedia/Code/Advanced Settings/InsertMediaImagePositionSettingsViewController.swift:61-68 | Wikipedia/Code/Advanced Settings/InsertMediaImageSizeSettingsViewController.swift:101-108 | Wikipedia/Code/Advanced Settings/InsertMediaImageTypeSettingsViewController.swift:76-83 — before extracting anything, compare `Wikipedia/Code/Advanced Settings/InsertMediaImagePositionSettingsViewController.swift` and `Wikipedia/Code/Advanced Settings/InsertMediaImageTypeSettingsViewController.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 3) Wikipedia/Code/DiffFetcher.swift:52 — Wikipedia/Code/DiffFetcher.swift:52-59 | Wikipedia/Code/DiffFetcher.swift:159-168 | Wikipedia/Code/GlobalUserInfoFetcher.swift:17-27 — before extracting anything, compare `Wikipedia/Code/DiffFetcher.swift` and `Wikipedia/Code/GlobalUserInfoFetcher.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/DiffFetcher.swift:52` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind `completion` to `@escaping (Result<String, Error>) -> Void` in one and `@escaping ((Result<Int, Error>) -> Void)` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (8 lines × 3) Wikipedia/Code/DiffListChangeViewModel.swift:240 — Wikipedia/Code/DiffListChangeViewModel.swift:240-247 | Wikipedia/Code/DiffListContextViewModel.swift:167-174 | Wikipedia/Code/DiffListUneditedViewModel.swift:45-52 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
  • Duplicated block (8 lines × 3) WMFData/Sources/WMFDataMocks/WMFMockBasicService.swift:149 — WMFData/Sources/WMFDataMocks/WMFMockBasicService.swift:149-156 | WMFData/Sources/WMFDataMocks/WMFMockGrowthTasksService.swift:83-90 | WMFData/Sources/WMFDataMocks/WMFMockWatchlistMediaWikiService.swift:129-136 — before extracting anything, compare `WMFData/Sources/WMFDataMocks/WMFMockBasicService.swift` and `WMFData/Sources/WMFDataMocks/WMFMockGrowthTasksService.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D36 · Supply-chain Provenance & Signing · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (18 corresponding lines) · ×5
  • Edited copy of a member (18 corresponding lines) WMF Framework/ArticleSummary.swift:73 — WMF Framework/ArticleSummary.swift:73-90 | WMFComponents/Sources/WMFComponents/Components/Reading Challenge Widget/WMFRandomWidgetViewModel.swift:37-71 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Article Tabs/WMFArticleTabsViewModel.swift:126 — WMFComponents/Sources/WMFComponents/Components/Article Tabs/WMFArticleTabsViewModel.swift:126-143 | WMFComponents/Sources/WMFComponents/Components/Games/Which Came First/Core/WMFWhichCameFirstViewModel.swift:34-68 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) Widgets/Widgets/FeaturedArticleWidget.swift:296 — Widgets/Widgets/FeaturedArticleWidget.swift:296-313 | Widgets/Widgets/PictureOfTheDayWidget.swift:261-286 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) Wikipedia/Code/ArticleViewController.swift:1434 — Wikipedia/Code/ArticleViewController.swift:1434-1451 | Wikipedia/Code/ColumnarCollectionViewController.swift:393-410 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) WMFData/Sources/WMFData/Data Controllers/Discover/WMFDiscoverDataController.swift:120 — WMFData/Sources/WMFData/Data Controllers/Discover/WMFDiscoverDataController.swift:120-137 | WMFData/Sources/WMFData/Data Controllers/Semantic Search/WMFSemanticSearchDataController.swift:137-157 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (19 corresponding lines) · ×5
  • Edited copy of a member (19 corresponding lines) Wikipedia/Code/DiffHeaderSummaryView.swift:32 — Wikipedia/Code/DiffHeaderSummaryView.swift:32-50 | Wikipedia/Code/DiffHeaderTitleView.swift:46-72 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) Wikipedia/Code/WMFLoginViewController.swift:373 — Wikipedia/Code/WMFLoginViewController.swift:373-391 | Wikipedia/Code/WMFLoginViewController.swift:393-415 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) WMF Framework/CacheDBWriting.swift:77 — WMF Framework/CacheDBWriting.swift:77-95 | WMF Framework/CacheDBWriting.swift:97-115 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Activity Tab/WMFImpactViews.swift:402 — WMFComponents/Sources/WMFComponents/Components/Activity Tab/WMFImpactViews.swift:402-420 | WMFComponents/Sources/WMFComponents/Components/Activity Tab/WMFTimelineView.swift:165-185 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) Wikipedia/Code/SavedArticleDownloadProgressObserver.swift:107 — Wikipedia/Code/SavedArticleDownloadProgressObserver.swift:107-128 | Wikipedia/Code/SavedTabBadgeController.swift:148-166 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×5
  • Duplicated block (19 lines × 2) WMF Framework/MediaWikiFetcher.swift:134 — WMF Framework/MediaWikiFetcher.swift:134-152 | WMF Framework/MediaWikiFetcher.swift:156-174 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `WMF Framework/MediaWikiFetcher.swift:134` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) WMF Framework/Remote Notifications/Model/RemoteNotificationFilterType.swift:193 — WMF Framework/Remote Notifications/Model/RemoteNotificationFilterType.swift:193-211 | WMF Framework/Remote Notifications/Model/RemoteNotificationType.swift:39-57 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `WMF Framework/Remote Notifications/Model/RemoteNotificationFilterType.swift:193` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (19 lines × 2) WMFComponents/Sources/WMFComponents/Components/Settings/Account/WMFAccountSettingsView.swift:51 — WMFComponents/Sources/WMFComponents/Components/Settings/Account/WMFAccountSettingsView.swift:51-69 | WMFComponents/Sources/WMFComponents/Components/Settings/Push Notifications/WMFPushNotificationsSettingsView.swift:56-74 — before extracting anything, compare `WMFComponents/Sources/WMFComponents/Components/Settings/Account/WMFAccountSettingsView.swift` and `WMFComponents/Sources/WMFComponents/Components/Settings/Push Notifications/WMFPushNotificationsSettingsView.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `WMFComponents/Sources/WMFComponents/Components/Settings/Account/WMFAccountSettingsView.swift:51` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) WMFData/Sources/WMFData/Data Controllers/Home/WMFHomeDataController.swift:672 — WMFData/Sources/WMFData/Data Controllers/Home/WMFHomeDataController.swift:672-690 | WMFData/Sources/WMFData/Data Controllers/Shared/WMFRandomDataController.swift:45-63 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `WMFData/Sources/WMFData/Data Controllers/Home/WMFHomeDataController.swift:672` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) Wikipedia/Code/ColumnarCollectionViewController.swift:193 — Wikipedia/Code/ColumnarCollectionViewController.swift:193-211 | Wikipedia/Code/InsertMediaSearchResultsCollectionViewController.swift:158-176 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×5
  • Duplicated block (7 lines × 3) WMFComponents/Sources/WMFComponents/Components/Shared/Project Icons/WMFProjectIconView.swift:31 — WMFComponents/Sources/WMFComponents/Components/Shared/Project Icons/WMFProjectIconView.swift:31-37 | WMFComponents/Sources/WMFComponents/Components/Shared/Project Icons/WMFProjectIconView.swift:40-46 | WMFComponents/Sources/WMFComponents/Components/Shared/Project Icons/WMFProjectIconView.swift:48-54 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (7 lines × 3) WMFData/Sources/WMFData/Data Controllers/Home/WMFHomeDataController.swift:684 — WMFData/Sources/WMFData/Data Controllers/Home/WMFHomeDataController.swift:684-690 | WMFData/Sources/WMFData/Data Controllers/Shared/WMFArticleSearchDataController.swift:46-52 | WMFData/Sources/WMFData/Data Controllers/Shared/WMFRandomDataController.swift:57-63 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `WMFData/Sources/WMFData/Data Controllers/Home/WMFHomeDataController.swift:684` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `WMFData/Sources/WMFData/Data Controllers/Shared/WMFArticleSearchDataController.swift:54` calls `String` and `WMFData/Sources/WMFData/Data Controllers/Home/WMFHomeDataController.swift:691` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 3) Wikipedia/Code/WMFAccountLoginLogoutFetcher.swift:229 — Wikipedia/Code/WMFAccountLoginLogoutFetcher.swift:229-235 | Wikipedia/Code/WMFAccountLoginLogoutFetcher.swift:242-248 | Wikipedia/Code/WMFAccountLoginLogoutFetcher.swift:269-275 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (7 lines × 3) WMF Framework/ActionButton.swift:24 — WMF Framework/ActionButton.swift:24-30 | Wikipedia/Code/CollectionViewCell.swift:197-203 | Wikipedia/Code/SizeThatFitsReusableView.swift:108-114 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
  • Duplicated block (7 lines × 3) Wikipedia/Code/EraseSavedArticlesView.swift:12 — Wikipedia/Code/EraseSavedArticlesView.swift:12-18 | Wikipedia/Code/InsertMediaImageInfoView.swift:19-25 | Wikipedia/Code/InsertMediaSettingsButtonView.swift:16-22 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
D4 · Code Duplication · Edited copy of a member (26 corresponding lines) · ×4
  • Edited copy of a member (26 corresponding lines) WMFComponents/Sources/WMFComponents/Components/App Onboarding/WMFAppOnboardingStepViews.swift:83 — WMFComponents/Sources/WMFComponents/Components/App Onboarding/WMFAppOnboardingStepViews.swift:83-108 | WMFComponents/Sources/WMFComponents/Components/App Onboarding/WMFAppOnboardingStepViews.swift:266-293 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) WMF Framework/ArticleCacheResourceDBWriting.swift:27 — WMF Framework/ArticleCacheResourceDBWriting.swift:27-52 | WMF Framework/ArticleCacheResourceDBWriting.swift:54-79 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Editors/Source Editor/Formatter Extensions/WKSourceEditorFormatterList+ButtonActions.swift:11 — WMFComponents/Sources/WMFComponents/Components/Editors/Source Editor/Formatter Extensions/WKSourceEditorFormatterList+ButtonActions.swift:11-36 | WMFComponents/Sources/WMFComponents/Components/Editors/Source Editor/Formatter Extensions/WKSourceEditorFormatterList+ButtonActions.swift:38-64 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) WMFData/Sources/WMFData/Data Controllers/Year In Review/WMFYearInReviewDataController.swift:419 — WMFData/Sources/WMFData/Data Controllers/Year In Review/WMFYearInReviewDataController.swift:419-449 | WMFData/Sources/WMFData/Data Controllers/Year In Review/WMFYearInReviewDataController.swift:577-602 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 9+ corresponding lines) · ×4
  • Edited copies of one member (3 members, 9+ corresponding lines) Wikipedia/Code/NotificationsCenterCommonViewModel+ActionExtensions.swift:17 — Wikipedia/Code/NotificationsCenterCommonViewModel+ActionExtensions.swift:17-29 | Wikipedia/Code/NotificationsCenterCommonViewModel+ActionExtensions.swift:32-40 | Wikipedia/Code/NotificationsCenterCommonViewModel+ActionExtensions.swift:167-175 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 9+ corresponding lines) WMFComponents/Sources/WMFComponents/Components/ArticlePreview/WMFArticlePreviewViewModel.swift:13 — WMFComponents/Sources/WMFComponents/Components/ArticlePreview/WMFArticlePreviewViewModel.swift:13-26 | WMFComponents/Sources/WMFComponents/Components/ArticlePreview/WMFArticlePreviewViewModel.swift:28-36 | WMFComponents/Sources/WMFComponents/Components/ArticlePreview/WMFArticlePreviewViewModel.swift:38-46 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 9+ corresponding lines) Wikipedia/Code/NotificationsCenterCommonViewModel+ActionExtensions.swift:156 — Wikipedia/Code/NotificationsCenterCommonViewModel+ActionExtensions.swift:156-164 | Wikipedia/Code/NotificationsCenterCommonViewModel+ActionExtensions.swift:191-199 | Wikipedia/Code/NotificationsCenterCommonViewModel+ActionExtensions.swift:202-210 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 9+ corresponding lines) WMF Framework/MagicWordUtils.swift:36 — WMF Framework/MagicWordUtils.swift:36-44 | WMFData/Sources/WMFData/Data Controllers/Developer Settings/WMFDeveloperSettingsDataController.swift:236-244 | Wikipedia/Code/WikipediaURLTranslations.swift:28-36 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 4+ corresponding lines) · ×4
  • Edited copies of one member (3 members, 4+ corresponding lines) Wikipedia/Code/ArticleViewController+ArticlePreviewing.swift:27 — Wikipedia/Code/ArticleViewController+ArticlePreviewing.swift:27-30 | Wikipedia/Code/ColumnarCollectionViewController.swift:554-557 | Wikipedia/Code/ExploreCardViewController.swift:699-702 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 4+ corresponding lines) Wikipedia/Code/NotificationsCenterDetailActionCell.swift:40 — Wikipedia/Code/NotificationsCenterDetailActionCell.swift:40-43 | Wikipedia/Code/NotificationsCenterDetailContentCell.swift:17-20 | Wikipedia/Code/NotificationsCenterDetailHeaderCell.swift:77-80 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 4+ corresponding lines) Wikipedia/Code/EditorViewController.swift:961 — Wikipedia/Code/EditorViewController.swift:961-964 | Wikipedia/Code/TalkPageTopicComposeViewController+TalkPageFormattingToolbar.swift:66-69 | Wikipedia/Code/TalkPageViewController+TalkPageFormattingToolbar.swift:74-77 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 4+ corresponding lines) WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/WMFYearInReviewMostReadCategoriesSlideDataController.swift:25 — WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/WMFYearInReviewMostReadCategoriesSlideDataController.swift:25-28 | WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewDaysVisitedSlideDataController.swift:38-41 | WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewReadingStreakSlideDataController.swift:72-75 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (20–21 lines × 2) · ×4
  • Duplicated block (20–21 lines × 2) WMF Framework/ArticleCacheController.swift:53 — WMF Framework/ArticleCacheController.swift:53-73 | WMF Framework/ArticleCacheController.swift:91-110 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `WMF Framework/ArticleCacheController.swift:53` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
  • Duplicated block (20–21 lines × 2) WMFComponents/Sources/WMFComponents/Components/Games/Which Came First/Core/WMFWhichCameFirstView.swift:166 — WMFComponents/Sources/WMFComponents/Components/Games/Which Came First/Core/WMFWhichCameFirstView.swift:166-185 | WMFComponents/Sources/WMFComponents/Components/Games/Which Came First/Core/WMFWhichCameFirstView.swift:200-220 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `WMFComponents/Sources/WMFComponents/Components/Games/Which Came First/Core/WMFWhichCameFirstView.swift:166` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (20–21 lines × 2) Wikipedia/Code/ArticleViewController+Editing.swift:161 — Wikipedia/Code/ArticleViewController+Editing.swift:161-181 | Wikipedia/Code/ArticleViewController+Editing.swift:215-234 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/ArticleViewController+Editing.swift:161` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (20–21 lines × 2) Wikipedia/Code/TalkPageTopicComposeViewController+TalkPageFormattingToolbar.swift:22 — Wikipedia/Code/TalkPageTopicComposeViewController+TalkPageFormattingToolbar.swift:22-41 | Wikipedia/Code/TalkPageViewController+TalkPageFormattingToolbar.swift:25-45 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/TalkPageTopicComposeViewController+TalkPageFormattingToolbar.swift:22` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (19–20 lines × 2) · ×4
  • Duplicated block (19–20 lines × 2) WMF Framework/Remote Notifications/RemoteNotificationsAPIController.swift:297 — WMF Framework/Remote Notifications/RemoteNotificationsAPIController.swift:297-316 | WMF Framework/Remote Notifications/RemoteNotificationsAPIController.swift:325-343 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `WMF Framework/Remote Notifications/RemoteNotificationsAPIController.swift:297` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19–20 lines × 2) WMFComponents/Sources/WMFComponents/Components/Year in Review/WMFYearInReviewView.swift:69 — WMFComponents/Sources/WMFComponents/Components/Year in Review/WMFYearInReviewView.swift:69-87 | WMFComponents/Sources/WMFComponents/Components/Year in Review/WMFYearInReviewView.swift:91-110 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `WMFComponents/Sources/WMFComponents/Components/Year in Review/WMFYearInReviewView.swift:69` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (19–20 lines × 2) Wikipedia/Code/NewsViewController.swift:239 — Wikipedia/Code/NewsViewController.swift:239-257 | Wikipedia/Code/OnThisDayViewController.swift:241-260 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (19–20 lines × 2) WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewBiggestReadingDaySlideDataController.swift:157 — WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewBiggestReadingDaySlideDataController.swift:157-176 | WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewLongestReadSlideDataController.swift:155-173 — before extracting anything, compare `WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewBiggestReadingDaySlideDataController.swift` and `WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewLongestReadSlideDataController.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 55 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewBiggestReadingDaySlideDataController.swift:157` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×4
  • Duplicated block (16 lines × 2) WMF Framework/CacheDBWriting.swift:80 — WMF Framework/CacheDBWriting.swift:80-95 | WMF Framework/CacheDBWriting.swift:100-115 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `WMF Framework/CacheDBWriting.swift:80` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) Wikipedia/Code/DiffContainerViewController.swift:739 — Wikipedia/Code/DiffContainerViewController.swift:739-754 | Wikipedia/Code/DiffContainerViewController.swift:783-798 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/DiffContainerViewController.swift:739` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) Wikipedia/Code/DiffTransformer.swift:209 — Wikipedia/Code/DiffTransformer.swift:209-224 | Wikipedia/Code/DiffTransformer.swift:231-246 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/DiffTransformer.swift:209` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) WMFData/Sources/WMFData/Data Controllers/Discover/WMFDiscoverDataController.swift:153 — WMFData/Sources/WMFData/Data Controllers/Discover/WMFDiscoverDataController.swift:153-168 | WMFData/Sources/WMFData/Data Controllers/Donor Experience/WMFDonationReminderDataController.swift:371-386 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (14–15 lines × 2) · ×4
  • Duplicated block (14–15 lines × 2) WMF Framework/ThemeableTextField.swift:75 — WMF Framework/ThemeableTextField.swift:75-89 | Wikipedia/Code/ThemeableTextView.swift:203-216 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `WMF Framework/ThemeableTextField.swift:75` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14–15 lines × 2) WMFComponents/Sources/WMFComponents/Components/Profile/WMFProfileViewModel.swift:94 — WMFComponents/Sources/WMFComponents/Components/Profile/WMFProfileViewModel.swift:94-108 | WMFComponents/Sources/WMFComponents/Components/Profile/WMFProfileViewModel.swift:237-250 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `WMFComponents/Sources/WMFComponents/Components/Profile/WMFProfileViewModel.swift:94` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14–15 lines × 2) WMFData/Sources/WMFData/Data Controllers/Donor Experience/WMFFundraisingCampaignDataController.swift:253 — WMFData/Sources/WMFData/Data Controllers/Donor Experience/WMFFundraisingCampaignDataController.swift:253-267 | WMFData/Sources/WMFData/Data Controllers/Temp Accounts/WMFTempAccountDataController.swift:79-92 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `WMFData/Sources/WMFData/Data Controllers/Donor Experience/WMFFundraisingCampaignDataController.swift:253` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind `completion` to `(@Sendable (Result<Void, Error>) -> Void)? = nil` in one and `(@Sendable (Result<Bool, Error>) -> Void)? = nil` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (14–15 lines × 2) Wikipedia/Code/ArticleViewController+Editing.swift:408 — Wikipedia/Code/ArticleViewController+Editing.swift:408-422 | Wikipedia/Code/TalkPageViewController.swift:766-779 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/ArticleViewController+Editing.swift:408` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (10–11 lines × 2) · ×4
  • Duplicated block (10–11 lines × 2) WMF Framework/Remote Notifications/RemoteNotificationsController.swift:429 — WMF Framework/Remote Notifications/RemoteNotificationsController.swift:429-438 | WMF Framework/Remote Notifications/RemoteNotificationsController.swift:440-450 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `WMF Framework/Remote Notifications/RemoteNotificationsController.swift:440` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10–11 lines × 2) WMFComponents/Sources/WMFComponents/Components/Activity Tab/WMFActivityTabInfoCardView.swift:56 — WMFComponents/Sources/WMFComponents/Components/Activity Tab/WMFActivityTabInfoCardView.swift:56-65 | WMFComponents/Sources/WMFComponents/Components/Activity Tab/WMFActivityTabInfoCardView.swift:67-77 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `WMFComponents/Sources/WMFComponents/Components/Activity Tab/WMFActivityTabInfoCardView.swift:56` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10–11 lines × 2) WMFComponents/Sources/WMFComponents/Components/Activity Tab/WMFImpactViews.swift:147 — WMFComponents/Sources/WMFComponents/Components/Activity Tab/WMFImpactViews.swift:147-156 | WMFComponents/Sources/WMFComponents/Components/Activity Tab/WMFImpactViews.swift:171-181 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `WMFComponents/Sources/WMFComponents/Components/Activity Tab/WMFImpactViews.swift:184` calls `HStack` and `WMFComponents/Sources/WMFComponents/Components/Activity Tab/WMFImpactViews.swift:157` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10–11 lines × 2) WMFData/Sources/WMFData/Data Controllers/Semantic Search/WMFSemanticSearchDataController+Results.swift:37 — WMFData/Sources/WMFData/Data Controllers/Semantic Search/WMFSemanticSearchDataController+Results.swift:37-46 | WMFData/Sources/WMFData/Data Controllers/Shared/UserContributionsDataController.swift:24-34 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `WMFData/Sources/WMFData/Data Controllers/Semantic Search/WMFSemanticSearchDataController+Results.swift:37` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `WMFData/Sources/WMFData/Data Controllers/Shared/UserContributionsDataController.swift:21` calls `wikipedia` and `WMFData/Sources/WMFData/Data Controllers/Semantic Search/WMFSemanticSearchDataController+Results.swift:34` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (10 lines × 3) · ×4
  • Duplicated block (10 lines × 3) WMF Framework/Remote Notifications/RemoteNotificationsController.swift:128 — WMF Framework/Remote Notifications/RemoteNotificationsController.swift:128-137 | WMF Framework/Remote Notifications/RemoteNotificationsController.swift:178-187 | WMF Framework/Remote Notifications/RemoteNotificationsController.swift:196-205 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 3) Wikipedia/Code/NotificationsCenterCellViewModel+SheetActionExtensions.swift:72 — Wikipedia/Code/NotificationsCenterCellViewModel+SheetActionExtensions.swift:72-81 | Wikipedia/Code/NotificationsCenterCellViewModel+SheetActionExtensions.swift:90-99 | Wikipedia/Code/NotificationsCenterCellViewModel+SheetActionExtensions.swift:216-225 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/NotificationsCenterCellViewModel+SheetActionExtensions.swift:72` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 3) Wikipedia/Code/TalkPageFetcher.swift:128 — Wikipedia/Code/TalkPageFetcher.swift:128-137 | Wikipedia/Code/TalkPageFetcher.swift:164-173 | Wikipedia/Code/TalkPageFetcher.swift:233-242 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `completion` to `@escaping (Result<Bool, Error>) -> Void` in one and `@escaping (Result<[String], Error>) -> Void` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (10 lines × 3) Wikipedia/Code/Advanced Settings/InsertMediaAdvancedSettingsViewController.swift:114 — Wikipedia/Code/Advanced Settings/InsertMediaAdvancedSettingsViewController.swift:114-123 | Wikipedia/Code/Advanced Settings/InsertMediaImagePositionSettingsViewController.swift:72-81 | Wikipedia/Code/Advanced Settings/InsertMediaImageSizeSettingsViewController.swift:112-121 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (9 lines × 3) · ×4
  • Duplicated block (9 lines × 3) Wikipedia/Code/ColumnarCollectionViewController.swift:510 — Wikipedia/Code/ColumnarCollectionViewController.swift:510-518 | Wikipedia/Code/NewsViewController.swift:262-270 | Wikipedia/Code/OnThisDayViewController.swift:265-273 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/ColumnarCollectionViewController.swift:510` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 3) Wikipedia/Code/EditSaveViewController.swift:125 — Wikipedia/Code/EditSaveViewController.swift:125-133 | Wikipedia/Code/TalkPageReplyComposeContentView.swift:375-383 | Wikipedia/Code/TalkPageTopicComposeViewController.swift:476-484 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Wikipedia/Code/TalkPageTopicComposeViewController.swift:486` calls `Styles` and `Wikipedia/Code/TalkPageReplyComposeContentView.swift:385` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 3) Wikipedia/Code/WMFAccountLoginLogoutFetcher.swift:239 — Wikipedia/Code/WMFAccountLoginLogoutFetcher.swift:239-247 | Wikipedia/Code/WMFAccountLoginLogoutFetcher.swift:251-259 | Wikipedia/Code/WMFAccountLoginLogoutFetcher.swift:266-274 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/WMFAccountLoginLogoutFetcher.swift:239` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 3) WMF Framework/MWKDataStore+LanguageVariantMigration.swift:115 — WMF Framework/MWKDataStore+LanguageVariantMigration.swift:115-123 | WMF Framework/MWKDataStore+LanguageVariantMigration.swift:127-135 | WMF Framework/MWKDataStore+LanguageVariantMigration.swift:138-147 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `WMF Framework/MWKDataStore+LanguageVariantMigration.swift:127` calls `NSPredicate` and `WMF Framework/MWKDataStore+LanguageVariantMigration.swift:138` does not — after which the two agree again for 5 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Edited copy of a member (28 corresponding lines) · ×3
  • Edited copy of a member (28 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Watchlist/WMFWatchlistViewController.swift:54 — WMFComponents/Sources/WMFComponents/Components/Watchlist/WMFWatchlistViewController.swift:54-85 | WMFComponents/Sources/WMFComponents/Components/Watchlist/WMFWatchlistViewController.swift:87-114 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (28 corresponding lines) Wikipedia/Code/ArticleCollectionViewController.swift:216 — Wikipedia/Code/ArticleCollectionViewController.swift:216-243 | Wikipedia/Code/ExploreCardViewController.swift:606-634 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (28 corresponding lines) Wikipedia/Code/DiffContainerViewController.swift:727 — Wikipedia/Code/DiffContainerViewController.swift:727-754 | Wikipedia/Code/DiffContainerViewController.swift:770-798 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (29 corresponding lines) · ×3
  • Edited copy of a member (29 corresponding lines) Wikipedia/Code/Session.swift:493 — Wikipedia/Code/Session.swift:493-527 | Wikipedia/Code/Session.swift:544-572 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (29 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Donate Form/WMFDonateViewModel.swift:42 — WMFComponents/Sources/WMFComponents/Components/Donate Form/WMFDonateViewModel.swift:42-88 | WMFComponents/Sources/WMFComponents/Components/Watchlist/Filter/WMFWatchlistFilterViewModel.swift:38-66 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (29 corresponding lines) WMF Framework/Remote Notifications/Operations/RemoteNotificationsMarkAllAsReadOperation.swift:5 — WMF Framework/Remote Notifications/Operations/RemoteNotificationsMarkAllAsReadOperation.swift:5-37 | WMF Framework/Remote Notifications/Operations/RemoteNotificationsMarkReadOrUnreadOperation.swift:20-48 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (35 corresponding lines) · ×3
  • Edited copy of a member (35 corresponding lines) WMFData/Sources/WMFData/Data Controllers/Activity Tab/WMFActivityTabDataController.swift:334 — WMFData/Sources/WMFData/Data Controllers/Activity Tab/WMFActivityTabDataController.swift:334-368 | WMFData/Sources/WMFData/Data Controllers/Activity Tab/WMFActivityTabDataController.swift:370-419 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (35 corresponding lines) Wikipedia/Code/TalkPageFetcher.swift:109 — Wikipedia/Code/TalkPageFetcher.swift:109-146 | Wikipedia/Code/TalkPageFetcher.swift:153-187 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (35 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Activity Tab/WMFActivityTabView.swift:408 — WMFComponents/Sources/WMFComponents/Components/Activity Tab/WMFActivityTabView.swift:408-442 | WMFComponents/Sources/WMFComponents/Components/Activity Tab/WMFActivityTabView.swift:444-478 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (42 corresponding lines) · ×3
  • Edited copy of a member (42 corresponding lines) Wikipedia/Code/ArticleViewController+Editing.swift:372 — Wikipedia/Code/ArticleViewController+Editing.swift:372-426 | Wikipedia/Code/TalkPageViewController.swift:738-779 — These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (42 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Activity Tab/View Models/ArticleViewsViewModel.swift:24 — WMFComponents/Sources/WMFComponents/Components/Activity Tab/View Models/ArticleViewsViewModel.swift:24-70 | WMFComponents/Sources/WMFComponents/Components/Activity Tab/View Models/RecentActivityViewModel.swift:26-67 — These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (42 corresponding lines) Wikipedia/Code/EchoSubscriptionFetcher.swift:6 — Wikipedia/Code/EchoSubscriptionFetcher.swift:6-49 | Wikipedia/Code/EchoSubscriptionFetcher.swift:51-92 — These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (30 corresponding lines) · ×3
  • Edited copy of a member (30 corresponding lines) WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewBiggestReadingDaySlideDataController.swift:81 — WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewBiggestReadingDaySlideDataController.swift:81-114 | WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewLongestReadSlideDataController.swift:92-121 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (30 corresponding lines) WMFData/Sources/WMFData/Data Controllers/Shared/WMFImageDataController.swift:70 — WMFData/Sources/WMFData/Data Controllers/Shared/WMFImageDataController.swift:70-108 | WMFData/Sources/WMFData/Data Controllers/Temp Accounts/WMFTempAccountDataController.swift:78-107 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (30 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Suggested Edits/Image Recommendations/WMFImageRecommendationsViewController.swift:290 — WMFComponents/Sources/WMFComponents/Components/Suggested Edits/Image Recommendations/WMFImageRecommendationsViewController.swift:290-320 | WMFComponents/Sources/WMFComponents/Components/Suggested Edits/Image Recommendations/WMFImageRecommendationsViewController.swift:322-351 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (24 lines × 2) · ×3
  • Duplicated block (24 lines × 2) WMF Framework/Remote Notifications/Model/RemoteNotificationFilterType.swift:257 — WMF Framework/Remote Notifications/Model/RemoteNotificationFilterType.swift:257-280 | WMF Framework/Remote Notifications/Model/RemoteNotificationType.swift:85-108 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `WMF Framework/Remote Notifications/Model/RemoteNotificationFilterType.swift:257` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (24 lines × 2) WMFData/Sources/WMFData/Data Controllers/Watchlist/WMFWatchlistDataController.swift:341 — WMFData/Sources/WMFData/Data Controllers/Watchlist/WMFWatchlistDataController.swift:341-364 | WMFData/Sources/WMFData/Data Controllers/Watchlist/WMFWatchlistDataController.swift:382-405 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `WMFData/Sources/WMFData/Data Controllers/Watchlist/WMFWatchlistDataController.swift:341` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (24 lines × 2) Wikipedia/Code/CollectionViewCell.swift:163 — Wikipedia/Code/CollectionViewCell.swift:163-186 | Wikipedia/Code/SizeThatFitsReusableView.swift:79-102 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (13 lines × 3) · ×3
  • Duplicated block (13 lines × 3) WMFComponents/Sources/WMFComponents/Components/Profile/WMFProfileViewModel.swift:150 — WMFComponents/Sources/WMFComponents/Components/Profile/WMFProfileViewModel.swift:150-162 | WMFComponents/Sources/WMFComponents/Components/Profile/WMFProfileViewModel.swift:284-296 | WMFComponents/Sources/WMFComponents/Components/Profile/WMFProfileViewModel.swift:375-387 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `WMFComponents/Sources/WMFComponents/Components/Profile/WMFProfileViewModel.swift:150` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 3) Wikipedia/Code/WMFAuthAccountCreationInfoFetcher.swift:23 — Wikipedia/Code/WMFAuthAccountCreationInfoFetcher.swift:23-35 | Wikipedia/Code/WMFAuthLoginInfoFetcher.swift:23-35 | Wikipedia/Code/WMFCurrentUserFetcher.swift:69-81 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/WMFAuthAccountCreationInfoFetcher.swift:23` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 3) Wikipedia/Code/ArticleViewController+Editing.swift:399 — Wikipedia/Code/ArticleViewController+Editing.swift:399-411 | Wikipedia/Code/DescriptionEditViewController.swift:400-412 | Wikipedia/Code/TalkPageViewController.swift:757-769 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/ArticleViewController+Editing.swift:399` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (5 lines × 4) · ×3
  • Duplicated block (5 lines × 4) WMFComponents/Sources/WMFComponents/Base/Component Base Classes/WMFComponentHostingController.swift:49 — WMFComponents/Sources/WMFComponents/Base/Component Base Classes/WMFComponentHostingController.swift:49-53 | WMFComponents/Sources/WMFComponents/Base/Component Base Classes/WMFComponentNavigationController.swift:108-112 | WMFComponents/Sources/WMFComponents/Base/Component Base Classes/WMFComponentView.swift:37-41 | WMFComponents/Sources/WMFComponents/Base/Component Base Classes/WMFComponentViewController.swift:43-47 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once.
  • Duplicated block (5 lines × 4) WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewBiggestReadingDaySlideDataController.swift:75 — WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewBiggestReadingDaySlideDataController.swift:75-79 | WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewLongestReadSlideDataController.swift:86-90 | WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewRabbitHolesSlideDataController.swift:64-68 | WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewTopTopicsSlideDataController.swift:101-105 — before extracting anything, compare `WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewBiggestReadingDaySlideDataController.swift` and `WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewLongestReadSlideDataController.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 55 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 4) Wikipedia/Code/ArticleViewController.swift:1811 — Wikipedia/Code/ArticleViewController.swift:1811-1815 | Wikipedia/Code/ExploreViewController.swift:1938-1942 | Wikipedia/Code/HomeViewController.swift:527-531 | Wikipedia/Code/PlacesViewController.swift:2563-2567 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once.
D17 · Explicit Debt · HackComment · ×2
  • HackComment Wikipedia/Code/ArticleViewController.swift:1075 — // HACK: Sometimes the `scroll_to_anchor` message is not triggered from the web view over the JS bridge, even after prepareForScrollToAnchor successfully goes through. This means the completion block above is queued to scrollToAnchorCompletions but never run. We are trying to scroll again here once more after a slight delay in hopes of triggering `scroll_to_anchor` again. — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
  • HackComment WMFComponents/Sources/WMFComponents/Base/Component Base Classes/WMFComponentNavigationController.swift:63 — // HACK: Forces liquid glass bar button items to re-render with correct appearance. — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D35 · Change Coupling · Change-coupling hub · ×2
  • Change-coupling hub: ArticleViewController+ArticlePreviewing.swift → ColumnarCollectionViewController.swift, ExploreCardViewController.swift, TabsOverviewCoordinator.swift Wikipedia/Code/ArticleViewController+ArticlePreviewing.swift — `Wikipedia/Code/ArticleViewController+ArticlePreviewing.swift` changes together with 3 other files — `Wikipedia/Code/ColumnarCollectionViewController.swift`, `Wikipedia/Code/ExploreCardViewController.swift`, `Wikipedia/Code/TabsOverviewCoordinator.swift` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
  • Change-coupling hub: InsertLinkViewController.swift → ArticleViewController.swift, EditLinkViewController.swift, ExploreViewController.swift, SearchViewController.swift Wikipedia/Code/InsertLinkViewController.swift — `Wikipedia/Code/InsertLinkViewController.swift` changes together with 4 other files — `Wikipedia/Code/ArticleViewController.swift`, `Wikipedia/Code/EditLinkViewController.swift`, `Wikipedia/Code/ExploreViewController.swift`, `Wikipedia/Code/SearchViewController.swift` — none of which declares a dependency on it: one file is the hub of 4 separate couplings, not 4 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 4.
D4 · Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) · ×2
  • Members sharing a duplicated core (6 members, 50+ identical tokens) WMFComponents/Sources/WMFComponents/Components/Analytics Inspector/WMFAnalyticsInspectorViewController.swift:43 — WMFComponents/Sources/WMFComponents/Components/Analytics Inspector/WMFAnalyticsInspectorViewController.swift:43-47 | WMFComponents/Sources/WMFComponents/Components/Developer Settings/WMFDeveloperSettingsViewController.swift:41-45 | WMFComponents/Sources/WMFComponents/Components/Editors/Choose Editor/WMFChooseEditorHostingController.swift:22-26 | WMFComponents/Sources/WMFComponents/Components/Games/Which Came First/Core/WMFWhichCameFirstViewController.swift:64-96 | WMFComponents/Sources/WMFComponents/Components/Search/Semantic Search Info/WMFSemanticSearchInfoHostingController.swift:31-45 | Wikipedia/Code/TalkPageTopicComposeViewController.swift:211-217 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
  • Members sharing a duplicated core (6 members, 50+ identical tokens) WMFData/Sources/WMFData/Data Controllers/Home/WMFPageInterestDataController.swift:63 — WMFData/Sources/WMFData/Data Controllers/Home/WMFPageInterestDataController.swift:63-94 | WMFData/Sources/WMFData/Data Controllers/Home/WMFPageInterestDataController.swift:96-120 | WMFData/Sources/WMFData/Data Controllers/Shared/WMFCategoriesDataController.swift:22-60 | WMFData/Sources/WMFData/Data Controllers/Shared/WMFPageTopicsDataController.swift:26-71 | WMFData/Sources/WMFData/Data Controllers/Shared/WMFPageTopicsDataController.swift:285-307 | WMFData/Sources/WMFData/Data Controllers/Shared/WMFPageViewsDataController.swift:261-282 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) · ×2
  • Members sharing a duplicated core (5 members, 50+ identical tokens) Wikipedia/Code/ActivityTabFunnel.swift:62 — Wikipedia/Code/ActivityTabFunnel.swift:62-78 | Wikipedia/Code/ArticleTabsFunnel.swift:65-81 | Wikipedia/Code/DonateFunnel.swift:115-133 | Wikipedia/Code/EditInteractionFunnel.swift:78-96 | Wikipedia/Code/ImageRecommendationsFunnel.swift:83-101 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) WMFData/Sources/WMFDataMocks/WMFMockGrowthTasksService.swift:8 — WMFData/Sources/WMFDataMocks/WMFMockGrowthTasksService.swift:8-20 | WMFData/Sources/WMFDataMocks/WMFMockGrowthTasksService.swift:22-33 | WMFData/Sources/WMFDataMocks/WMFMockGrowthTasksService.swift:35-46 | WMFData/Sources/WMFDataMocks/WMFMockWatchlistMediaWikiService.swift:73-87 | WMFData/Sources/WMFDataMocks/WMFMockWatchlistMediaWikiService.swift:108-117 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication · Edited copy of a member (33 corresponding lines) · ×2
  • Edited copy of a member (33 corresponding lines) Wikipedia/Code/ActivityTabViewController.swift:892 — Wikipedia/Code/ActivityTabViewController.swift:892-924 | Wikipedia/Code/TabsOverviewCoordinator.swift:36-69 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (33 corresponding lines) Wikipedia/Code/YearInReviewSlideViewModelFactory.swift:871 — Wikipedia/Code/YearInReviewSlideViewModelFactory.swift:871-909 | Wikipedia/Code/YearInReviewSlideViewModelFactory.swift:985-1017 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (39 corresponding lines) · ×2
  • Edited copy of a member (39 corresponding lines) WMF Framework/Remote Notifications/Model/RemoteNotificationFilterType.swift:108 — WMF Framework/Remote Notifications/Model/RemoteNotificationFilterType.swift:108-146 | WMF Framework/Remote Notifications/Model/RemoteNotificationFilterType.swift:148-191 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (39 corresponding lines) WMFData/Sources/WMFData/Data Controllers/Donor Experience/WMFFundraisingCampaignDataController.swift:582 — WMFData/Sources/WMFData/Data Controllers/Donor Experience/WMFFundraisingCampaignDataController.swift:582-620 | WMFData/Sources/WMFData/Models/Donor Experience/WMFDonateConfigResponse.swift:8-50 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (23 corresponding lines) · ×2
  • Edited copy of a member (23 corresponding lines) WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewBiggestReadingDaySlideDataController.swift:157 — WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewBiggestReadingDaySlideDataController.swift:157-180 | WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewLongestReadSlideDataController.swift:155-177 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) Wikipedia/Code/InsertMediaSettingsViewController.swift:451 — Wikipedia/Code/InsertMediaSettingsViewController.swift:451-473 | Wikipedia/Code/InsertMediaSettingsViewController.swift:475-497 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (27 corresponding lines) · ×2
  • Edited copy of a member (27 corresponding lines) WMF Framework/Remote Notifications/Model/RemoteNotificationsModelController.swift:221 — WMF Framework/Remote Notifications/Model/RemoteNotificationsModelController.swift:221-255 | WMF Framework/Remote Notifications/Model/RemoteNotificationsModelController.swift:257-283 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (27 corresponding lines) WMF Framework/Remote Notifications/Model/RemoteNotificationFilterType.swift:193 — WMF Framework/Remote Notifications/Model/RemoteNotificationFilterType.swift:193-219 | WMF Framework/Remote Notifications/Model/RemoteNotificationType.swift:39-66 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (24 corresponding lines) · ×2
  • Edited copy of a member (24 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Settings/Account/WMFAccountSettingsView.swift:51 — WMFComponents/Sources/WMFComponents/Components/Settings/Account/WMFAccountSettingsView.swift:51-80 | WMFComponents/Sources/WMFComponents/Components/Settings/Push Notifications/WMFPushNotificationsSettingsView.swift:56-79 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) Wikipedia/Code/EditorViewController.swift:445 — Wikipedia/Code/EditorViewController.swift:445-468 | Wikipedia/Code/EditorViewController.swift:470-494 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 5+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 5+ corresponding lines) Wikipedia/Code/TalkPageCellCommentViewModel.swift:32 — Wikipedia/Code/TalkPageCellCommentViewModel.swift:32-36 | Wikipedia/Code/TalkPageCellViewModel.swift:71-81 | Wikipedia/Code/TalkPageCellViewModel.swift:83-91 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 5+ corresponding lines) Wikipedia/Code/ArticleLocationCollectionViewController.swift:233 — Wikipedia/Code/ArticleLocationCollectionViewController.swift:233-241 | Wikipedia/Code/ColumnarCollectionViewController.swift:524-532 | Wikipedia/Code/ColumnarCollectionViewController.swift:559-563 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 14+ corresponding lines) · ×2
  • Edited copies of one member (5 members, 14+ corresponding lines) Wikipedia/Code/YearInReviewSlideViewModelFactory.swift:594 — Wikipedia/Code/YearInReviewSlideViewModelFactory.swift:594-612 | Wikipedia/Code/YearInReviewSlideViewModelFactory.swift:747-760 | Wikipedia/Code/YearInReviewSlideViewModelFactory.swift:1184-1197 | Wikipedia/Code/YearInReviewSlideViewModelFactory.swift:1224-1240 | Wikipedia/Code/YearInReviewSlideViewModelFactory.swift:1266-1282 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
  • Edited copies of one member (5 members, 14+ corresponding lines) Wikipedia/Code/ActivityTabViewController.swift:357 — Wikipedia/Code/ActivityTabViewController.swift:357-372 | Wikipedia/Code/ArticleViewController.swift:104-118 | Wikipedia/Code/ExploreViewController.swift:82-95 | Wikipedia/Code/PlacesViewController.swift:436-450 | Wikipedia/Code/SettingsTabViewController.swift:60-81 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 7+ corresponding lines) · ×2
  • Edited copies of one member (4 members, 7+ corresponding lines) WMFComponents/Sources/WMFComponents/Components/Article Tabs/WMFArticleTabsHostingController.swift:65 — WMFComponents/Sources/WMFComponents/Components/Article Tabs/WMFArticleTabsHostingController.swift:65-72 | WMFComponents/Sources/WMFComponents/Components/Settings/WMFSettingsViewController.swift:38-55 | Wikipedia/Code/Database Population/DatabasePopulationHostingController.swift:23-45 | Wikipedia/Code/NotificationsCenterFlowHostingController.swift:18-24 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 7+ corresponding lines) Wikipedia/Code/AppOnboardingCoordinator.swift:327 — Wikipedia/Code/AppOnboardingCoordinator.swift:327-333 | Wikipedia/Code/DiscoverReadingListCoordinator.swift:168-174 | Wikipedia/Code/SettingsCoordinator.swift:362-373 | Wikipedia/Code/WhichCameFirstCoordinator.swift:414-421 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 5+ corresponding lines) · ×2
  • Edited copies of one member (5 members, 5+ corresponding lines) WMFComponents/Sources/WMFComponents/Components/Saved/Create Reading List/WMFCreateReadingListHostingController.swift:79 — WMFComponents/Sources/WMFComponents/Components/Saved/Create Reading List/WMFCreateReadingListHostingController.swift:79-87 | WMFComponents/Sources/WMFComponents/Components/Settings/Home/For You/Whats Driving/WMFHomeFeedWhatsDrivingSettingsViewController.swift:23-29 | WMFComponents/Sources/WMFComponents/Components/Watchlist/Filter/WMFWatchlistFilterHostingController.swift:30-36 | Wikipedia/Code/EditLinkViewController.swift:86-94 | Wikipedia/Code/PageIssuesTableViewController.swift:30-34 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
  • Edited copies of one member (5 members, 5+ corresponding lines) Wikipedia/Code/ArticleURLListViewController.swift:111 — Wikipedia/Code/ArticleURLListViewController.swift:111-116 | Wikipedia/Code/ArticleViewController+ArticlePreviewing.swift:32-36 | Wikipedia/Code/ExploreCardViewController.swift:681-685 | Wikipedia/Code/NewsViewController.swift:88-95 | Wikipedia/Code/OnThisDayViewController.swift:114-119 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 13+ corresponding lines) · ×2
  • Edited copies of one member (4 members, 13+ corresponding lines) WMF Framework/DateFormatter+WikipediaLanguage.swift:19 — WMF Framework/DateFormatter+WikipediaLanguage.swift:19-31 | WMF Framework/DateFormatter+WikipediaLanguage.swift:35-47 | WMF Framework/DateFormatter+WikipediaLanguage.swift:51-63 | WMF Framework/DateFormatter+WikipediaLanguage.swift:67-79 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 13+ corresponding lines) WMF Framework/CacheGatekeeper.swift:34 — WMF Framework/CacheGatekeeper.swift:34-47 | WMF Framework/CacheGatekeeper.swift:49-62 | WMF Framework/CacheGatekeeper.swift:154-166 | WMF Framework/CacheGatekeeper.swift:168-181 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 10+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 10+ corresponding lines) WMFComponents/Sources/WMFComponents/Components/Editors/Common Views/Base/WMFEditorToolbarButton.swift:110 — WMFComponents/Sources/WMFComponents/Components/Editors/Common Views/Base/WMFEditorToolbarButton.swift:110-121 | WMFComponents/Sources/WMFComponents/Components/Editors/Common Views/Input Views/WMFEditorMultiButton.swift:110-119 | WMFComponents/Sources/WMFComponents/Components/Editors/Common Views/WMFEditorToolbarNavigatorButton.swift:85-96 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 10+ corresponding lines) WMFComponents/Sources/WMFComponents/Components/Editors/Common Views/Base/WMFEditorToolbarButton.swift:57 — WMFComponents/Sources/WMFComponents/Components/Editors/Common Views/Base/WMFEditorToolbarButton.swift:57-67 | WMFComponents/Sources/WMFComponents/Components/Editors/Common Views/Input Views/WMFEditorHeaderSelectButton.swift:50-60 | WMFComponents/Sources/WMFComponents/Components/Editors/Common Views/WMFEditorToolbarNavigatorButton.swift:53-62 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 12+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 12+ corresponding lines) WMFData/Sources/WMFData/Data Controllers/GlobalUserInfo/WMFGlobalUserInfoDataController.swift:36 — WMFData/Sources/WMFData/Data Controllers/GlobalUserInfo/WMFGlobalUserInfoDataController.swift:36-47 | WMFData/Sources/WMFData/Data Controllers/Shared/WMFArticleSummaryDataController.swift:87-98 | WMFData/Sources/WMFData/Data Controllers/Shared/WMFUserImpactDataController.swift:13-24 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 12+ corresponding lines) Wikipedia/Code/ArticleViewController+Watchlist.swift:34 — Wikipedia/Code/ArticleViewController+Watchlist.swift:34-45 | Wikipedia/Code/ArticleViewController+Watchlist.swift:47-60 | Wikipedia/Code/ArticleViewController+Watchlist.swift:62-73 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 7+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 7+ corresponding lines) Wikipedia/Code/DonateFunnel.swift:502 — Wikipedia/Code/DonateFunnel.swift:502-508 | Wikipedia/Code/DonateFunnel.swift:510-516 | Wikipedia/Code/DonateFunnel.swift:551-557 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 7+ corresponding lines) WMFData/Sources/WMFDataMocks/WMFMockURLSession.swift:46 — WMFData/Sources/WMFDataMocks/WMFMockURLSession.swift:46-52 | WMFData/Sources/WMFDataMocks/WMFMockURLSession.swift:60-66 | WMFData/Sources/WMFDataMocks/WMFMockURLSession.swift:87-93 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 4+ corresponding lines) · ×2
  • Edited copies of one member (6 members, 4+ corresponding lines) Wikipedia/Code/ActivityTabViewController.swift:639 — Wikipedia/Code/ActivityTabViewController.swift:639-647 | Wikipedia/Code/ArticleViewController.swift:993-998 | Wikipedia/Code/ExploreViewController.swift:259-262 | Wikipedia/Code/PlacesViewController.swift:468-471 | Wikipedia/Code/SearchViewController.swift:513-517 | Wikipedia/Code/SettingsTabViewController.swift:278-295 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
  • Edited copies of one member (6 members, 4+ corresponding lines) Wikipedia/Code/ArticleLocationCollectionViewController.swift:64 — Wikipedia/Code/ArticleLocationCollectionViewController.swift:64-68 | Wikipedia/Code/ArticleURLListViewController.swift:90-94 | Wikipedia/Code/DiffContainerViewController.swift:256-260 | Wikipedia/Code/NewsViewController.swift:46-49 | Wikipedia/Code/NotificationsCenterDetailViewController.swift:44-49 | Wikipedia/Code/OnThisDayViewController.swift:49-53 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 4+ corresponding lines) · ×2
  • Edited copies of one member (5 members, 4+ corresponding lines) WMFComponents/Sources/WMFComponents/Components/Watchlist/WMFWatchlistViewController.swift:193 — WMFComponents/Sources/WMFComponents/Components/Watchlist/WMFWatchlistViewController.swift:193-199 | Wikipedia/Code/DisambiguationPagesViewController.swift:39-42 | Wikipedia/Code/EditSaveViewController.swift:330-333 | Wikipedia/Code/NotificationsCenterViewController.swift:183-191 | Wikipedia/Code/TalkPageArchivesViewController.swift:77-82 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
  • Edited copies of one member (5 members, 4+ corresponding lines) Wikipedia/Code/ArticleFullWidthImageCollectionViewCell.swift:158 — Wikipedia/Code/ArticleFullWidthImageCollectionViewCell.swift:158-161 | Wikipedia/Code/ArticleLocationCollectionViewCell.swift:137-140 | Wikipedia/Code/ArticleRightAlignedImageCollectionViewCell.swift:105-108 | Wikipedia/Code/NewsCollectionViewCell.swift:35-38 | Wikipedia/Code/RankedArticleCollectionViewCell.swift:34-37 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (22–23 lines × 2) · ×2
  • Duplicated block (22–23 lines × 2) Wikipedia/Code/Controllers/ShortDescriptionController.swift:166 — Wikipedia/Code/Controllers/ShortDescriptionController.swift:166-188 | Wikipedia/Code/Controllers/ShortDescriptionController.swift:208-229 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/Controllers/ShortDescriptionController.swift:166` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (22–23 lines × 2) Wikipedia/Code/TalkPageCoffeeRollViewController.swift:64 — Wikipedia/Code/TalkPageCoffeeRollViewController.swift:64-85 | Wikipedia/Code/TalkPageViewController.swift:1370-1392 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/TalkPageCoffeeRollViewController.swift:64` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (21–22 lines × 2) · ×2
  • Duplicated block (21–22 lines × 2) WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewBiggestReadingDaySlideDataController.swift:81 — WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewBiggestReadingDaySlideDataController.swift:81-102 | WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewLongestReadSlideDataController.swift:92-112 — before extracting anything, compare `WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewBiggestReadingDaySlideDataController.swift` and `WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewLongestReadSlideDataController.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 55 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewBiggestReadingDaySlideDataController.swift:81` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (21–22 lines × 2) Wikipedia/Code/ReadingListsCollectionViewCell.swift:106 — Wikipedia/Code/ReadingListsCollectionViewCell.swift:106-126 | Wikipedia/Code/SavedArticlesCollectionViewCell.swift:181-202 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/ReadingListsCollectionViewCell.swift:106` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (22 lines × 2) · ×2
  • Duplicated block (22 lines × 2) Wikipedia/Code/EditSaveViewController.swift:263 — Wikipedia/Code/EditSaveViewController.swift:263-284 | Wikipedia/Code/EditSaveViewController.swift:297-318 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/EditSaveViewController.swift:263` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (22 lines × 2) WMFData/Sources/WMFDataMocks/WMFMockBasicService.swift:44 — WMFData/Sources/WMFDataMocks/WMFMockBasicService.swift:44-65 | WMFData/Sources/WMFDataMocks/WMFMockBasicService.swift:87-108 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×2
  • Duplicated block (20 lines × 2) WMF Framework/CacheController.swift:151 — WMF Framework/CacheController.swift:151-170 | WMF Framework/ImageCacheController.swift:14-33 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (20 lines × 2) Wikipedia/Code/DiffContainerViewController.swift:1344 — Wikipedia/Code/DiffContainerViewController.swift:1344-1363 | Wikipedia/Code/WatchlistController.swift:288-307 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/DiffContainerViewController.swift:1344` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (18–19 lines × 2) · ×2
  • Duplicated block (18–19 lines × 2) WMF Framework/Fetcher.swift:298 — WMF Framework/Fetcher.swift:298-316 | WMF Framework/Fetcher.swift:340-357 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `WMF Framework/Fetcher.swift:298` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18–19 lines × 2) WMFComponents/Sources/WMFComponents/Components/Suggested Edits/Image Recommendations/WMFImageRecommendationsViewController.swift:302 — WMFComponents/Sources/WMFComponents/Components/Suggested Edits/Image Recommendations/WMFImageRecommendationsViewController.swift:302-320 | WMFComponents/Sources/WMFComponents/Components/Suggested Edits/Image Recommendations/WMFImageRecommendationsViewController.swift:334-351 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `WMFComponents/Sources/WMFComponents/Components/Suggested Edits/Image Recommendations/WMFImageRecommendationsViewController.swift:302` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×2
  • Duplicated block (17 lines × 2) WMF Framework/PermanentlyPersistableURLCache.swift:721 — WMF Framework/PermanentlyPersistableURLCache.swift:721-737 | WMF Framework/PermanentlyPersistableURLCache.swift:742-758 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (17 lines × 2) Wikipedia/Code/NotificationsCenterCellViewModel+SheetActionExtensions.swift:134 — Wikipedia/Code/NotificationsCenterCellViewModel+SheetActionExtensions.swift:134-150 | Wikipedia/Code/NotificationsCenterCellViewModel+SheetActionExtensions.swift:242-258 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (13–14 lines × 2) · ×2
  • Duplicated block (13–14 lines × 2) Wikipedia/Code/AppOnboardingCoordinator.swift:244 — Wikipedia/Code/AppOnboardingCoordinator.swift:244-256 | Wikipedia/Code/AppOnboardingCoordinator.swift:260-273 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/AppOnboardingCoordinator.swift:260` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13–14 lines × 2) Wikipedia/Code/DiffController.swift:140 — Wikipedia/Code/DiffController.swift:140-153 | Wikipedia/Code/DiffController.swift:155-167 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (12–14 lines × 2) · ×2
  • Duplicated block (12–14 lines × 2) Wikipedia/Code/HelpViewController.swift:88 — Wikipedia/Code/HelpViewController.swift:88-99 | Wikipedia/Code/ReferenceBackLinksViewController.swift:47-60 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/ReferenceBackLinksViewController.swift:47` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12–14 lines × 2) Wikipedia/Code/SavedAllArticlesCoordinator.swift:176 — Wikipedia/Code/SavedAllArticlesCoordinator.swift:176-189 | Wikipedia/Code/WhichCameFirstCoordinator.swift:372-383 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/SavedAllArticlesCoordinator.swift:176` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×2
  • Duplicated block (21 lines × 2) Wikipedia/Code/WMFAccountCreationViewController.swift:158 — Wikipedia/Code/WMFAccountCreationViewController.swift:158-178 | Wikipedia/Code/WMFLoginViewController.swift:445-465 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (21 lines × 2) WMFData/Sources/WMFDataMocks/WMFMockWatchlistMediaWikiService.swift:176 — WMFData/Sources/WMFDataMocks/WMFMockWatchlistMediaWikiService.swift:176-196 | WMFData/Sources/WMFDataMocks/WMFMockWatchlistMediaWikiService.swift:198-218 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (9–13 lines × 2) · ×2
  • Duplicated block (9–13 lines × 2) WMF Framework/CacheController.swift:79 — WMF Framework/CacheController.swift:79-91 | WMF Framework/Event Platform/StorageManager.swift:33-41 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `WMF Framework/CacheController.swift:79` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9–13 lines × 2) Wikipedia/Code/DiscoverInstrumentation.swift:239 — Wikipedia/Code/DiscoverInstrumentation.swift:239-247 | Wikipedia/Code/SavedInstrumentation.swift:69-81 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/SavedInstrumentation.swift:69` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (11–12 lines × 2) · ×2
  • Duplicated block (11–12 lines × 2) WMF Framework/CacheController.swift:242 — WMF Framework/CacheController.swift:242-253 | WMF Framework/CacheController.swift:358-368 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `WMF Framework/CacheController.swift:242` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11–12 lines × 2) Wikipedia/Code/AppOnboardingCoordinator.swift:35 — Wikipedia/Code/AppOnboardingCoordinator.swift:35-46 | Wikipedia/Code/AppOnboardingCoordinator.swift:174-184 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/AppOnboardingCoordinator.swift:35` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (9 lines × 4) · ×2
  • Duplicated block (9 lines × 4) WMFData/Sources/WMFData/Data Controllers/Home/WMFHomeDataController.swift:680 — WMFData/Sources/WMFData/Data Controllers/Home/WMFHomeDataController.swift:680-688 | WMFData/Sources/WMFData/Data Controllers/Semantic Search/WMFSemanticSearchDataController+Results.swift:36-44 | WMFData/Sources/WMFData/Data Controllers/Shared/UserContributionsDataController.swift:23-31 | WMFData/Sources/WMFData/Data Controllers/Shared/WMFRandomDataController.swift:53-61 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `WMFData/Sources/WMFData/Data Controllers/Home/WMFHomeDataController.swift:680` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `WMFData/Sources/WMFData/Data Controllers/Shared/UserContributionsDataController.swift:21` calls `wikipedia` and `WMFData/Sources/WMFData/Data Controllers/Home/WMFHomeDataController.swift:678` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 4) Wikipedia/Code/WMFAuthAccountCreationInfoFetcher.swift:26 — Wikipedia/Code/WMFAuthAccountCreationInfoFetcher.swift:26-35 | Wikipedia/Code/WMFAuthLoginInfoFetcher.swift:26-35 | Wikipedia/Code/WMFCaptchaResetter.swift:23-31 | Wikipedia/Code/WMFCurrentUserFetcher.swift:72-81 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/WMFAuthAccountCreationInfoFetcher.swift:26` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7–8 lines × 2) · ×2
  • Duplicated block (7–8 lines × 2) WMFData/Sources/WMFData/Data Controllers/Shared/WMFArticleSearchDataController.swift:100 — WMFData/Sources/WMFData/Data Controllers/Shared/WMFArticleSearchDataController.swift:100-106 | WMFData/Sources/WMFData/Data Controllers/Shared/WMFArticleSearchDataController.swift:179-186 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `WMFData/Sources/WMFData/Data Controllers/Shared/WMFArticleSearchDataController.swift:100` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (7–8 lines × 2) Wikipedia/Code/ArticleViewController+DonationReminder.swift:253 — Wikipedia/Code/ArticleViewController+DonationReminder.swift:253-260 | Wikipedia/Code/DonationReminderSetupCoordinator.swift:138-144 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×2
  • Duplicated block (6 lines × 3) Wikipedia/Code/ColumnarCollectionViewController.swift:134 — Wikipedia/Code/ColumnarCollectionViewController.swift:134-139 | Wikipedia/Code/TalkPageTopicComposeViewController.swift:427-432 | Wikipedia/Code/TalkPageViewController.swift:308-313 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
  • Duplicated block (6 lines × 3) WMFData/Sources/WMFData/Data Controllers/Home/WMFPageInterestDataController.swift:9 — WMFData/Sources/WMFData/Data Controllers/Home/WMFPageInterestDataController.swift:9-14 | WMFData/Sources/WMFData/Data Controllers/Shared/WMFCategoriesDataController.swift:13-20 | WMFData/Sources/WMFData/Data Controllers/Shared/WMFPageTopicsDataController.swift:13-18 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
D5 · Coupling · Off the main sequence · ×2
  • Off the main sequence: WMFNativeLocalizations — WMFNativeLocalizations: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
  • Off the main sequence: WMFTestKitchen — WMFTestKitchen: abstractness 0.10, instability 0.00, distance 0.90 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
AC3 · Page structure · Page without a main landmark · ×1
  • Page without a main landmark Wikipedia/assets/about.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
AC3 · Page structure · Data table has no header cells · ×1
  • Data table has no header cells Wikipedia/assets/about.html:94 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
D1 · Cyclomatic Complexity · DonateCoordinator.presentActionSheet (cyclomatic 66) · ×1
  • DonateCoordinator.presentActionSheet (cyclomatic 66) Wikipedia/Code/DonateCoordinator.swift:219 — DonateCoordinator.presentActionSheet has cyclomatic complexity 66 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WMFFont.`for` (cyclomatic 65) · ×1
  • WMFFont.`for` (cyclomatic 65) WMFComponents/Sources/WMFComponents/Style/WMFFont.swift:61 — WMFFont.`for` has cyclomatic complexity 65 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · WMFAccountLoginLogoutFetcher.login (cyclomatic 56) · ×1
  • WMFAccountLoginLogoutFetcher.login (cyclomatic 56) Wikipedia/Code/WMFAccountLoginLogoutFetcher.swift:89 — WMFAccountLoginLogoutFetcher.login has cyclomatic complexity 56 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ReadingListsSyncOperation.processLocalUpdates (cyclomatic 55) · ×1
  • ReadingListsSyncOperation.processLocalUpdates (cyclomatic 55) WMF Framework/ReadingListsSyncOperation.swift:510 — ReadingListsSyncOperation.processLocalUpdates has cyclomatic complexity 55 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlacesViewController.regroupArticlesIfNecessary (cyclomatic 43) · ×1
  • PlacesViewController.regroupArticlesIfNecessary (cyclomatic 43) Wikipedia/Code/PlacesViewController.swift:1414 — PlacesViewController.regroupArticlesIfNecessary has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Router.destinationForWikiResourceURL (cyclomatic 42) · ×1
  • Router.destinationForWikiResourceURL (cyclomatic 42) WMF Framework/Router.swift:54 — Router.destinationForWikiResourceURL has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlacesViewController.adjustLayout (cyclomatic 42) · ×1
  • PlacesViewController.adjustLayout (cyclomatic 42) Wikipedia/Code/PlacesViewController.swift:1794 — PlacesViewController.adjustLayout has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Router.destinationForWResourceURL (cyclomatic 37) · ×1
  • Router.destinationForWResourceURL (cyclomatic 37) WMF Framework/Router.swift:163 — Router.destinationForWResourceURL has cyclomatic complexity 37 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · WMFYearInReviewDataController.fullSlideCount (cyclomatic 35) · ×1
  • WMFYearInReviewDataController.fullSlideCount (cyclomatic 35) WMFData/Sources/WMFData/Data Controllers/Year In Review/WMFYearInReviewDataController.swift:243 — WMFYearInReviewDataController.fullSlideCount has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HtmlUtils.addStyling (cyclomatic 34) · ×1
  • HtmlUtils.addStyling (cyclomatic 34) WMFComponents/Sources/WMFComponents/Utility/HTMLUtils.swift:320 — HtmlUtils.addStyling has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WMFWatchlistFilterViewModel.generateDataForNewFilterSettings (cyclomatic 34) · ×1
  • WMFWatchlistFilterViewModel.generateDataForNewFilterSettings (cyclomatic 34) WMFComponents/Sources/WMFComponents/Components/Watchlist/Filter/WMFWatchlistFilterViewModel.swift:140 — WMFWatchlistFilterViewModel.generateDataForNewFilterSettings has cyclomatic complexity 34 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · WMFDatabaseHousekeeper.deleteStaleUnreferencedArticles (cyclomatic 33) · ×1
  • WMFDatabaseHousekeeper.deleteStaleUnreferencedArticles (cyclomatic 33) Wikipedia/Code/WMFDatabaseHousekeeper.swift:35 — WMFDatabaseHousekeeper.deleteStaleUnreferencedArticles has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ArticleCacheDBWriter.syncResources (cyclomatic 32) · ×1
  • ArticleCacheDBWriter.syncResources (cyclomatic 32) WMF Framework/ArticleCacheDBWriter+SyncResources.swift:35 — ArticleCacheDBWriter.syncResources has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ReadingListsSyncOperation.locallyCreate (cyclomatic 30) · ×1
  • ReadingListsSyncOperation.locallyCreate (cyclomatic 30) WMF Framework/ReadingListsSyncOperation.swift:824 — ReadingListsSyncOperation.locallyCreate has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DetailTransition.animateTransition (cyclomatic 30) · ×1
  • DetailTransition.animateTransition (cyclomatic 30) Wikipedia/Code/DetailTransition.swift:36 — DetailTransition.animateTransition has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · NotificationsCenterDetailViewModel.primaryAction (cyclomatic 30) · ×1
  • NotificationsCenterDetailViewModel.primaryAction (cyclomatic 30) Wikipedia/Code/NotificationsCenterDetailViewModel+ActionExtensions.swift:4 — NotificationsCenterDetailViewModel.primaryAction has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CollectionViewUpdater.controllerDidChangeContent (cyclomatic 29) · ×1
  • CollectionViewUpdater.controllerDidChangeContent (cyclomatic 29) Wikipedia/Code/CollectionViewUpdater.swift:69 — CollectionViewUpdater.controllerDidChangeContent has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WMFNavigationBarConfiguring.configureNavigationBar (cyclomatic 28) · ×1
  • WMFNavigationBarConfiguring.configureNavigationBar (cyclomatic 28) WMFComponents/Sources/WMFComponents/Extensions/Navigation Bar/WMFNavigationBarConfiguring.swift:122 — WMFNavigationBarConfiguring.configureNavigationBar has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ReadingListsSyncOperation.executeSync (cyclomatic 28) · ×1
  • ReadingListsSyncOperation.executeSync (cyclomatic 28) WMF Framework/ReadingListsSyncOperation.swift:72 — ReadingListsSyncOperation.executeSync has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AppOnboardingCoordinator.start (cyclomatic 28) · ×1
  • AppOnboardingCoordinator.start (cyclomatic 28) Wikipedia/Code/AppOnboardingCoordinator.swift:33 — AppOnboardingCoordinator.start has cyclomatic complexity 28 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · WMFAppViewController.logWatchlistUserDidSaveFilterSettings (cyclomatic 28) · ×1
  • WMFAppViewController.logWatchlistUserDidSaveFilterSettings (cyclomatic 28) Wikipedia/Code/WMFAppViewController+Extensions.swift:482 — WMFAppViewController.logWatchlistUserDidSaveFilterSettings has cyclomatic complexity 28 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · DescriptionEditViewController.save (cyclomatic 27) · ×1
  • DescriptionEditViewController.save (cyclomatic 27) Wikipedia/Code/DescriptionEditViewController.swift:342 — DescriptionEditViewController.save has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DiffTransformer.populateAdditionalSectionAndMoveInfo (cyclomatic 27) · ×1
  • DiffTransformer.populateAdditionalSectionAndMoveInfo (cyclomatic 27) Wikipedia/Code/DiffTransformer.swift:99 — DiffTransformer.populateAdditionalSectionAndMoveInfo has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WMFAppViewController.processUserActivity (cyclomatic 27) · ×1
  • WMFAppViewController.processUserActivity (cyclomatic 27) Wikipedia/Code/WMFAppViewController.swift:1335 — WMFAppViewController.processUserActivity has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HomeCoordinator.makeHomeViewController (cyclomatic 26) · ×1
  • HomeCoordinator.makeHomeViewController (cyclomatic 26) Wikipedia/Code/HomeCoordinator.swift:53 — HomeCoordinator.makeHomeViewController has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ViewControllerRouter.route (cyclomatic 26) · ×1
  • ViewControllerRouter.route (cyclomatic 26) Wikipedia/Code/ViewControllerRouter.swift:110 — ViewControllerRouter.route has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WMFUserImpactDataController.fetch (cyclomatic 24) · ×1
  • WMFUserImpactDataController.fetch (cyclomatic 24) WMFData/Sources/WMFData/Data Controllers/Shared/WMFUserImpactDataController.swift:26 — WMFUserImpactDataController.fetch has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NotificationsCenterCommonViewModel.verboseTitle (cyclomatic 24) · ×1
  • NotificationsCenterCommonViewModel.verboseTitle (cyclomatic 24) Wikipedia/Code/NotificationsCenterCommonViewModel+TextExtensions.swift:10 — NotificationsCenterCommonViewModel.verboseTitle has cyclomatic complexity 24 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · SavedArticlesFetcher.handleFailure (cyclomatic 24) · ×1
  • SavedArticlesFetcher.handleFailure (cyclomatic 24) Wikipedia/Code/SavedArticlesFetcher.swift:372 — SavedArticlesFetcher.handleFailure has cyclomatic complexity 24 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · String.pluralDictionary (cyclomatic 24) · ×1
  • String.pluralDictionary (cyclomatic 24) Command Line Tools/Update Localizations/localization.swift:83 — String.pluralDictionary has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PermanentlyPersistableURLCache.updateCacheWithCachedResponse (cyclomatic 23) · ×1
  • PermanentlyPersistableURLCache.updateCacheWithCachedResponse (cyclomatic 23) WMF Framework/PermanentlyPersistableURLCache.swift:423 — PermanentlyPersistableURLCache.updateCacheWithCachedResponse has cyclomatic complexity 23 (threshold 15). Of this number, 20 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · ReadingListsSyncOperation.createOrUpdate (cyclomatic 23) · ×1
  • ReadingListsSyncOperation.createOrUpdate (cyclomatic 23) WMF Framework/ReadingListsSyncOperation.swift:969 — ReadingListsSyncOperation.createOrUpdate has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ArticlePeekPreviewViewController.contextMenuItems (cyclomatic 23) · ×1
  • ArticlePeekPreviewViewController.contextMenuItems (cyclomatic 23) Wikipedia/Code/ArticlePeekPreviewViewController.swift:115 — ArticlePeekPreviewViewController.contextMenuItems has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SavedArticlesCollectionViewCell.sizeThatFits (cyclomatic 23) · ×1
  • SavedArticlesCollectionViewCell.sizeThatFits (cyclomatic 23) Wikipedia/Code/SavedArticlesCollectionViewCell.swift:134 — SavedArticlesCollectionViewCell.sizeThatFits has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WMFEditorInputView.didSelectIndex (cyclomatic 22) · ×1
  • WMFEditorInputView.didSelectIndex (cyclomatic 22) WMFComponents/Sources/WMFComponents/Components/Editors/Common Views/Input Views/WMFEditorInputView.swift:419 — WMFEditorInputView.didSelectIndex has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · WMFArticleTabsDataController.getAdjacentArticleInTab (cyclomatic 22) · ×1
  • WMFArticleTabsDataController.getAdjacentArticleInTab (cyclomatic 22) WMFData/Sources/WMFData/Data Controllers/Article Tabs/WMFArticleTabsDataController.swift:382 — WMFArticleTabsDataController.getAdjacentArticleInTab has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WMFArticleSavedStateMigrationManager.migrateSyncedArticles (cyclomatic 22) · ×1
  • WMFArticleSavedStateMigrationManager.migrateSyncedArticles (cyclomatic 22) WMF Framework/WMFArticle+Migration.swift:172 — WMFArticleSavedStateMigrationManager.migrateSyncedArticles has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WikipediaLanguageCommandLineUtility.getSiteInfoLookup (cyclomatic 22) · ×1
  • WikipediaLanguageCommandLineUtility.getSiteInfoLookup (cyclomatic 22) Command Line Tools/Update Languages/WikipediaLanguageCommandLineUtility.swift:72 — WikipediaLanguageCommandLineUtility.getSiteInfoLookup has cyclomatic complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · DiffContainerViewController.setupDiffListViewControllerIfNeeded (cyclomatic 22) · ×1
  • DiffContainerViewController.setupDiffListViewControllerIfNeeded (cyclomatic 22) Wikipedia/Code/DiffContainerViewController.swift:859 — DiffContainerViewController.setupDiffListViewControllerIfNeeded has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · EditorViewController.loadContent (cyclomatic 22) · ×1
  • EditorViewController.loadContent (cyclomatic 22) Wikipedia/Code/EditorViewController.swift:192 — EditorViewController.loadContent has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · NotificationsCenterViewController.userDidPanCell (cyclomatic 22) · ×1
  • NotificationsCenterViewController.userDidPanCell (cyclomatic 22) Wikipedia/Code/NotificationsCenterViewController.swift:778 — NotificationsCenterViewController.userDidPanCell has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlacesViewController.performSearch (cyclomatic 22) · ×1
  • PlacesViewController.performSearch (cyclomatic 22) Wikipedia/Code/PlacesViewController.swift:673 — PlacesViewController.performSearch has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Session.request (cyclomatic 22) · ×1
  • Session.request (cyclomatic 22) Wikipedia/Code/Session.swift:254 — Session.request has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TalkPageViewController.tappedPublish (cyclomatic 22) · ×1
  • TalkPageViewController.tappedPublish (cyclomatic 22) Wikipedia/Code/TalkPageViewController.swift:1136 — TalkPageViewController.tappedPublish has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HtmlUtils.addStyling (cyclomatic 21) · ×1
  • HtmlUtils.addStyling (cyclomatic 21) WMFComponents/Sources/WMFComponents/Utility/HTMLUtils.swift:168 — HtmlUtils.addStyling has cyclomatic complexity 21 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · HtmlUtils.listInsertData (cyclomatic 21) · ×1
  • HtmlUtils.listInsertData (cyclomatic 21) WMFComponents/Sources/WMFComponents/Utility/HTMLUtils.swift:518 — HtmlUtils.listInsertData has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · EditSaveViewController.handleEditFailure (cyclomatic 21) · ×1
  • EditSaveViewController.handleEditFailure (cyclomatic 21) Wikipedia/Code/EditSaveViewController.swift:574 — EditSaveViewController.handleEditFailure has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SavedArticlesFetcher._update (cyclomatic 21) · ×1
  • SavedArticlesFetcher._update (cyclomatic 21) Wikipedia/Code/SavedArticlesFetcher.swift:221 — SavedArticlesFetcher._update has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · TalkPageViewController.tappedPublish (cyclomatic 21) · ×1
  • TalkPageViewController.tappedPublish (cyclomatic 21) Wikipedia/Code/TalkPageViewController.swift:1231 — TalkPageViewController.tappedPublish has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WMFDailyGameExploreCell.sizeThatFits (cyclomatic 21) · ×1
  • WMFDailyGameExploreCell.sizeThatFits (cyclomatic 21) Wikipedia/Code/WMFDailyGameExploreCell.swift:226 — WMFDailyGameExploreCell.sizeThatFits has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WMFWatchlistDataController.apply (cyclomatic 20) · ×1
  • WMFWatchlistDataController.apply (cyclomatic 20) WMFData/Sources/WMFData/Data Controllers/Watchlist/WMFWatchlistDataController.swift:254 — WMFWatchlistDataController.apply has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ExploreCardCollectionViewCell.sizeThatFits (cyclomatic 20) · ×1
  • ExploreCardCollectionViewCell.sizeThatFits (cyclomatic 20) WMF Framework/ExploreCardCollectionViewCell.swift:204 — ExploreCardCollectionViewCell.sizeThatFits has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PageNamespace.isTalkBased (cyclomatic 20) · ×1
  • PageNamespace.isTalkBased (cyclomatic 20) WMF Framework/PageNamespace.swift:91 — PageNamespace.isTalkBased has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: PageNamespace.canonicalName (cyclomatic 30) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · DiffListChangeItemViewModel.calculateAttributedString (cyclomatic 20) · ×1
  • DiffListChangeItemViewModel.calculateAttributedString (cyclomatic 20) Wikipedia/Code/DiffListChangeItemViewModel.swift:302 — DiffListChangeItemViewModel.calculateAttributedString has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WMFAuthenticationManager.loginWithSavedCredentials (cyclomatic 20) · ×1
  • WMFAuthenticationManager.loginWithSavedCredentials (cyclomatic 20) Wikipedia/Code/WMFAuthenticationManager.swift:370 — WMFAuthenticationManager.loginWithSavedCredentials has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SchemeHandler.kickOffDataTask (cyclomatic 20) · ×1
  • SchemeHandler.kickOffDataTask (cyclomatic 20) Wikipedia/Code/SchemeHandler/SchemeHandler.swift:163 — SchemeHandler.kickOffDataTask has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · UIView.wmf_preferredFrame (cyclomatic 20) · ×1
  • UIView.wmf_preferredFrame (cyclomatic 20) WMF Framework/UIView+SemanticContent.swift:20 — UIView.wmf_preferredFrame has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · WMFActivityTabView.loggedInList (cyclomatic 19) · ×1
  • WMFActivityTabView.loggedInList (cyclomatic 19) WMFComponents/Sources/WMFComponents/Components/Activity Tab/WMFActivityTabView.swift:80 — WMFActivityTabView.loggedInList has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TimelineViewModel.fetch (cyclomatic 19) · ×1
  • TimelineViewModel.fetch (cyclomatic 19) WMFComponents/Sources/WMFComponents/Components/Activity Tab/View Models/TimelineViewModel.swift:40 — TimelineViewModel.fetch has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WMFAppViewControllerTipWrapper.listenForTooltips (cyclomatic 19) · ×1
  • WMFAppViewControllerTipWrapper.listenForTooltips (cyclomatic 19) Wikipedia/Code/AppViewControllerTipWrapper.swift:28 — WMFAppViewControllerTipWrapper.listenForTooltips has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PageHistoryFetcher.fetchEditCounts (cyclomatic 19) · ×1
  • PageHistoryFetcher.fetchEditCounts (cyclomatic 19) Wikipedia/Code/PageHistoryFetcher.swift:91 — PageHistoryFetcher.fetchEditCounts has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlacesViewController.updatePlaces (cyclomatic 19) · ×1
  • PlacesViewController.updatePlaces (cyclomatic 19) Wikipedia/Code/PlacesViewController.swift:834 — PlacesViewController.updatePlaces has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WMFHCaptchaViewController.setupHCaptcha (cyclomatic 19) · ×1
  • WMFHCaptchaViewController.setupHCaptcha (cyclomatic 19) Wikipedia/Code/WMFHCaptchaViewController.swift:98 — WMFHCaptchaViewController.setupHCaptcha has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WMFArticleTabsDataController.fetchAllArticleTabs (cyclomatic 18) · ×1
  • WMFArticleTabsDataController.fetchAllArticleTabs (cyclomatic 18) WMFData/Sources/WMFData/Data Controllers/Article Tabs/WMFArticleTabsDataController.swift:724 — WMFArticleTabsDataController.fetchAllArticleTabs has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WMFExperimentsDataController.determineBucketForExperiment (cyclomatic 18) · ×1
  • WMFExperimentsDataController.determineBucketForExperiment (cyclomatic 18) WMFData/Sources/WMFData/Data Controllers/Experiments/WMFExperimentsDataController.swift:126 — WMFExperimentsDataController.determineBucketForExperiment has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WMFYearInReviewDataController.populateYearInReviewReportData (cyclomatic 18) · ×1
  • WMFYearInReviewDataController.populateYearInReviewReportData (cyclomatic 18) WMFData/Sources/WMFData/Data Controllers/Year In Review/WMFYearInReviewDataController.swift:633 — WMFYearInReviewDataController.populateYearInReviewReportData has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ArticleCacheController.syncCachedResources (cyclomatic 18) · ×1
  • ArticleCacheController.syncCachedResources (cyclomatic 18) WMF Framework/ArticleCacheController.swift:20 — ArticleCacheController.syncCachedResources has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · MediaWikiFetcher.perform (cyclomatic 18) · ×1
  • MediaWikiFetcher.perform (cyclomatic 18) WMF Framework/MediaWikiFetcher.swift:53 — MediaWikiFetcher.perform has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ArticleTabCoordinating.trackArticleTab (cyclomatic 18) · ×1
  • ArticleTabCoordinating.trackArticleTab (cyclomatic 18) Wikipedia/Code/ArticleCoordinator.swift:32 — ArticleTabCoordinating.trackArticleTab has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ArticleRightAlignedImageCollectionViewCell.sizeThatFits (cyclomatic 18) · ×1
  • ArticleRightAlignedImageCollectionViewCell.sizeThatFits (cyclomatic 18) Wikipedia/Code/ArticleRightAlignedImageCollectionViewCell.swift:41 — ArticleRightAlignedImageCollectionViewCell.sizeThatFits has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PageHistoryCollectionViewCell.sizeThatFits (cyclomatic 18) · ×1
  • PageHistoryCollectionViewCell.sizeThatFits (cyclomatic 18) Wikipedia/Code/PageHistoryCollectionViewCell.swift:173 — PageHistoryCollectionViewCell.sizeThatFits has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SinglePageWebViewController.handleNavigation (cyclomatic 18) · ×1
  • SinglePageWebViewController.handleNavigation (cyclomatic 18) Wikipedia/Code/SinglePageWebViewController.swift:389 — SinglePageWebViewController.handleNavigation has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · localization.swift.importLocalizationsFromTWN (cyclomatic 18) · ×1
  • localization.swift.importLocalizationsFromTWN (cyclomatic 18) Command Line Tools/Update Localizations/localization.swift:433 — localization.swift.importLocalizationsFromTWN has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WMFCommunityFeedView.feedList (cyclomatic 17) · ×1
  • WMFCommunityFeedView.feedList (cyclomatic 17) WMFComponents/Sources/WMFComponents/Components/Home/WMFCommunityFeedView.swift:39 — WMFCommunityFeedView.feedList has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · WMFSourceEditorFormatterList.toggleListItem (cyclomatic 17) · ×1
  • WMFSourceEditorFormatterList.toggleListItem (cyclomatic 17) WMFComponents/Sources/WMFComponents/Components/Editors/Source Editor/Formatter Extensions/WKSourceEditorFormatterList+ButtonActions.swift:66 — WMFSourceEditorFormatterList.toggleListItem has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WMFBasicService.performPOST (cyclomatic 17) · ×1
  • WMFBasicService.performPOST (cyclomatic 17) WMFData/Sources/WMFData/Service/WMFBasicService.swift:59 — WMFBasicService.performPOST has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WMFDonateDataController.submitPayment (cyclomatic 17) · ×1
  • WMFDonateDataController.submitPayment (cyclomatic 17) WMFData/Sources/WMFData/Data Controllers/Donor Experience/WMFDonateDataController.swift:204 — WMFDonateDataController.submitPayment has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · WMFArticleDataController.fetchArticleInfo (cyclomatic 17) · ×1
  • WMFArticleDataController.fetchArticleInfo (cyclomatic 17) WMFData/Sources/WMFData/Data Controllers/Shared/WMFArticleDataController.swift:102 — WMFArticleDataController.fetchArticleInfo has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ReadingListsSyncOperation.createOrUpdate (cyclomatic 17) · ×1
  • ReadingListsSyncOperation.createOrUpdate (cyclomatic 17) WMF Framework/ReadingListsSyncOperation.swift:1065 — ReadingListsSyncOperation.createOrUpdate has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WikipediaLanguageCommandLineUtilityAPI.getSites (cyclomatic 17) · ×1
  • WikipediaLanguageCommandLineUtilityAPI.getSites (cyclomatic 17) Command Line Tools/Update Languages/WikipediaLanguageCommandLineUtilityAPI.swift:22 — WikipediaLanguageCommandLineUtilityAPI.getSites has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RemoteNotificationsController.predicateForFilterSavedState (cyclomatic 17) · ×1
  • RemoteNotificationsController.predicateForFilterSavedState (cyclomatic 17) WMF Framework/Remote Notifications/RemoteNotificationsController.swift:404 — RemoteNotificationsController.predicateForFilterSavedState has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · DonateCoordinator.nativeDonateFormViewModel (cyclomatic 17) · ×1
  • DonateCoordinator.nativeDonateFormViewModel (cyclomatic 17) Wikipedia/Code/DonateCoordinator.swift:454 — DonateCoordinator.nativeDonateFormViewModel has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · DonateCoordinator.logNativeFormDidTriggerPaymentSuccess (cyclomatic 17) · ×1
  • DonateCoordinator.logNativeFormDidTriggerPaymentSuccess (cyclomatic 17) Wikipedia/Code/DonateCoordinator.swift:865 — DonateCoordinator.logNativeFormDidTriggerPaymentSuccess has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ExploreViewController.collectionView (cyclomatic 17) · ×1
  • ExploreViewController.collectionView (cyclomatic 17) Wikipedia/Code/ExploreViewController.swift:612 — ExploreViewController.collectionView has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PageHistoryViewController.configure (cyclomatic 17) · ×1
  • PageHistoryViewController.configure (cyclomatic 17) Wikipedia/Code/PageHistoryViewController.swift:460 — PageHistoryViewController.configure has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlacesViewController.merge (cyclomatic 17) · ×1
  • PlacesViewController.merge (cyclomatic 17) Wikipedia/Code/PlacesViewController.swift:1367 — PlacesViewController.merge has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WMFAppViewController.logTabBarSelectionsForActivityTab (cyclomatic 17) · ×1
  • WMFAppViewController.logTabBarSelectionsForActivityTab (cyclomatic 17) Wikipedia/Code/WMFAppViewController+Extensions.swift:1260 — WMFAppViewController.logTabBarSelectionsForActivityTab has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · WikimediaProject.init (cyclomatic 17) · ×1
  • WikimediaProject.init (cyclomatic 17) Wikipedia/Code/WikimediaProject.swift:92 — WikimediaProject.init has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · WMFSourceEditorFormatterHeading.toggleHeadingFormatting (cyclomatic 16) · ×1
  • WMFSourceEditorFormatterHeading.toggleHeadingFormatting (cyclomatic 16) WMFComponents/Sources/WMFComponents/Components/Editors/Source Editor/Formatter Extensions/WKSourceEditorFormatterHeading+ButtonActions.swift:3 — WMFSourceEditorFormatterHeading.toggleHeadingFormatting has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · WMFWikitextUtils.insertImageWikitextIntoArticleWikitextAfterTemplates (cyclomatic 16) · ×1
  • WMFWikitextUtils.insertImageWikitextIntoArticleWikitextAfterTemplates (cyclomatic 16) WMFData/Sources/WMFData/Utility/WMFWikitextUtils.swift:146 — WMFWikitextUtils.insertImageWikitextIntoArticleWikitextAfterTemplates has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WMFWatchlistDataController.fetchWatchlist (cyclomatic 16) · ×1
  • WMFWatchlistDataController.fetchWatchlist (cyclomatic 16) WMFData/Sources/WMFData/Data Controllers/Watchlist/WMFWatchlistDataController.swift:103 — WMFWatchlistDataController.fetchWatchlist has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CacheController.remove (cyclomatic 16) · ×1
  • CacheController.remove (cyclomatic 16) WMF Framework/CacheController.swift:290 — CacheController.remove has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CollectionViewEditController.handlePanGesture (cyclomatic 16) · ×1
  • CollectionViewEditController.handlePanGesture (cyclomatic 16) WMF Framework/CollectionViewEditController.swift:256 — CollectionViewEditController.handlePanGesture has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ColumnarCollectionViewLayout.prepare (cyclomatic 16) · ×1
  • ColumnarCollectionViewLayout.prepare (cyclomatic 16) WMF Framework/ColumnarCollectionViewLayout.swift:190 — ColumnarCollectionViewLayout.prepare has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WMFArticleSavedStateMigrationManager.runMigration (cyclomatic 16) · ×1
  • WMFArticleSavedStateMigrationManager.runMigration (cyclomatic 16) WMF Framework/WMFArticle+Migration.swift:88 — WMFArticleSavedStateMigrationManager.runMigration has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WidgetController.fetchTopReadContent (cyclomatic 16) · ×1
  • WidgetController.fetchTopReadContent (cyclomatic 16) WMF Framework/Widget/WidgetController.swift:370 — WidgetController.fetchTopReadContent has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DiffContainerViewController.populatePrevNextModelsForToolbar (cyclomatic 16) · ×1
  • DiffContainerViewController.populatePrevNextModelsForToolbar (cyclomatic 16) Wikipedia/Code/DiffContainerViewController.swift:439 — DiffContainerViewController.populatePrevNextModelsForToolbar has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · DiffContainerViewController.completeRollbackOrUndo (cyclomatic 16) · ×1
  • DiffContainerViewController.completeRollbackOrUndo (cyclomatic 16) Wikipedia/Code/DiffContainerViewController.swift:1289 — DiffContainerViewController.completeRollbackOrUndo has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DonateCoordinator.logWebViewFormThankYouDidDisappear (cyclomatic 16) · ×1
  • DonateCoordinator.logWebViewFormThankYouDidDisappear (cyclomatic 16) Wikipedia/Code/DonateCoordinator.swift:983 — DonateCoordinator.logWebViewFormThankYouDidDisappear has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · NotificationsCenterViewController.userDidTapMoreActionForCell (cyclomatic 16) · ×1
  • NotificationsCenterViewController.userDidTapMoreActionForCell (cyclomatic 16) Wikipedia/Code/NotificationsCenterViewController.swift:870 — NotificationsCenterViewController.userDidTapMoreActionForCell has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PageHistoryViewController.getEditCounts (cyclomatic 16) · ×1
  • PageHistoryViewController.getEditCounts (cyclomatic 16) Wikipedia/Code/PageHistoryViewController.swift:191 — PageHistoryViewController.getEditCounts has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ThanksGiving.tappedThank (cyclomatic 16) · ×1
  • ThanksGiving.tappedThank (cyclomatic 16) Wikipedia/Code/ThanksGiving.swift:35 — ThanksGiving.tappedThank has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · WatchlistController.presentChooseExpiryActionSheet (cyclomatic 16) · ×1
  • WatchlistController.presentChooseExpiryActionSheet (cyclomatic 16) Wikipedia/Code/WatchlistController.swift:127 — WatchlistController.presentChooseExpiryActionSheet has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · WikitextFetcher.fetchSection (cyclomatic 16) · ×1
  • WikitextFetcher.fetchSection (cyclomatic 16) Wikipedia/Code/WikitextFetcher.swift:74 — WikitextFetcher.fetchSection has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · WMFContentGroup.detailViewControllerWithDataStore (cyclomatic 16) · ×1
  • WMFContentGroup.detailViewControllerWithDataStore (cyclomatic 16) Wikipedia/Code/WMFContentGroup+DetailViewControllers.swift:34 — WMFContentGroup.detailViewControllerWithDataStore has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D2 · Cognitive Complexity · ReadingListsSyncOperation.processLocalUpdates (cognitive 133) · ×1
  • ReadingListsSyncOperation.processLocalUpdates (cognitive 133) WMF Framework/ReadingListsSyncOperation.swift:510 — ReadingListsSyncOperation.processLocalUpdates has cognitive complexity 133 (threshold 15). Drivers by points: if/else 35 (93 pts), loops 17 (35 pts), boolean chains 5 (nesting depth added 76). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · WMFAccountLoginLogoutFetcher.login (cognitive 89) · ×1
  • WMFAccountLoginLogoutFetcher.login (cognitive 89) Wikipedia/Code/WMFAccountLoginLogoutFetcher.swift:89 — WMFAccountLoginLogoutFetcher.login has cognitive complexity 89 (threshold 15). Drivers by points: if/else 29 (60 pts), boolean chains 23, match/switch 2 (6 pts) (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlacesViewController.regroupArticlesIfNecessary (cognitive 88) · ×1
  • PlacesViewController.regroupArticlesIfNecessary (cognitive 88) Wikipedia/Code/PlacesViewController.swift:1414 — PlacesViewController.regroupArticlesIfNecessary has cognitive complexity 88 (threshold 15). Drivers by points: if/else 29 (66 pts), loops 9 (15 pts), boolean chains 5, ternaries 2 (nesting depth added 43). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiffTransformer.populateAdditionalSectionAndMoveInfo (cognitive 67) · ×1
  • DiffTransformer.populateAdditionalSectionAndMoveInfo (cognitive 67) Wikipedia/Code/DiffTransformer.swift:99 — DiffTransformer.populateAdditionalSectionAndMoveInfo has cognitive complexity 67 (threshold 15). Drivers by points: if/else 11 (29 pts), ternaries 6 (24 pts), boolean chains 7, match/switch 1 (5 pts), loops 2 (nesting depth added 40). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · HtmlUtils.addStyling (cognitive 64) · ×1
  • HtmlUtils.addStyling (cognitive 64) WMFComponents/Sources/WMFComponents/Utility/HTMLUtils.swift:320 — HtmlUtils.addStyling has cognitive complexity 64 (threshold 15). Drivers by points: if/else 17 (43 pts), loops 14 (19 pts), boolean chains 2 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DonateCoordinator.presentActionSheet (cognitive 61) · ×1
  • DonateCoordinator.presentActionSheet (cognitive 61) Wikipedia/Code/DonateCoordinator.swift:219 — DonateCoordinator.presentActionSheet has cognitive complexity 61 (threshold 15). Drivers by points: if/else 32 (52 pts), match/switch 7, boolean chains 1, ternaries 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Router.destinationForWikiResourceURL (cognitive 59) · ×1
  • Router.destinationForWikiResourceURL (cognitive 59) WMF Framework/Router.swift:54 — Router.destinationForWikiResourceURL has cognitive complexity 59 (threshold 15). Drivers by points: if/else 20 (36 pts), boolean chains 18, ternaries 2 (4 pts), match/switch 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WMFDatabaseHousekeeper.deleteStaleUnreferencedArticles (cognitive 59) · ×1
  • WMFDatabaseHousekeeper.deleteStaleUnreferencedArticles (cognitive 59) Wikipedia/Code/WMFDatabaseHousekeeper.swift:35 — WMFDatabaseHousekeeper.deleteStaleUnreferencedArticles has cognitive complexity 59 (threshold 15). Drivers by points: if/else 18 (41 pts), loops 4 (8 pts), boolean chains 5, match/switch 1 (3 pts), ternaries 2 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TimelineViewModel.fetch (cognitive 57) · ×1
  • TimelineViewModel.fetch (cognitive 57) WMFComponents/Sources/WMFComponents/Components/Activity Tab/View Models/TimelineViewModel.swift:40 — TimelineViewModel.fetch has cognitive complexity 57 (threshold 15). Drivers by points: if/else 14 (41 pts), loops 2 (9 pts), boolean chains 6, error handling 1 (nesting depth added 34). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · PlacesViewController.adjustLayout (cognitive 57) · ×1
  • PlacesViewController.adjustLayout (cognitive 57) Wikipedia/Code/PlacesViewController.swift:1794 — PlacesViewController.adjustLayout has cognitive complexity 57 (threshold 15). Drivers by points: if/else 24 (32 pts), boolean chains 16, ternaries 4 (8 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WMFUserImpactDataController.fetch (cognitive 56) · ×1
  • WMFUserImpactDataController.fetch (cognitive 56) WMFData/Sources/WMFData/Data Controllers/Shared/WMFUserImpactDataController.swift:26 — WMFUserImpactDataController.fetch has cognitive complexity 56 (threshold 15). Drivers by points: if/else 15 (40 pts), loops 4 (13 pts), boolean chains 2, match/switch 1 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ArticleCacheDBWriter.syncResources (cognitive 56) · ×1
  • ArticleCacheDBWriter.syncResources (cognitive 56) WMF Framework/ArticleCacheDBWriter+SyncResources.swift:35 — ArticleCacheDBWriter.syncResources has cognitive complexity 56 (threshold 15). Drivers by points: if/else 19 (40 pts), boolean chains 6, loops 3 (6 pts), match/switch 2 (3 pts), error handling 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WMFDailyGameExploreCell.sizeThatFits (cognitive 55) · ×1
  • WMFDailyGameExploreCell.sizeThatFits (cognitive 55) Wikipedia/Code/WMFDailyGameExploreCell.swift:226 — WMFDailyGameExploreCell.sizeThatFits has cognitive complexity 55 (threshold 15). Drivers by points: if/else 28 (52 pts), ternaries 1 (3 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ReadingListsSyncOperation.locallyCreate (cognitive 54) · ×1
  • ReadingListsSyncOperation.locallyCreate (cognitive 54) WMF Framework/ReadingListsSyncOperation.swift:824 — ReadingListsSyncOperation.locallyCreate has cognitive complexity 54 (threshold 15). Drivers by points: if/else 22 (43 pts), loops 5 (7 pts), boolean chains 4 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WMFArticleSavedStateMigrationManager.migrateSyncedArticles (cognitive 51) · ×1
  • WMFArticleSavedStateMigrationManager.migrateSyncedArticles (cognitive 51) WMF Framework/WMFArticle+Migration.swift:172 — WMFArticleSavedStateMigrationManager.migrateSyncedArticles has cognitive complexity 51 (threshold 15). Drivers by points: if/else 14 (37 pts), loops 3 (8 pts), error handling 3 (5 pts), boolean chains 1 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · String.pluralDictionary (cognitive 50) · ×1
  • String.pluralDictionary (cognitive 50) Command Line Tools/Update Localizations/localization.swift:83 — String.pluralDictionary has cognitive complexity 50 (threshold 15). Drivers by points: if/else 16 (36 pts), loops 3 (6 pts), boolean chains 5, ternaries 1 (3 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiffContainerViewController.setupDiffListViewControllerIfNeeded (cognitive 47) · ×1
  • DiffContainerViewController.setupDiffListViewControllerIfNeeded (cognitive 47) Wikipedia/Code/DiffContainerViewController.swift:859 — DiffContainerViewController.setupDiffListViewControllerIfNeeded has cognitive complexity 47 (threshold 15). Drivers by points: if/else 18 (40 pts), match/switch 2 (4 pts), boolean chains 3 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · localization.swift.importLocalizationsFromTWN (cognitive 45) · ×1
  • localization.swift.importLocalizationsFromTWN (cognitive 45) Command Line Tools/Update Localizations/localization.swift:433 — localization.swift.importLocalizationsFromTWN has cognitive complexity 45 (threshold 15). Drivers by points: if/else 13 (33 pts), loops 4 (8 pts), boolean chains 3, error handling 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CollectionViewUpdater.controllerDidChangeContent (cognitive 44) · ×1
  • CollectionViewUpdater.controllerDidChangeContent (cognitive 44) Wikipedia/Code/CollectionViewUpdater.swift:69 — CollectionViewUpdater.controllerDidChangeContent has cognitive complexity 44 (threshold 15). Drivers by points: if/else 15 (26 pts), boolean chains 10, loops 3 (4 pts), match/switch 2 (4 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ReadingListsSyncOperation.executeSync (cognitive 43) · ×1
  • ReadingListsSyncOperation.executeSync (cognitive 43) WMF Framework/ReadingListsSyncOperation.swift:72 — ReadingListsSyncOperation.executeSync has cognitive complexity 43 (threshold 15). Drivers by points: if/else 28 (40 pts), boolean chains 3 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DescriptionEditViewController.save (cognitive 43) · ×1
  • DescriptionEditViewController.save (cognitive 43) Wikipedia/Code/DescriptionEditViewController.swift:342 — DescriptionEditViewController.save has cognitive complexity 43 (threshold 15). Drivers by points: if/else 17 (34 pts), match/switch 3 (6 pts), boolean chains 3 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlacesViewController.performSearch (cognitive 43) · ×1
  • PlacesViewController.performSearch (cognitive 43) Wikipedia/Code/PlacesViewController.swift:673 — PlacesViewController.performSearch has cognitive complexity 43 (threshold 15). Drivers by points: if/else 17 (38 pts), boolean chains 2, error handling 1 (2 pts), match/switch 1 (nesting depth added 22). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · WMFNavigationBarConfiguring.configureNavigationBar (cognitive 42) · ×1
  • WMFNavigationBarConfiguring.configureNavigationBar (cognitive 42) WMFComponents/Sources/WMFComponents/Extensions/Navigation Bar/WMFNavigationBarConfiguring.swift:122 — WMFNavigationBarConfiguring.configureNavigationBar has cognitive complexity 42 (threshold 15). Drivers by points: if/else 18 (34 pts), boolean chains 5, match/switch 2 (3 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WMFWatchlistFilterViewModel.generateDataForNewFilterSettings (cognitive 42) · ×1
  • WMFWatchlistFilterViewModel.generateDataForNewFilterSettings (cognitive 42) WMFComponents/Sources/WMFComponents/Components/Watchlist/Filter/WMFWatchlistFilterViewModel.swift:140 — WMFWatchlistFilterViewModel.generateDataForNewFilterSettings has cognitive complexity 42 (threshold 15). Drivers by points: if/else 31 (33 pts), boolean chains 7, loops 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ReadingListsSyncOperation.createOrUpdate (cognitive 42) · ×1
  • ReadingListsSyncOperation.createOrUpdate (cognitive 42) WMF Framework/ReadingListsSyncOperation.swift:969 — ReadingListsSyncOperation.createOrUpdate has cognitive complexity 42 (threshold 15). Drivers by points: if/else 17 (35 pts), loops 4 (5 pts), boolean chains 2 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NotificationsCenterViewController.userDidPanCell (cognitive 41) · ×1
  • NotificationsCenterViewController.userDidPanCell (cognitive 41) Wikipedia/Code/NotificationsCenterViewController.swift:778 — NotificationsCenterViewController.userDidPanCell has cognitive complexity 41 (threshold 15). Drivers by points: if/else 16 (30 pts), ternaries 3 (7 pts), boolean chains 3, match/switch 1 (nesting depth added 18). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · WMFYearInReviewDataController.fullSlideCount (cognitive 40) · ×1
  • WMFYearInReviewDataController.fullSlideCount (cognitive 40) WMFData/Sources/WMFData/Data Controllers/Year In Review/WMFYearInReviewDataController.swift:243 — WMFYearInReviewDataController.fullSlideCount has cognitive complexity 40 (threshold 15). Drivers by points: ternaries 16 (32 pts), if/else 4 (7 pts), match/switch 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PageHistoryViewController.configure (cognitive 40) · ×1
  • PageHistoryViewController.configure (cognitive 40) Wikipedia/Code/PageHistoryViewController.swift:460 — PageHistoryViewController.configure has cognitive complexity 40 (threshold 15). Drivers by points: if/else 17 (28 pts), ternaries 3 (10 pts), boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DetailTransition.animateTransition (cognitive 39) · ×1
  • DetailTransition.animateTransition (cognitive 39) Wikipedia/Code/DetailTransition.swift:36 — DetailTransition.animateTransition has cognitive complexity 39 (threshold 15). Drivers by points: if/else 19 (21 pts), boolean chains 12, ternaries 4 (6 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · DiffContainerViewController.completeRollbackOrUndo (cognitive 39) · ×1
  • DiffContainerViewController.completeRollbackOrUndo (cognitive 39) Wikipedia/Code/DiffContainerViewController.swift:1289 — DiffContainerViewController.completeRollbackOrUndo has cognitive complexity 39 (threshold 15). Drivers by points: if/else 18 (31 pts), match/switch 3 (6 pts), ternaries 1 (2 pts) (nesting depth added 17). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Router.destinationForWResourceURL (cognitive 37) · ×1
  • Router.destinationForWResourceURL (cognitive 37) WMF Framework/Router.swift:163 — Router.destinationForWResourceURL has cognitive complexity 37 (threshold 15). Drivers by points: boolean chains 20, if/else 15 (16 pts), loops 1 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · PlacesViewController.merge (cognitive 37) · ×1
  • PlacesViewController.merge (cognitive 37) Wikipedia/Code/PlacesViewController.swift:1367 — PlacesViewController.merge has cognitive complexity 37 (threshold 15). Drivers by points: if/else 7 (22 pts), boolean chains 6, loops 2 (5 pts), ternaries 1 (4 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ArticleCollectionViewCell.sizeThatFits (cognitive 36) · ×1
  • ArticleCollectionViewCell.sizeThatFits (cognitive 36) Wikipedia/Code/ArticleCollectionViewCell.swift:154 — ArticleCollectionViewCell.sizeThatFits has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (20 pts), ternaries 5 (14 pts), boolean chains 2 (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ArticlePeekPreviewViewController.contextMenuItems (cognitive 36) · ×1
  • ArticlePeekPreviewViewController.contextMenuItems (cognitive 36) Wikipedia/Code/ArticlePeekPreviewViewController.swift:115 — ArticlePeekPreviewViewController.contextMenuItems has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (22 pts), boolean chains 6, ternaries 3 (6 pts), error handling 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WMFAppViewController.processUserActivity (cognitive 36) · ×1
  • WMFAppViewController.processUserActivity (cognitive 36) Wikipedia/Code/WMFAppViewController.swift:1335 — WMFAppViewController.processUserActivity has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (29 pts), match/switch 2 (4 pts), boolean chains 3 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WMFAuthenticationManager.loginWithSavedCredentials (cognitive 35) · ×1
  • WMFAuthenticationManager.loginWithSavedCredentials (cognitive 35) Wikipedia/Code/WMFAuthenticationManager.swift:370 — WMFAuthenticationManager.loginWithSavedCredentials has cognitive complexity 35 (threshold 15). Drivers by points: if/else 15 (28 pts), match/switch 2 (4 pts), boolean chains 3 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WMFSourceEditorFormatterList.toggleListItem (cognitive 34) · ×1
  • WMFSourceEditorFormatterList.toggleListItem (cognitive 34) WMFComponents/Sources/WMFComponents/Components/Editors/Source Editor/Formatter Extensions/WKSourceEditorFormatterList+ButtonActions.swift:66 — WMFSourceEditorFormatterList.toggleListItem has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (23 pts), loops 2 (4 pts), ternaries 2 (4 pts), boolean chains 2, match/switch 1 (nesting depth added 19). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · TalkPageFindInPageSearchController.search (cognitive 34) · ×1
  • TalkPageFindInPageSearchController.search (cognitive 34) Wikipedia/Code/TalkPageFindInPageSearchController.swift:43 — TalkPageFindInPageSearchController.search has cognitive complexity 34 (threshold 15). Drivers by points: loops 6 (18 pts), if/else 6 (14 pts), boolean chains 2 (nesting depth added 20). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · TalkPageViewController.tappedPublish (cognitive 34) · ×1
  • TalkPageViewController.tappedPublish (cognitive 34) Wikipedia/Code/TalkPageViewController.swift:1136 — TalkPageViewController.tappedPublish has cognitive complexity 34 (threshold 15). Drivers by points: if/else 14 (26 pts), boolean chains 5, match/switch 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HtmlUtils.addStyling (cognitive 33) · ×1
  • HtmlUtils.addStyling (cognitive 33) WMFComponents/Sources/WMFComponents/Utility/HTMLUtils.swift:168 — HtmlUtils.addStyling has cognitive complexity 33 (threshold 15). Drivers by points: loops 14 (19 pts), if/else 6 (14 pts) (nesting depth added 13). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · ReadingListsSyncOperation.createOrUpdate (cognitive 33) · ×1
  • ReadingListsSyncOperation.createOrUpdate (cognitive 33) WMF Framework/ReadingListsSyncOperation.swift:1065 — ReadingListsSyncOperation.createOrUpdate has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (23 pts), loops 5 (8 pts), boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PageHistoryCollectionViewCell.sizeThatFits (cognitive 33) · ×1
  • PageHistoryCollectionViewCell.sizeThatFits (cognitive 33) Wikipedia/Code/PageHistoryCollectionViewCell.swift:173 — PageHistoryCollectionViewCell.sizeThatFits has cognitive complexity 33 (threshold 15). Drivers by points: if/else 15 (17 pts), ternaries 8 (15 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WMFAppViewControllerTipWrapper.listenForTooltips (cognitive 32) · ×1
  • WMFAppViewControllerTipWrapper.listenForTooltips (cognitive 32) Wikipedia/Code/AppViewControllerTipWrapper.swift:28 — WMFAppViewControllerTipWrapper.listenForTooltips has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (23 pts), boolean chains 5, ternaries 1 (3 pts), loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HtmlUtils.listInsertData (cognitive 31) · ×1
  • HtmlUtils.listInsertData (cognitive 31) WMFComponents/Sources/WMFComponents/Utility/HTMLUtils.swift:518 — HtmlUtils.listInsertData has cognitive complexity 31 (threshold 15). Drivers by points: if/else 14 (25 pts), boolean chains 4, match/switch 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WMFActivityTabView.loggedInList (cognitive 31) · ×1
  • WMFActivityTabView.loggedInList (cognitive 31) WMFComponents/Sources/WMFComponents/Components/Activity Tab/WMFActivityTabView.swift:80 — WMFActivityTabView.loggedInList has cognitive complexity 31 (threshold 15). Drivers by points: if/else 14 (26 pts), boolean chains 5 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WMFSourceEditorFormatter.toggleFormatting (cognitive 31) · ×1
  • WMFSourceEditorFormatter.toggleFormatting (cognitive 31) WMFComponents/Sources/WMFComponents/Components/Editors/Source Editor/Formatter Extensions/WKSourceEditorFormatter+ButtonActions.swift:15 — WMFSourceEditorFormatter.toggleFormatting has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (25 pts), match/switch 2 (4 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WMFBasicService.performPOST (cognitive 31) · ×1
  • WMFBasicService.performPOST (cognitive 31) WMFData/Sources/WMFData/Service/WMFBasicService.swift:59 — WMFBasicService.performPOST has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 1 (4 pts), error handling 1 (3 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WMFWikitextUtils.insertImageWikitextIntoArticleWikitextAfterTemplates (cognitive 31) · ×1
  • WMFWikitextUtils.insertImageWikitextIntoArticleWikitextAfterTemplates (cognitive 31) WMFData/Sources/WMFData/Utility/WMFWikitextUtils.swift:146 — WMFWikitextUtils.insertImageWikitextIntoArticleWikitextAfterTemplates has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (27 pts), loops 3 (4 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ActionsView.sizeThatFits (cognitive 31) · ×1
  • ActionsView.sizeThatFits (cognitive 31) WMF Framework/CollectionViewCellActionsView.swift:89 — ActionsView.sizeThatFits has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (16 pts), ternaries 4 (8 pts), loops 2 (6 pts), boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SavedArticlesCollectionViewCell.sizeThatFits (cognitive 31) · ×1
  • SavedArticlesCollectionViewCell.sizeThatFits (cognitive 31) Wikipedia/Code/SavedArticlesCollectionViewCell.swift:134 — SavedArticlesCollectionViewCell.sizeThatFits has cognitive complexity 31 (threshold 15). Drivers by points: if/else 16 (19 pts), ternaries 4 (8 pts), boolean chains 4 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TalkPageViewController.tappedPublish (cognitive 31) · ×1
  • TalkPageViewController.tappedPublish (cognitive 31) Wikipedia/Code/TalkPageViewController.swift:1231 — TalkPageViewController.tappedPublish has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (23 pts), boolean chains 5, match/switch 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ReadingListsSyncOperation.executeRandomArticlePopulation (cognitive 30) · ×1
  • ReadingListsSyncOperation.executeRandomArticlePopulation (cognitive 30) WMF Framework/ReadingListsSyncOperation.swift:410 — ReadingListsSyncOperation.executeRandomArticlePopulation has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (25 pts), boolean chains 2, loops 1 (2 pts), error handling 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WidgetController.fetchTopReadContent (cognitive 30) · ×1
  • WidgetController.fetchTopReadContent (cognitive 30) WMF Framework/Widget/WidgetController.swift:370 — WidgetController.fetchTopReadContent has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (19 pts), match/switch 2 (5 pts), loops 1 (3 pts), boolean chains 2, ternaries 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiffListChangeItemViewModel.calculateAttributedString (cognitive 30) · ×1
  • DiffListChangeItemViewModel.calculateAttributedString (cognitive 30) Wikipedia/Code/DiffListChangeItemViewModel.swift:302 — DiffListChangeItemViewModel.calculateAttributedString has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 3 (7 pts), boolean chains 5, match/switch 3 (5 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlacesViewController.updatePlaces (cognitive 30) · ×1
  • PlacesViewController.updatePlaces (cognitive 30) Wikipedia/Code/PlacesViewController.swift:834 — PlacesViewController.updatePlaces has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 8, loops 2 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ArticleCacheController.syncCachedResources (cognitive 29) · ×1
  • ArticleCacheController.syncCachedResources (cognitive 29) WMF Framework/ArticleCacheController.swift:20 — ArticleCacheController.syncCachedResources has cognitive complexity 29 (threshold 15). Drivers by points: match/switch 5 (15 pts), if/else 4 (9 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 17). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · NotificationsCenterDetailViewModel.primaryAction (cognitive 29) · ×1
  • NotificationsCenterDetailViewModel.primaryAction (cognitive 29) Wikipedia/Code/NotificationsCenterDetailViewModel+ActionExtensions.swift:4 — NotificationsCenterDetailViewModel.primaryAction has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (26 pts), boolean chains 2, match/switch 1 (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · WMFWatchlistDataController.fetchWatchlist (cognitive 28) · ×1
  • WMFWatchlistDataController.fetchWatchlist (cognitive 28) WMFData/Sources/WMFData/Data Controllers/Watchlist/WMFWatchlistDataController.swift:103 — WMFWatchlistDataController.fetchWatchlist has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (24 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SavedArticlesFetcher._update (cognitive 28) · ×1
  • SavedArticlesFetcher._update (cognitive 28) Wikipedia/Code/SavedArticlesFetcher.swift:221 — SavedArticlesFetcher._update has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (10 pts), match/switch 4 (10 pts), boolean chains 5, error handling 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WMFArticleTabsDataController.appendArticle (cognitive 27) · ×1
  • WMFArticleTabsDataController.appendArticle (cognitive 27) WMFData/Sources/WMFData/Data Controllers/Article Tabs/WMFArticleTabsDataController.swift:300 — WMFArticleTabsDataController.appendArticle has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (22 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WMFArticleTabsDataController.fetchAllArticleTabs (cognitive 27) · ×1
  • WMFArticleTabsDataController.fetchAllArticleTabs (cognitive 27) WMFData/Sources/WMFData/Data Controllers/Article Tabs/WMFArticleTabsDataController.swift:724 — WMFArticleTabsDataController.fetchAllArticleTabs has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WMFExperimentsDataController.determineBucketForExperiment (cognitive 27) · ×1
  • WMFExperimentsDataController.determineBucketForExperiment (cognitive 27) WMFData/Sources/WMFData/Data Controllers/Experiments/WMFExperimentsDataController.swift:126 — WMFExperimentsDataController.determineBucketForExperiment has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 4, match/switch 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CacheController.finishDBAdd (cognitive 27) · ×1
  • CacheController.finishDBAdd (cognitive 27) WMF Framework/CacheController.swift:186 — CacheController.finishDBAdd has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (16 pts), match/switch 3 (8 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 16). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ExploreCardCollectionViewCell.sizeThatFits (cognitive 27) · ×1
  • ExploreCardCollectionViewCell.sizeThatFits (cognitive 27) WMF Framework/ExploreCardCollectionViewCell.swift:204 — ExploreCardCollectionViewCell.sizeThatFits has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (15 pts), ternaries 5 (9 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MediaWikiFetcher.perform (cognitive 27) · ×1
  • MediaWikiFetcher.perform (cognitive 27) WMF Framework/MediaWikiFetcher.swift:53 — MediaWikiFetcher.perform has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (20 pts), match/switch 2 (4 pts), boolean chains 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiffTransformer.transformSectionInfosOfItems (cognitive 27) · ×1
  • DiffTransformer.transformSectionInfosOfItems (cognitive 27) Wikipedia/Code/DiffTransformer.swift:182 — DiffTransformer.transformSectionInfosOfItems has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 3 (7 pts), boolean chains 4 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WMFArticleTabsDataController.getAdjacentArticleInTab (cognitive 26) · ×1
  • WMFArticleTabsDataController.getAdjacentArticleInTab (cognitive 26) WMFData/Sources/WMFData/Data Controllers/Article Tabs/WMFArticleTabsDataController.swift:382 — WMFArticleTabsDataController.getAdjacentArticleInTab has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 10, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CollectionViewUpdater.performBatchUpdates (cognitive 26) · ×1
  • CollectionViewUpdater.performBatchUpdates (cognitive 26) Wikipedia/Code/CollectionViewUpdater.swift:178 — CollectionViewUpdater.performBatchUpdates has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (19 pts), match/switch 2 (4 pts), loops 2, boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Session.request (cognitive 26) · ×1
  • Session.request (cognitive 26) Wikipedia/Code/Session.swift:254 — Session.request has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (18 pts), error handling 1 (3 pts), boolean chains 2, loops 2, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WMFForYouArticleCardView.body (cognitive 25) · ×1
  • WMFForYouArticleCardView.body (cognitive 25) WMFComponents/Sources/WMFComponents/Components/Home/WMFForYouView.swift:879 — WMFForYouArticleCardView.body has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (14 pts), ternaries 4 (7 pts), match/switch 3 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ColumnarCollectionViewLayout.prepare (cognitive 25) · ×1
  • ColumnarCollectionViewLayout.prepare (cognitive 25) WMF Framework/ColumnarCollectionViewLayout.swift:190 — ColumnarCollectionViewLayout.prepare has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 6, loops 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WMFArticleSavedStateMigrationManager.runMigration (cognitive 25) · ×1
  • WMFArticleSavedStateMigrationManager.runMigration (cognitive 25) WMF Framework/WMFArticle+Migration.swift:88 — WMFArticleSavedStateMigrationManager.runMigration has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (14 pts), error handling 3 (5 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ArticleTabCoordinating.trackArticleTab (cognitive 25) · ×1
  • ArticleTabCoordinating.trackArticleTab (cognitive 25) Wikipedia/Code/ArticleCoordinator.swift:32 — ArticleTabCoordinating.trackArticleTab has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (14 pts), match/switch 3 (7 pts), boolean chains 3, error handling 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EditSaveViewController.handleEditFailure (cognitive 25) · ×1
  • EditSaveViewController.handleEditFailure (cognitive 25) Wikipedia/Code/EditSaveViewController.swift:574 — EditSaveViewController.handleEditFailure has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 5, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ExploreViewController.collectionView (cognitive 25) · ×1
  • ExploreViewController.collectionView (cognitive 25) Wikipedia/Code/ExploreViewController.swift:612 — ExploreViewController.collectionView has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 6, ternaries 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HomeCoordinator.makeHomeViewController (cognitive 25) · ×1
  • HomeCoordinator.makeHomeViewController (cognitive 25) Wikipedia/Code/HomeCoordinator.swift:53 — HomeCoordinator.makeHomeViewController has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13, boolean chains 12. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · PageHistoryViewController.collectionView (cognitive 25) · ×1
  • PageHistoryViewController.collectionView (cognitive 25) Wikipedia/Code/PageHistoryViewController.swift:704 — PageHistoryViewController.collectionView has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 6 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ViewControllerRouter.route (cognitive 25) · ×1
  • ViewControllerRouter.route (cognitive 25) Wikipedia/Code/ViewControllerRouter.swift:110 — ViewControllerRouter.route has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 4, match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · NSManagedObjectContext.wmf_createOrUpdateArticleSummmaries (cognitive 25) · ×1
  • NSManagedObjectContext.wmf_createOrUpdateArticleSummmaries (cognitive 25) WMF Framework/SummaryExtensions.swift:100 — NSManagedObjectContext.wmf_createOrUpdateArticleSummmaries has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 5 (9 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WMFYearInReviewDataController.populateYearInReviewReportData (cognitive 24) · ×1
  • WMFYearInReviewDataController.populateYearInReviewReportData (cognitive 24) WMFData/Sources/WMFData/Data Controllers/Year In Review/WMFYearInReviewDataController.swift:633 — WMFYearInReviewDataController.populateYearInReviewReportData has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 4, loops 3, error handling 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CacheController.remove (cognitive 24) · ×1
  • CacheController.remove (cognitive 24) WMF Framework/CacheController.swift:290 — CacheController.remove has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (12 pts), match/switch 4 (10 pts), loops 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ArticleRightAlignedImageCollectionViewCell.sizeThatFits (cognitive 24) · ×1
  • ArticleRightAlignedImageCollectionViewCell.sizeThatFits (cognitive 24) Wikipedia/Code/ArticleRightAlignedImageCollectionViewCell.swift:41 — ArticleRightAlignedImageCollectionViewCell.sizeThatFits has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (10 pts), ternaries 5 (10 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiffListChangeItemViewModel.moveAttributedString (cognitive 24) · ×1
  • DiffListChangeItemViewModel.moveAttributedString (cognitive 24) Wikipedia/Code/DiffListChangeItemViewModel.swift:130 — DiffListChangeItemViewModel.moveAttributedString has cognitive complexity 24 (threshold 15). Drivers by points: match/switch 3 (10 pts), if/else 5 (7 pts), loops 1 (3 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PageHistoryCollectionViewCell.apply (cognitive 24) · ×1
  • PageHistoryCollectionViewCell.apply (cognitive 24) Wikipedia/Code/PageHistoryCollectionViewCell.swift:270 — PageHistoryCollectionViewCell.apply has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (22 pts), ternaries 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PageHistoryFetcher.fetchEditCounts (cognitive 24) · ×1
  • PageHistoryFetcher.fetchEditCounts (cognitive 24) Wikipedia/Code/PageHistoryFetcher.swift:91 — PageHistoryFetcher.fetchEditCounts has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 10, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TableOfContentsAnimator.gestureRecognizerShouldBegin (cognitive 24) · ×1
  • TableOfContentsAnimator.gestureRecognizerShouldBegin (cognitive 24) Wikipedia/Code/TableOfContentsAnimator.swift:323 — TableOfContentsAnimator.gestureRecognizerShouldBegin has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 4, match/switch 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SchemeHandler.kickOffDataTask (cognitive 24) · ×1
  • SchemeHandler.kickOffDataTask (cognitive 24) Wikipedia/Code/SchemeHandler/SchemeHandler.swift:163 — SchemeHandler.kickOffDataTask has cognitive complexity 24 (threshold 15). Drivers by points: if/else 20 (23 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · localization.swift.exportLocalizationsFromSourceCode (cognitive 24) · ×1
  • localization.swift.exportLocalizationsFromSourceCode (cognitive 24) Command Line Tools/Update Localizations/localization.swift:341 — localization.swift.exportLocalizationsFromSourceCode has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 3 (6 pts), boolean chains 2, error handling 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WMFEditorInputView.didSelectIndex (cognitive 23) · ×1
  • WMFEditorInputView.didSelectIndex (cognitive 23) WMFComponents/Sources/WMFComponents/Components/Editors/Common Views/Input Views/WMFEditorInputView.swift:419 — WMFEditorInputView.didSelectIndex has cognitive complexity 23 (threshold 15). Drivers by points: match/switch 8 (15 pts), if/else 8 (nesting depth added 7). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · WMFArticleDataController.fetchArticleInfo (cognitive 23) · ×1
  • WMFArticleDataController.fetchArticleInfo (cognitive 23) WMFData/Sources/WMFData/Data Controllers/Shared/WMFArticleDataController.swift:102 — WMFArticleDataController.fetchArticleInfo has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (17 pts), loops 1 (3 pts), boolean chains 2, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WidgetController.fetchPictureOfTheDayContent (cognitive 23) · ×1
  • WidgetController.fetchPictureOfTheDayContent (cognitive 23) WMF Framework/Widget/WidgetController.swift:553 — WidgetController.fetchPictureOfTheDayContent has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 4, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiffListViewController.didTapItem (cognitive 23) · ×1
  • DiffListViewController.didTapItem (cognitive 23) Wikipedia/Code/DiffListViewController.swift:383 — DiffListViewController.didTapItem has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 2 (6 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NotificationsCenterViewController.userDidTapMoreActionForCell (cognitive 23) · ×1
  • NotificationsCenterViewController.userDidTapMoreActionForCell (cognitive 23) Wikipedia/Code/NotificationsCenterViewController.swift:870 — NotificationsCenterViewController.userDidTapMoreActionForCell has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 2, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlacesViewController.updateSearchSuggestions (cognitive 23) · ×1
  • PlacesViewController.updateSearchSuggestions (cognitive 23) Wikipedia/Code/PlacesViewController.swift:1930 — PlacesViewController.updateSearchSuggestions has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 1 (4 pts), match/switch 2 (3 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SavedArticlesFetcher.handleFailure (cognitive 23) · ×1
  • SavedArticlesFetcher.handleFailure (cognitive 23) Wikipedia/Code/SavedArticlesFetcher.swift:372 — SavedArticlesFetcher.handleFailure has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (13 pts), match/switch 4 (8 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · WMFDailyGameContentSource.loadNewContent (cognitive 23) · ×1
  • WMFDailyGameContentSource.loadNewContent (cognitive 23) Wikipedia/Code/WMFDailyGameContentSource.swift:26 — WMFDailyGameContentSource.loadNewContent has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (16 pts), ternaries 1 (4 pts), boolean chains 2, error handling 1 (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · CollectionViewEditController.handlePanGesture (cognitive 22) · ×1
  • CollectionViewEditController.handlePanGesture (cognitive 22) WMF Framework/CollectionViewEditController.swift:256 — CollectionViewEditController.handlePanGesture has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (12 pts), ternaries 3 (7 pts), boolean chains 2, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ReadingList.updateArticlesAndEntries (cognitive 22) · ×1
  • ReadingList.updateArticlesAndEntries (cognitive 22) WMF Framework/ReadingList+CoreDataClass.swift:34 — ReadingList.updateArticlesAndEntries has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WikipediaLanguageCommandLineUtility.getSiteInfoLookup (cognitive 22) · ×1
  • WikipediaLanguageCommandLineUtility.getSiteInfoLookup (cognitive 22) Command Line Tools/Update Languages/WikipediaLanguageCommandLineUtility.swift:72 — WikipediaLanguageCommandLineUtility.getSiteInfoLookup has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 17, if/else 2 (3 pts), loops 2 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · WikipediaLanguageCommandLineUtilityAPI.getSites (cognitive 22) · ×1
  • WikipediaLanguageCommandLineUtilityAPI.getSites (cognitive 22) Command Line Tools/Update Languages/WikipediaLanguageCommandLineUtilityAPI.swift:22 — WikipediaLanguageCommandLineUtilityAPI.getSites has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 7 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SessionDelegate.urlSession (cognitive 22) · ×1
  • SessionDelegate.urlSession (cognitive 22) Wikipedia/Code/Session.swift:822 — SessionDelegate.urlSession has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 5 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SinglePageWebViewController.handleNavigation (cognitive 22) · ×1
  • SinglePageWebViewController.handleNavigation (cognitive 22) Wikipedia/Code/SinglePageWebViewController.swift:389 — SinglePageWebViewController.handleNavigation has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 5, match/switch 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DatabasePopulationViewModel.populateViewedArticles (cognitive 22) · ×1
  • DatabasePopulationViewModel.populateViewedArticles (cognitive 22) Wikipedia/Code/Database Population/DatabasePopulationViewModel.swift:120 — DatabasePopulationViewModel.populateViewedArticles has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 4, error handling 1 (3 pts), loops 2 (nesting depth added 8). Of this number, 16 points are the body's own statements and 6 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WMFFont.`for` (cognitive 21) · ×1
  • WMFFont.`for` (cognitive 21) WMFComponents/Sources/WMFComponents/Style/WMFFont.swift:61 — WMFFont.`for` has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (20 pts), match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ArticleFetcher.fetchMediaListURLs (cognitive 21) · ×1
  • ArticleFetcher.fetchMediaListURLs (cognitive 21) Wikipedia/Code/ArticleFetcher.swift:43 — ArticleFetcher.fetchMediaListURLs has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (6 pts), boolean chains 3, match/switch 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ArticlePlaceView.setSelected (cognitive 21) · ×1
  • ArticlePlaceView.setSelected (cognitive 21) Wikipedia/Code/ArticlePlaceView.swift:408 — ArticlePlaceView.setSelected has cognitive complexity 21 (threshold 15). Drivers by points: if/else 16 (17 pts), boolean chains 3, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · DiffListChangeItemViewModel.constructAccessibilityLabel (cognitive 21) · ×1
  • DiffListChangeItemViewModel.constructAccessibilityLabel (cognitive 21) Wikipedia/Code/DiffListChangeItemViewModel.swift:229 — DiffListChangeItemViewModel.constructAccessibilityLabel has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (13 pts), match/switch 3 (6 pts), boolean chains 1, loops 1 (nesting depth added 10). Of this number, 18 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ThanksGiving.tappedThank (cognitive 21) · ×1
  • ThanksGiving.tappedThank (cognitive 21) Wikipedia/Code/ThanksGiving.swift:35 — ThanksGiving.tappedThank has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (14 pts), match/switch 4 (6 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · MWKDataStore.migrateWikipediaEntities (cognitive 21) · ×1
  • MWKDataStore.migrateWikipediaEntities (cognitive 21) WMF Framework/MWKDataStore+LanguageVariantMigration.swift:161 — MWKDataStore.migrateWikipediaEntities has cognitive complexity 21 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 3 (7 pts), error handling 2 (4 pts) (nesting depth added 12). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · WMFSurveyView.body (cognitive 20) · ×1
  • WMFSurveyView.body (cognitive 20) WMFComponents/Sources/WMFComponents/Components/Shared/Survey/WMFSurveyView.swift:49 — WMFSurveyView.body has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (13 pts), ternaries 2 (3 pts), loops 1 (2 pts), boolean chains 1, match/switch 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · WMFArticle.merge (cognitive 20) · ×1
  • WMFArticle.merge (cognitive 20) WMF Framework/SummaryExtensions.swift:4 — WMFArticle.merge has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 3, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PermanentlyPersistableURLCache.updateCacheWithCachedResponse (cognitive 20) · ×1
  • PermanentlyPersistableURLCache.updateCacheWithCachedResponse (cognitive 20) WMF Framework/PermanentlyPersistableURLCache.swift:423 — PermanentlyPersistableURLCache.updateCacheWithCachedResponse has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9, boolean chains 8, match/switch 2, ternaries 1. Of this number, 17 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · ReadingListsSyncOperation.execute (cognitive 20) · ×1
  • ReadingListsSyncOperation.execute (cognitive 20) WMF Framework/ReadingListsSyncOperation.swift:23 — ReadingListsSyncOperation.execute has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 3, error handling 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WidgetController.fetchFeaturedArticleContent (cognitive 20) · ×1
  • WidgetController.fetchFeaturedArticleContent (cognitive 20) WMF Framework/Widget/WidgetController.swift:489 — WidgetController.fetchFeaturedArticleContent has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 1, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WMFActivityTabViewController.viewDidLoad (cognitive 20) · ×1
  • WMFActivityTabViewController.viewDidLoad (cognitive 20) Wikipedia/Code/ActivityTabViewController.swift:40 — WMFActivityTabViewController.viewDidLoad has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EditorViewController.loadContent (cognitive 20) · ×1
  • EditorViewController.loadContent (cognitive 20) Wikipedia/Code/EditorViewController.swift:192 — EditorViewController.loadContent has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12, boolean chains 6, match/switch 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · LegacyReadingListsDataSource.savedArticles (cognitive 20) · ×1
  • LegacyReadingListsDataSource.savedArticles (cognitive 20) Wikipedia/Code/LegacyReadingListsDataSource.swift:298 — LegacyReadingListsDataSource.savedArticles has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 3 (6 pts), boolean chains 3, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WMFSourceEditorFormatter.textPositionsCloserToNearestFormattingStrings (cognitive 19) · ×1
  • WMFSourceEditorFormatter.textPositionsCloserToNearestFormattingStrings (cognitive 19) WMFComponents/Sources/WMFComponents/Components/Editors/Source Editor/Formatter Extensions/WKSourceEditorFormatter+ButtonActions.swift:151 — WMFSourceEditorFormatter.textPositionsCloserToNearestFormattingStrings has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 3, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ColumnarCollectionViewLayout.layoutAttributesForElements (cognitive 19) · ×1
  • ColumnarCollectionViewLayout.layoutAttributesForElements (cognitive 19) WMF Framework/ColumnarCollectionViewLayout.swift:35 — ColumnarCollectionViewLayout.layoutAttributesForElements has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 4 (7 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PageNamespace.isTalkBased (cognitive 19) · ×1
  • PageNamespace.isTalkBased (cognitive 19) WMF Framework/PageNamespace.swift:91 — PageNamespace.isTalkBased has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 19. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · RemoteNotificationsController.predicateForFilterSavedState (cognitive 19) · ×1
  • RemoteNotificationsController.predicateForFilterSavedState (cognitive 19) WMF Framework/Remote Notifications/RemoteNotificationsController.swift:404 — RemoteNotificationsController.predicateForFilterSavedState has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 4, match/switch 1, ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ActivityTabFunnel.logActivityTabCustomizeExit (cognitive 19) · ×1
  • ActivityTabFunnel.logActivityTabCustomizeExit (cognitive 19) Wikipedia/Code/ActivityTabFunnel.swift:132 — ActivityTabFunnel.logActivityTabCustomizeExit has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 5 (9 pts), boolean chains 7, if/else 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppearanceSettingsViewController.tableView (cognitive 19) · ×1
  • AppearanceSettingsViewController.tableView (cognitive 19) Wikipedia/Code/AppearanceSettingsViewController.swift:158 — AppearanceSettingsViewController.tableView has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (14 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ArticleViewController.showNewDonateExperienceCampaignModal (cognitive 19) · ×1
  • ArticleViewController.showNewDonateExperienceCampaignModal (cognitive 19) Wikipedia/Code/ArticleViewController+Announcements.swift:82 — ArticleViewController.showNewDonateExperienceCampaignModal has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 3, match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiffContainerViewController.evaluateState (cognitive 19) · ×1
  • DiffContainerViewController.evaluateState (cognitive 19) Wikipedia/Code/DiffContainerViewController.swift:527 — DiffContainerViewController.evaluateState has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 6 (10 pts), if/else 7 (9 pts) (nesting depth added 6). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · DiffListChangeItemViewModel.calculateTextPaddingAndInBetweenSpacing (cognitive 19) · ×1
  • DiffListChangeItemViewModel.calculateTextPaddingAndInBetweenSpacing (cognitive 19) Wikipedia/Code/DiffListChangeItemViewModel.swift:99 — DiffListChangeItemViewModel.calculateTextPaddingAndInBetweenSpacing has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 7, if/else 5 (7 pts), ternaries 2 (4 pts), match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiffListViewController.updateListViewModels (cognitive 19) · ×1
  • DiffListViewController.updateListViewModels (cognitive 19) Wikipedia/Code/DiffListViewController.swift:157 — DiffListViewController.updateListViewModels has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 3 (6 pts), boolean chains 1, match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · PlacesViewController.handlePanGesture (cognitive 19) · ×1
  • PlacesViewController.handlePanGesture (cognitive 19) Wikipedia/Code/PlacesViewController.swift:1022 — PlacesViewController.handlePanGesture has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (18 pts), match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · SceneDelegate.openURLContexts (cognitive 19) · ×1
  • SceneDelegate.openURLContexts (cognitive 19) Wikipedia/Code/SceneDelegate.swift:192 — SceneDelegate.openURLContexts has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TalkPageViewController.scrollToFindInPageResultRect (cognitive 19) · ×1
  • TalkPageViewController.scrollToFindInPageResultRect (cognitive 19) Wikipedia/Code/TalkPageViewController+FindInPage.swift:48 — TalkPageViewController.scrollToFindInPageResultRect has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (18 pts), boolean chains 1 (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · WMFAppViewController.logWatchlistUserDidSaveFilterSettings (cognitive 19) · ×1
  • WMFAppViewController.logWatchlistUserDidSaveFilterSettings (cognitive 19) Wikipedia/Code/WMFAppViewController+Extensions.swift:482 — WMFAppViewController.logWatchlistUserDidSaveFilterSettings has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 7 (9 pts), if/else 6 (7 pts), boolean chains 2, loops 1 (nesting depth added 3). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · WMFAppViewController.logTabBarSelectionsForActivityTab (cognitive 19) · ×1
  • WMFAppViewController.logTabBarSelectionsForActivityTab (cognitive 19) Wikipedia/Code/WMFAppViewController+Extensions.swift:1260 — WMFAppViewController.logTabBarSelectionsForActivityTab has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · WMFHCaptchaViewController.setupHCaptcha (cognitive 19) · ×1
  • WMFHCaptchaViewController.setupHCaptcha (cognitive 19) Wikipedia/Code/WMFHCaptchaViewController.swift:98 — WMFHCaptchaViewController.setupHCaptcha has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 5, ternaries 2 (4 pts), error handling 1, match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WikidataFetcher.processResponse (cognitive 19) · ×1
  • WikidataFetcher.processResponse (cognitive 19) Wikipedia/Code/WikidataFetcher.swift:197 — WikidataFetcher.processResponse has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (14 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MWKDataStore.migrateNewVariants (cognitive 19) · ×1
  • MWKDataStore.migrateNewVariants (cognitive 19) WMF Framework/MWKDataStore+LanguageVariantMigration.swift:110 — MWKDataStore.migrateNewVariants has cognitive complexity 19 (threshold 15). Drivers by points: loops 4 (10 pts), error handling 4 (8 pts), if/else 1 (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · WMFContentGroup.imageURLsCompatibleWithTraitCollection (cognitive 19) · ×1
  • WMFContentGroup.imageURLsCompatibleWithTraitCollection (cognitive 19) WMF Framework/WMFContentGroup+Display.swift:15 — WMFContentGroup.imageURLsCompatibleWithTraitCollection has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 1 (2 pts), match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · WMFContentGroup.detailViewControllerWithDataStore (cognitive 19) · ×1
  • WMFContentGroup.detailViewControllerWithDataStore (cognitive 19) Wikipedia/Code/WMFContentGroup+DetailViewControllers.swift:34 — WMFContentGroup.detailViewControllerWithDataStore has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 2 (4 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WMFDonateViewModel.paymentAuthorizationController (cognitive 18) · ×1
  • WMFDonateViewModel.paymentAuthorizationController (cognitive 18) WMFComponents/Sources/WMFComponents/Components/Donate Form/WMFDonateViewModel.swift:546 — WMFDonateViewModel.paymentAuthorizationController has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (11 pts), match/switch 2 (4 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ColumnarCollectionViewLayoutSection.invalidate (cognitive 18) · ×1
  • ColumnarCollectionViewLayoutSection.invalidate (cognitive 18) WMF Framework/ColumarCollectionViewLayoutSection.swift:148 — ColumnarCollectionViewLayoutSection.invalidate has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 1 (3 pts), match/switch 2 (3 pts) (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ReadingListsSyncOperation.executeFullSync (cognitive 18) · ×1
  • ReadingListsSyncOperation.executeFullSync (cognitive 18) WMF Framework/ReadingListsSyncOperation.swift:271 — ReadingListsSyncOperation.executeFullSync has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ArticlePlaceView.set (cognitive 18) · ×1
  • ArticlePlaceView.set (cognitive 18) Wikipedia/Code/ArticlePlaceView.swift:191 — ArticlePlaceView.set has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15 (16 pts), boolean chains 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · ArticleToolbarController.createMoreMenu (cognitive 18) · ×1
  • ArticleToolbarController.createMoreMenu (cognitive 18) Wikipedia/Code/ArticleToolbarController.swift:127 — ArticleToolbarController.createMoreMenu has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), ternaries 3 (5 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DonateCoordinator.nativeDonateFormViewModel (cognitive 18) · ×1
  • DonateCoordinator.nativeDonateFormViewModel (cognitive 18) Wikipedia/Code/DonateCoordinator.swift:454 — DonateCoordinator.nativeDonateFormViewModel has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10, boolean chains 5, loops 1 (2 pts), match/switch 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · ExploreViewController.exploreCardViewController (cognitive 18) · ×1
  • ExploreViewController.exploreCardViewController (cognitive 18) Wikipedia/Code/ExploreViewController.swift:791 — ExploreViewController.exploreCardViewController has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 1, match/switch 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · PageHistoryViewController.getEditCounts (cognitive 18) · ×1
  • PageHistoryViewController.getEditCounts (cognitive 18) Wikipedia/Code/PageHistoryViewController.swift:191 — PageHistoryViewController.getEditCounts has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 4 (5 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ReadingListsCollectionViewCell.sizeThatFits (cognitive 18) · ×1
  • ReadingListsCollectionViewCell.sizeThatFits (cognitive 18) Wikipedia/Code/ReadingListsCollectionViewCell.swift:73 — ReadingListsCollectionViewCell.sizeThatFits has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 2, ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WMFArticleTabsViewModel.prefetchBatch (cognitive 17) · ×1
  • WMFArticleTabsViewModel.prefetchBatch (cognitive 17) WMFComponents/Sources/WMFComponents/Components/Article Tabs/WMFArticleTabsViewModel.swift:327 — WMFArticleTabsViewModel.prefetchBatch has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 2 (6 pts), if/else 4 (5 pts), boolean chains 2, error handling 1 (2 pts), loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WMFCommunityFeedView.feedList (cognitive 17) · ×1
  • WMFCommunityFeedView.feedList (cognitive 17) WMFComponents/Sources/WMFComponents/Components/Home/WMFCommunityFeedView.swift:39 — WMFCommunityFeedView.feedList has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 10, if/else 7. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · WMFWhichCameFirstCardView.thumbnailView (cognitive 17) · ×1
  • WMFWhichCameFirstCardView.thumbnailView (cognitive 17) WMFComponents/Sources/WMFComponents/Components/Games/Which Came First/Core/Cards/WMFWhichCameFirstCardView.swift:118 — WMFWhichCameFirstCardView.thumbnailView has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 4 (12 pts), if/else 3 (4 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WMFDonateDataController.submitPayment (cognitive 17) · ×1
  • WMFDonateDataController.submitPayment (cognitive 17) WMFData/Sources/WMFData/Data Controllers/Donor Experience/WMFDonateDataController.swift:204 — WMFDonateDataController.submitPayment has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10, ternaries 3 (4 pts), match/switch 2 (3 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · WMFGamesDataController.makeWhichCameFirstQuestions (cognitive 17) · ×1
  • WMFGamesDataController.makeWhichCameFirstQuestions (cognitive 17) WMFData/Sources/WMFData/Data Controllers/Games/WMFGamesDataController.swift:364 — WMFGamesDataController.makeWhichCameFirstQuestions has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 3 (6 pts), boolean chains 5, if/else 4 (5 pts), loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiffFetcher.fetchWikitext (cognitive 17) · ×1
  • DiffFetcher.fetchWikitext (cognitive 17) Wikipedia/Code/DiffFetcher.swift:45 — DiffFetcher.fetchWikitext has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TalkPageReplyComposeController.userDidPanContainerView (cognitive 17) · ×1
  • TalkPageReplyComposeController.userDidPanContainerView (cognitive 17) Wikipedia/Code/TalkPageReplyComposeController.swift:254 — TalkPageReplyComposeController.userDidPanContainerView has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 4, match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WikimediaProject.init (cognitive 17) · ×1
  • WikimediaProject.init (cognitive 17) Wikipedia/Code/WikimediaProject.swift:92 — WikimediaProject.init has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, boolean chains 3. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · UITestReadingListsSeeder.apply (cognitive 17) · ×1
  • UITestReadingListsSeeder.apply (cognitive 17) Wikipedia/Code/UITestSeeds/UITestReadingListsSeeder.swift:77 — UITestReadingListsSeeder.apply has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 4 (7 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UIView.wmf_preferredFrame (cognitive 17) · ×1
  • UIView.wmf_preferredFrame (cognitive 17) WMF Framework/UIView+SemanticContent.swift:20 — UIView.wmf_preferredFrame has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, boolean chains 6, match/switch 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · localization.swift.writeStrings (cognitive 17) · ×1
  • localization.swift.writeStrings (cognitive 17) Command Line Tools/Update Localizations/localization.swift:297 — localization.swift.writeStrings has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 1 (3 pts), boolean chains 1, error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WMFSourceEditorFormatter.getModifiedStartingFormattingStringForSingleWildcard (cognitive 16) · ×1
  • WMFSourceEditorFormatter.getModifiedStartingFormattingStringForSingleWildcard (cognitive 16) WMFComponents/Sources/WMFComponents/Components/Editors/Source Editor/Formatter Extensions/WKSourceEditorFormatter+ButtonActions.swift:93 — WMFSourceEditorFormatter.getModifiedStartingFormattingStringForSingleWildcard has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 5, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WMFRiveAnimationViewModel.applyImages (cognitive 16) · ×1
  • WMFRiveAnimationViewModel.applyImages (cognitive 16) WMFComponents/Sources/WMFComponents/Components/Shared/Rive/WMFRiveAnimationViewModel.swift:288 — WMFRiveAnimationViewModel.applyImages has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), error handling 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WMFWhichCameFirstView.footerArea (cognitive 16) · ×1
  • WMFWhichCameFirstView.footerArea (cognitive 16) WMFComponents/Sources/WMFComponents/Components/Games/Which Came First/Core/WMFWhichCameFirstView.swift:143 — WMFWhichCameFirstView.footerArea has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 4 (6 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WMFBasicService.performGET (cognitive 16) · ×1
  • WMFBasicService.performGET (cognitive 16) WMFData/Sources/WMFData/Service/WMFBasicService.swift:148 — WMFBasicService.performGET has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WMFGamesDataController.fetchWhichCameFirstStats (cognitive 16) · ×1
  • WMFGamesDataController.fetchWhichCameFirstStats (cognitive 16) WMFData/Sources/WMFData/Data Controllers/Games/WMFGamesDataController.swift:195 — WMFGamesDataController.fetchWhichCameFirstStats has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 6, loops 1, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · WMFPageViewsDataController.fetchPageViewSeconds (cognitive 16) · ×1
  • WMFPageViewsDataController.fetchPageViewSeconds (cognitive 16) WMFData/Sources/WMFData/Data Controllers/Shared/WMFPageViewsDataController.swift:447 — WMFPageViewsDataController.fetchPageViewSeconds has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ReadingListsAPIController.addEntriesToList (cognitive 16) · ×1
  • ReadingListsAPIController.addEntriesToList (cognitive 16) WMF Framework/ReadingListsAPIController.swift:309 — ReadingListsAPIController.addEntriesToList has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), ternaries 1 (3 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ArticleCacheDBWriter.add (cognitive 16) · ×1
  • ArticleCacheDBWriter.add (cognitive 16) Wikipedia/Code/ArticleCacheDBWriter.swift:43 — ArticleCacheDBWriter.add has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), loops 2 (4 pts), match/switch 2 (3 pts), error handling 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ArticleViewController.showFundraisingCampaignAnnouncementIfNeeded (cognitive 16) · ×1
  • ArticleViewController.showFundraisingCampaignAnnouncementIfNeeded (cognitive 16) Wikipedia/Code/ArticleViewController+Announcements.swift:9 — ArticleViewController.showFundraisingCampaignAnnouncementIfNeeded has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · EditSaveViewController.handleEditSuccess (cognitive 16) · ×1
  • EditSaveViewController.handleEditSuccess (cognitive 16) Wikipedia/Code/EditSaveViewController.swift:523 — EditSaveViewController.handleEditSuccess has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · InsertMediaSearchViewController.search (cognitive 16) · ×1
  • InsertMediaSearchViewController.search (cognitive 16) Wikipedia/Code/InsertMediaSearchViewController.swift:45 — InsertMediaSearchViewController.search has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TalkPageArchivesView.body (cognitive 16) · ×1
  • TalkPageArchivesView.body (cognitive 16) Wikipedia/Code/TalkPageArchivesView.swift:30 — TalkPageArchivesView.body has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), error handling 2 (4 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TalkPageTopicComposeViewController.tappedPublish (cognitive 16) · ×1
  • TalkPageTopicComposeViewController.tappedPublish (cognitive 16) Wikipedia/Code/TalkPageTopicComposeViewController.swift:535 — TalkPageTopicComposeViewController.tappedPublish has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 4, match/switch 1 (2 pts) (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · WMFAccountCreationViewController.createAccount (cognitive 16) · ×1
  • WMFAccountCreationViewController.createAccount (cognitive 16) Wikipedia/Code/WMFAccountCreationViewController.swift:517 — WMFAccountCreationViewController.createAccount has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WMFAccountCreator.createAccount (cognitive 16) · ×1
  • WMFAccountCreator.createAccount (cognitive 16) Wikipedia/Code/WMFAccountCreator.swift:162 — WMFAccountCreator.createAccount has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WMFAuthenticationManager.logout (cognitive 16) · ×1
  • WMFAuthenticationManager.logout (cognitive 16) Wikipedia/Code/WMFAuthenticationManager.swift:568 — WMFAuthenticationManager.logout has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · WMFLoginViewController.save (cognitive 16) · ×1
  • WMFLoginViewController.save (cognitive 16) Wikipedia/Code/WMFLoginViewController.swift:234 — WMFLoginViewController.save has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), match/switch 2 (4 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WikitextFetcher.fetchSection (cognitive 16) · ×1
  • WikitextFetcher.fetchSection (cognitive 16) Wikipedia/Code/WikitextFetcher.swift:74 — WikitextFetcher.fetchSection has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 7, match/switch 1 (nesting depth added 2). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UIViewController.push (cognitive 16) · ×1
  • UIViewController.push (cognitive 16) Wikipedia/Code/UIViewController+Push.swift:4 — UIViewController.push has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (16 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Locale.uniqueWikipediaLanguages (cognitive 16) · ×1
  • Locale.uniqueWikipediaLanguages (cognitive 16) Wikipedia/Code/NSLocale+WMFExtras.swift:53 — Locale.uniqueWikipediaLanguages has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), ternaries 1 (3 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Members sharing a duplicated core (8 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (8 members, 50+ identical tokens) WMFComponents/Sources/WMFComponents/Components/Settings/Account/WMFAccountSettingsView.swift:16 — WMFComponents/Sources/WMFComponents/Components/Settings/Account/WMFAccountSettingsView.swift:16-47 | WMFComponents/Sources/WMFComponents/Components/Settings/Home/Community/WMFHomeFeedCommunitySettingsView.swift:14-39 | WMFComponents/Sources/WMFComponents/Components/Settings/Home/For You/WMFHomeFeedForYouSettingsView.swift:14-36 | WMFComponents/Sources/WMFComponents/Components/Settings/Home/For You/Whats Driving/WMFHomeFeedWhatsDrivingSettingsView.swift:14-44 | WMFComponents/Sources/WMFComponents/Components/Settings/Push Notifications/WMFPushNotificationsSettingsView.swift:16-52 | WMFComponents/Sources/WMFComponents/Components/Settings/Search/WMFSearchSettingsView.swift:16-47 | WMFComponents/Sources/WMFComponents/Components/Settings/Storage and Syncing/WMFStorageAndSyncingSettingsView.swift:16-47 | WMFComponents/Sources/WMFComponents/Components/Settings/Year In Review/WMFYearInReviewSettingsView.swift:16-57 — These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
D4 · Code Duplication · Edited copy of a member (84 corresponding lines) · ×1
  • Edited copy of a member (84 corresponding lines) Wikipedia/Code/ArticlePlaceView.swift:191 — Wikipedia/Code/ArticlePlaceView.swift:191-274 | Wikipedia/Code/ArticlePlaceView.swift:408-501 — These two members are one piece of code written twice and then edited apart: 84 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (74 corresponding lines) · ×1
  • Edited copy of a member (74 corresponding lines) Wikipedia/Code/TalkPageViewController.swift:1136 — Wikipedia/Code/TalkPageViewController.swift:1136-1217 | Wikipedia/Code/TalkPageViewController.swift:1231-1304 — These two members are one piece of code written twice and then edited apart: 74 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (55 corresponding lines) · ×1
  • Edited copy of a member (55 corresponding lines) Wikipedia/Code/DescriptionEditViewController.swift:137 — Wikipedia/Code/DescriptionEditViewController.swift:137-191 | Wikipedia/Code/EditSaveViewController.swift:248-328 — These two members are one piece of code written twice and then edited apart: 55 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (57 corresponding lines) · ×1
  • Edited copy of a member (57 corresponding lines) Wikipedia/Code/TempAccountSheetCoordinator.swift:63 — Wikipedia/Code/TempAccountSheetCoordinator.swift:63-120 | Wikipedia/Code/TempAccountSheetCoordinator.swift:130-186 — These two members are one piece of code written twice and then edited apart: 57 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (53 corresponding lines) · ×1
  • Edited copy of a member (53 corresponding lines) Wikipedia/Code/ArticleViewController.swift:591 — Wikipedia/Code/ArticleViewController.swift:591-643 | Wikipedia/Code/ExploreViewController.swift:1140-1194 — These two members are one piece of code written twice and then edited apart: 53 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (49 corresponding lines) · ×1
  • Edited copy of a member (49 corresponding lines) WMF Framework/MWKDataStore+LanguageVariantMigration.swift:110 — WMF Framework/MWKDataStore+LanguageVariantMigration.swift:110-159 | WMF Framework/MWKDataStore+LanguageVariantMigration.swift:161-209 — These two members are one piece of code written twice and then edited apart: 49 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (44 corresponding lines) · ×1
  • Edited copy of a member (44 corresponding lines) Wikipedia/Code/TableOfContentsAnimator.swift:229 — Wikipedia/Code/TableOfContentsAnimator.swift:229-272 | Wikipedia/Code/TableOfContentsAnimator.swift:274-319 — These two members are one piece of code written twice and then edited apart: 44 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (37 corresponding lines) · ×1
  • Edited copy of a member (37 corresponding lines) WMF Framework/Fetcher.swift:296 — WMF Framework/Fetcher.swift:296-332 | WMF Framework/Fetcher.swift:334-374 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (31 corresponding lines) · ×1
  • Edited copy of a member (31 corresponding lines) WMFComponents/Sources/WMFComponents/Components/Reading Challenge Widget/WMFRandomWidgetView.swift:72 — WMFComponents/Sources/WMFComponents/Components/Reading Challenge Widget/WMFRandomWidgetView.swift:72-102 | WMFComponents/Sources/WMFComponents/Components/Reading Challenge Widget/WMFRandomWidgetView.swift:106-143 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (36 corresponding lines) · ×1
  • Edited copy of a member (36 corresponding lines) Wikipedia/Code/Controllers/ShortDescriptionController.swift:153 — Wikipedia/Code/Controllers/ShortDescriptionController.swift:153-188 | Wikipedia/Code/Controllers/ShortDescriptionController.swift:190-233 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 28+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 28+ corresponding lines) Wikipedia/Code/DiscoverReadingListCoordinator.swift:84 — Wikipedia/Code/DiscoverReadingListCoordinator.swift:84-111 | Wikipedia/Code/SavedAllArticlesCoordinator.swift:150-189 | Wikipedia/Code/WhichCameFirstCoordinator.swift:354-383 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 28 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 20+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 20+ corresponding lines) Wikipedia/Code/YearInReviewSlideViewModelFactory.swift:491 — Wikipedia/Code/YearInReviewSlideViewModelFactory.swift:491-516 | Wikipedia/Code/YearInReviewSlideViewModelFactory.swift:542-567 | Wikipedia/Code/YearInReviewSlideViewModelFactory.swift:762-781 | Wikipedia/Code/YearInReviewSlideViewModelFactory.swift:1291-1316 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (40 corresponding lines) · ×1
  • Edited copy of a member (40 corresponding lines) WMF Framework/Remote Notifications/Model/RemoteNotificationFilterType.swift:257 — WMF Framework/Remote Notifications/Model/RemoteNotificationFilterType.swift:257-296 | WMF Framework/Remote Notifications/Model/RemoteNotificationType.swift:85-130 — These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 14+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 14+ corresponding lines) Wikipedia/Code/AnnouncementCollectionViewCell.swift:108 — Wikipedia/Code/AnnouncementCollectionViewCell.swift:108-122 | Wikipedia/Code/AnnouncementCollectionViewCell.swift:134-147 | Wikipedia/Code/ScrollableEducationPanelViewController.swift:254-272 | Wikipedia/Code/ScrollableEducationPanelViewController.swift:281-299 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 21+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 21+ corresponding lines) WMFData/Sources/WMFData/Service/WMFBasicService.swift:230 — WMFData/Sources/WMFData/Service/WMFBasicService.swift:230-252 | WMFData/Sources/WMFData/Service/WMFBasicService.swift:271-291 | WMFData/Sources/WMFData/Service/WMFBasicService.swift:293-315 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 21 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 10+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 10+ corresponding lines) Wikipedia/Code/ArticleLocationCollectionViewController.swift:80 — Wikipedia/Code/ArticleLocationCollectionViewController.swift:80-90 | Wikipedia/Code/NewsViewController.swift:63-77 | Wikipedia/Code/OnThisDayViewController.swift:83-96 | REDACTED:262-277 | Wikipedia/Code/ReadingListsViewController.swift:162-171 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 15+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 15+ corresponding lines) WMF Framework/CacheFileWriterHelper.swift:12 — WMF Framework/CacheFileWriterHelper.swift:12-26 | WMF Framework/CacheFileWriterHelper.swift:38-53 | WMF Framework/CacheFileWriterHelper.swift:101-116 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (7 members, 5+ corresponding lines) · ×1
  • Edited copies of one member (7 members, 5+ corresponding lines) Wikipedia/Code/DescriptionHelpViewController.swift:80 — Wikipedia/Code/DescriptionHelpViewController.swift:80-87 | Wikipedia/Code/LibrariesUsed.swift:75-81 | Wikipedia/Code/WMFAccountCreationViewController.swift:238-242 | Wikipedia/Code/WMFChangePasswordViewController.swift:74-80 | Wikipedia/Code/WMFForgotPasswordViewController.swift:54-60 | Wikipedia/Code/WMFLoginViewController.swift:144-148 | Wikipedia/Code/WMFTwoFactorPasswordViewController.swift:189-195 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 11+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 11+ corresponding lines) WMF Framework/SharedContainerCacheStore.swift:13 — WMF Framework/SharedContainerCacheStore.swift:13-25 | WMF Framework/SharedContainerCacheStore.swift:27-38 | WMF Framework/SharedContainerCacheStore.swift:40-50 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (7 members, 3+ corresponding lines) · ×1
  • Edited copies of one member (7 members, 3+ corresponding lines) Wikipedia/Code/ArticleCollectionViewCell.swift:96 — Wikipedia/Code/ArticleCollectionViewCell.swift:96-98 | Wikipedia/Code/ArticleFullWidthImageCollectionViewCell.swift:70-72 | Wikipedia/Code/ArticleLocationCollectionViewCell.swift:39-41 | Wikipedia/Code/ArticleRightAlignedImageCollectionViewCell.swift:37-39 | Wikipedia/Code/DescriptionEditViewController.swift:253-255 | Wikipedia/Code/EditSaveViewController.swift:118-120 | Wikipedia/Code/ReadingListsCollectionViewCell.swift:69-71 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 13+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 13+ corresponding lines) WMFComponents/Sources/WMFComponents/Components/Settings/Account/WMFAccountSettingsViewModel.swift:36 — WMFComponents/Sources/WMFComponents/Components/Settings/Account/WMFAccountSettingsViewModel.swift:36-52 | WMFComponents/Sources/WMFComponents/Components/Settings/Push Notifications/WMFPushNotificationsSettingsViewModel.swift:46-60 | WMFComponents/Sources/WMFComponents/Components/Settings/Storage and Syncing/WMFStorageAndSyncingSettingsViewModel.swift:38-50 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 7+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 7+ corresponding lines) WMFComponents/Sources/WMFComponents/Components/Watchlist/Filter/WMFWatchlistFilterViewModel.swift:371 — WMFComponents/Sources/WMFComponents/Components/Watchlist/Filter/WMFWatchlistFilterViewModel.swift:371-377 | WMFComponents/Sources/WMFComponents/Components/Watchlist/Filter/WMFWatchlistFilterViewModel.swift:379-386 | WMFComponents/Sources/WMFComponents/Components/Watchlist/Filter/WMFWatchlistFilterViewModel.swift:388-395 | WMFComponents/Sources/WMFComponents/Components/Watchlist/Filter/WMFWatchlistFilterViewModel.swift:397-404 | WMFComponents/Sources/WMFComponents/Components/Watchlist/Filter/WMFWatchlistFilterViewModel.swift:406-413 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 17+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 17+ corresponding lines) Wikipedia/Code/NotificationsCenterCellViewModel+SheetActionExtensions.swift:90 — Wikipedia/Code/NotificationsCenterCellViewModel+SheetActionExtensions.swift:90-110 | Wikipedia/Code/NotificationsCenterCellViewModel+SheetActionExtensions.swift:112-132 | Wikipedia/Code/NotificationsCenterCellViewModel+SheetActionExtensions.swift:192-214 | Wikipedia/Code/NotificationsCenterDetailViewModel+ActionExtensions.swift:159-175 | Wikipedia/Code/NotificationsCenterDetailViewModel+ActionExtensions.swift:195-211 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 9+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 9+ corresponding lines) WMFComponents/Sources/WMFComponents/Components/Settings/Storage and Syncing/WMFStorageAndSyncingSettingsViewModel.swift:16 — WMFComponents/Sources/WMFComponents/Components/Settings/Storage and Syncing/WMFStorageAndSyncingSettingsViewModel.swift:16-24 | WMFComponents/Sources/WMFComponents/Components/Settings/Year In Review/WMFYearInReviewSettingsViewModel.swift:16-24 | WMFComponents/Sources/WMFComponents/Components/Suggested Edits/Image Recommendations/WMFImageRecommendationsViewModel.swift:31-41 | WMFComponents/Sources/WMFComponents/Components/Year in Review/WMFYearInReviewHighlights.swift:18-27 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 3+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 3+ corresponding lines) Wikipedia/Code/ReadingListsFunnel.swift:92 — Wikipedia/Code/ReadingListsFunnel.swift:92-94 | Wikipedia/Code/ReadingListsFunnel.swift:104-106 | Wikipedia/Code/ReadingListsFunnel.swift:108-110 | Wikipedia/Code/ReadingListsFunnel.swift:112-115 | Wikipedia/Code/ReadingListsFunnel.swift:117-120 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 5+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 5+ corresponding lines) WMF Framework/Configuration.swift:245 — WMF Framework/Configuration.swift:245-250 | WMF Framework/Configuration.swift:280-285 | WMF Framework/Configuration.swift:289-294 | WMF Framework/Configuration.swift:298-302 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 10+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 10+ corresponding lines) Widgets/Widgets/FeaturedArticleWidget.swift:11 — Widgets/Widgets/FeaturedArticleWidget.swift:11-20 | Widgets/Widgets/OnThisDayWidget.swift:12-21 | Widgets/Widgets/PictureOfTheDayWidget.swift:11-20 | Widgets/Widgets/TopReadWidget.swift:11-20 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 12+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 12+ corresponding lines) WMFComponents/Sources/WMFComponents/Components/Developer Settings/WMFDeveloperSettingsViewModel.swift:299 — WMFComponents/Sources/WMFComponents/Components/Developer Settings/WMFDeveloperSettingsViewModel.swift:299-310 | WMFComponents/Sources/WMFComponents/Components/Developer Settings/WMFDeveloperSettingsViewModel.swift:335-346 | WMFComponents/Sources/WMFComponents/Components/Developer Settings/WMFDeveloperSettingsViewModel.swift:350-361 | WMFComponents/Sources/WMFComponents/Components/Developer Settings/WMFDeveloperSettingsViewModel.swift:363-374 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 17+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 17+ corresponding lines) Wikipedia/Code/NotificationsCenterCellViewModel+SheetActionExtensions.swift:72 — Wikipedia/Code/NotificationsCenterCellViewModel+SheetActionExtensions.swift:72-88 | Wikipedia/Code/NotificationsCenterCellViewModel+SheetActionExtensions.swift:216-232 | Wikipedia/Code/NotificationsCenterCellViewModel+SheetActionExtensions.swift:294-311 | Wikipedia/Code/NotificationsCenterDetailViewModel+ActionExtensions.swift:237-254 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 8+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 8+ corresponding lines) Wikipedia/Code/ArticleCollectionViewController.swift:163 — Wikipedia/Code/ArticleCollectionViewController.swift:163-170 | Wikipedia/Code/ExploreViewController.swift:582-590 | REDACTED:336-346 | Wikipedia/Code/ReadingListsViewController.swift:302-309 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 7+ corresponding lines) · ×1
  • Edited copies of one member (6 members, 7+ corresponding lines) Wikipedia/Code/EditInteractionFunnel.swift:126 — Wikipedia/Code/EditInteractionFunnel.swift:126-132 | Wikipedia/Code/EditInteractionFunnel.swift:134-140 | Wikipedia/Code/EditInteractionFunnel.swift:142-148 | Wikipedia/Code/EditInteractionFunnel.swift:154-161 | Wikipedia/Code/EditInteractionFunnel.swift:210-217 | Wikipedia/Code/EditInteractionFunnel.swift:219-226 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 8+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 8+ corresponding lines) Wikipedia/Code/ArticleViewController.swift:533 — Wikipedia/Code/ArticleViewController.swift:533-540 | Wikipedia/Code/ExploreViewController.swift:278-288 | Wikipedia/Code/PlacesViewController.swift:456-466 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 4+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 4+ corresponding lines) WMFComponents/Sources/WMFComponents/Components/Settings/Editing Preferences/WMFEditingPreferencesSettingsViewController.swift:25 — WMFComponents/Sources/WMFComponents/Components/Settings/Editing Preferences/WMFEditingPreferencesSettingsViewController.swift:25-40 | WMFComponents/Sources/WMFComponents/Components/Settings/Home/Community/WMFHomeFeedCommunitySettingsViewController.swift:21-24 | WMFComponents/Sources/WMFComponents/Components/Settings/Home/For You/WMFHomeFeedForYouSettingsViewController.swift:21-24 | WMFComponents/Sources/WMFComponents/Components/Settings/Home/Main/WMFHomeFeedSettingsViewController.swift:24-27 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 14+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 14+ corresponding lines) Wikipedia/Code/ActivityTabViewController.swift:330 — Wikipedia/Code/ActivityTabViewController.swift:330-345 | Wikipedia/Code/ExploreViewController.swift:98-111 | Wikipedia/Code/SettingsTabViewController.swift:39-57 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 6+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 6+ corresponding lines) Wikipedia/Code/ArticleFetchedResultsViewController.swift:108 — Wikipedia/Code/ArticleFetchedResultsViewController.swift:108-113 | REDACTED:329-334 | Wikipedia/Code/ReadingListsViewController.swift:295-300 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (8 members, 3+ corresponding lines) · ×1
  • Edited copies of one member (8 members, 3+ corresponding lines) Wikipedia/Code/ArticleCollectionViewController.swift:133 — Wikipedia/Code/ArticleCollectionViewController.swift:133-135 | Wikipedia/Code/ArticleLocationCollectionViewController.swift:92-94 | Wikipedia/Code/ColumnarCollectionViewController.swift:373-375 | Wikipedia/Code/NewsViewController.swift:51-53 | Wikipedia/Code/OnThisDayViewController.swift:28-30 | Wikipedia/Code/PageHistoryViewController.swift:632-634 | REDACTED:279-281 | Wikipedia/Code/ReadingListsViewController.swift:177-179 — These 8 members are one piece of code written 8 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 8 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (48–49 lines × 2) · ×1
  • Duplicated block (48–49 lines × 2) Wikipedia/Code/TempAccountSheetCoordinator.swift:72 — Wikipedia/Code/TempAccountSheetCoordinator.swift:72-119 | Wikipedia/Code/TempAccountSheetCoordinator.swift:138-186 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/TempAccountSheetCoordinator.swift:72` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (44–45 lines × 3) · ×1
  • Duplicated block (44–45 lines × 3) WMFComponents/Sources/WMFComponents/Components/Profile/WMFProfileViewModel.swift:165 — WMFComponents/Sources/WMFComponents/Components/Profile/WMFProfileViewModel.swift:165-209 | WMFComponents/Sources/WMFComponents/Components/Profile/WMFProfileViewModel.swift:297-340 | WMFComponents/Sources/WMFComponents/Components/Profile/WMFProfileViewModel.swift:389-433 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (42 lines × 2) · ×1
  • Duplicated block (42 lines × 2) Wikipedia/Code/NotificationsCenterCellViewModel+SheetActionExtensions.swift:18 — Wikipedia/Code/NotificationsCenterCellViewModel+SheetActionExtensions.swift:18-59 | Wikipedia/Code/NotificationsCenterDetailViewModel+ActionExtensions.swift:82-123 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/NotificationsCenterCellViewModel+SheetActionExtensions.swift:18` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (37–38 lines × 2) · ×1
  • Duplicated block (37–38 lines × 2) WMFData/Sources/WMFData/Service/WMFBasicService.swift:109 — WMFData/Sources/WMFData/Service/WMFBasicService.swift:109-145 | WMFData/Sources/WMFData/Service/WMFBasicService.swift:183-220 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (33 lines × 2) · ×1
  • Duplicated block (33 lines × 2) Wikipedia/Code/ArticleViewController.swift:604 — Wikipedia/Code/ArticleViewController.swift:604-636 | Wikipedia/Code/ExploreViewController.swift:1159-1191 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/ArticleViewController.swift:604` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (29 lines × 2) · ×1
  • Duplicated block (29 lines × 2) WMFComponents/Sources/WMFComponents/Components/Reading Challenge Widget/WMFRandomWidgetView.swift:73 — WMFComponents/Sources/WMFComponents/Components/Reading Challenge Widget/WMFRandomWidgetView.swift:73-101 | WMFComponents/Sources/WMFComponents/Components/Reading Challenge Widget/WMFRandomWidgetView.swift:110-138 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `WMFComponents/Sources/WMFComponents/Components/Reading Challenge Widget/WMFRandomWidgetView.swift:108` calls `min` and `WMFComponents/Sources/WMFComponents/Components/Reading Challenge Widget/WMFRandomWidgetView.swift:72` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (26–27 lines × 2) · ×1
  • Duplicated block (26–27 lines × 2) Wikipedia/Code/Session.swift:547 — Wikipedia/Code/Session.swift:547-572 | Wikipedia/Code/Session.swift:578-604 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/Session.swift:547` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (24–26 lines × 2) · ×1
  • Duplicated block (24–26 lines × 2) Wikipedia/Code/DiffContainerViewController.swift:917 — Wikipedia/Code/DiffContainerViewController.swift:917-940 | Wikipedia/Code/DiffContainerViewController.swift:943-968 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/DiffContainerViewController.swift:917` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (25 lines × 5) · ×1
  • Duplicated block (25 lines × 5) WMFComponents/Sources/WMFComponents/Components/Settings/Account/WMFAccountSettingsView.swift:19 — WMFComponents/Sources/WMFComponents/Components/Settings/Account/WMFAccountSettingsView.swift:19-43 | WMFComponents/Sources/WMFComponents/Components/Settings/Push Notifications/WMFPushNotificationsSettingsView.swift:19-43 | WMFComponents/Sources/WMFComponents/Components/Settings/Search/WMFSearchSettingsView.swift:19-43 | WMFComponents/Sources/WMFComponents/Components/Settings/Storage and Syncing/WMFStorageAndSyncingSettingsView.swift:19-43 | WMFComponents/Sources/WMFComponents/Components/Settings/Year In Review/WMFYearInReviewSettingsView.swift:19-43 — before extracting anything, compare `WMFComponents/Sources/WMFComponents/Components/Settings/Account/WMFAccountSettingsView.swift` and `WMFComponents/Sources/WMFComponents/Components/Settings/Push Notifications/WMFPushNotificationsSettingsView.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `WMFComponents/Sources/WMFComponents/Components/Settings/Account/WMFAccountSettingsView.swift:19` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `viewModel` to `WMFAccountSettingsViewModel` in one and `WMFPushNotificationsSettingsViewModel` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (25 lines × 2) · ×1
  • Duplicated block (25 lines × 2) Wikipedia/Code/SettingsCoordinator.swift:85 — Wikipedia/Code/SettingsCoordinator.swift:85-109 | Wikipedia/Code/WMFAppViewController+Extensions.swift:1341-1365 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/WMFAppViewController+Extensions.swift:1341` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (15–20 lines × 2) · ×1
  • Duplicated block (15–20 lines × 2) WMFComponents/Sources/WMFComponents/Components/Settings/WMFSettingsViewController.swift:41 — WMFComponents/Sources/WMFComponents/Components/Settings/WMFSettingsViewController.swift:41-55 | Wikipedia/Code/Database Population/DatabasePopulationHostingController.swift:26-45 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `WMFComponents/Sources/WMFComponents/Components/Settings/WMFSettingsViewController.swift:41` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (14–19 lines × 2) · ×1
  • Duplicated block (14–19 lines × 2) WMFComponents/Sources/WMFComponents/Components/Games/Splash Screen/WMFGamesSplashScreenViewController.swift:40 — WMFComponents/Sources/WMFComponents/Components/Games/Splash Screen/WMFGamesSplashScreenViewController.swift:40-58 | Wikipedia/Code/WMFWhichCameFirstArchiveViewController.swift:37-50 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `WMFComponents/Sources/WMFComponents/Components/Games/Splash Screen/WMFGamesSplashScreenViewController.swift:40` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×1
  • Duplicated block (18 lines × 2) Wikipedia/Code/ArticleCollectionViewController.swift:197 — Wikipedia/Code/ArticleCollectionViewController.swift:197-214 | Wikipedia/Code/ExploreCardViewController.swift:570-587 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (15–16 lines × 3) · ×1
  • Duplicated block (15–16 lines × 3) WMFComponents/Sources/WMFComponents/Components/Settings/Home/For You/Whats Driving/WMFHomeFeedWhatsDrivingSettingsView.swift:26 — WMFComponents/Sources/WMFComponents/Components/Settings/Home/For You/Whats Driving/WMFHomeFeedWhatsDrivingSettingsView.swift:26-41 | WMFComponents/Sources/WMFComponents/Components/Settings/Home/Main/WMFHomeFeedSettingsView.swift:21-35 | WMFComponents/Sources/WMFComponents/Components/Settings/WMFSettingsView.swift:108-123 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `WMFComponents/Sources/WMFComponents/Components/Settings/Home/For You/Whats Driving/WMFHomeFeedWhatsDrivingSettingsView.swift:26` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `WMFComponents/Sources/WMFComponents/Components/Settings/WMFSettingsView.swift:124` calls `ignoresSafeArea` and `WMFComponents/Sources/WMFComponents/Components/Settings/Home/For You/Whats Driving/WMFHomeFeedWhatsDrivingSettingsView.swift:42` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (13 lines × 6) · ×1
  • Duplicated block (13 lines × 6) WMFComponents/Sources/WMFComponents/Components/Settings/Account/WMFAccountSettingsView.swift:31 — WMFComponents/Sources/WMFComponents/Components/Settings/Account/WMFAccountSettingsView.swift:31-43 | WMFComponents/Sources/WMFComponents/Components/Settings/Home/For You/WMFHomeFeedForYouSettingsView.swift:22-34 | WMFComponents/Sources/WMFComponents/Components/Settings/Push Notifications/WMFPushNotificationsSettingsView.swift:31-43 | WMFComponents/Sources/WMFComponents/Components/Settings/Search/WMFSearchSettingsView.swift:31-43 | WMFComponents/Sources/WMFComponents/Components/Settings/Storage and Syncing/WMFStorageAndSyncingSettingsView.swift:31-43 | WMFComponents/Sources/WMFComponents/Components/Settings/Year In Review/WMFYearInReviewSettingsView.swift:31-43 — before extracting anything, compare `WMFComponents/Sources/WMFComponents/Components/Settings/Account/WMFAccountSettingsView.swift` and `WMFComponents/Sources/WMFComponents/Components/Settings/Push Notifications/WMFPushNotificationsSettingsView.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `WMFComponents/Sources/WMFComponents/Components/Settings/Account/WMFAccountSettingsView.swift:31` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `WMFComponents/Sources/WMFComponents/Components/Settings/Account/WMFAccountSettingsView.swift:44` calls `navigationTitle`, `navigationBarTitleDisplayMode` and `WMFComponents/Sources/WMFComponents/Components/Settings/Home/For You/WMFHomeFeedForYouSettingsView.swift:35` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (12–13 lines × 5) · ×1
  • Duplicated block (12–13 lines × 5) Wikipedia/Code/ActivityTabFunnel.swift:63 — Wikipedia/Code/ActivityTabFunnel.swift:63-74 | Wikipedia/Code/ArticleTabsFunnel.swift:66-77 | Wikipedia/Code/DonateFunnel.swift:117-129 | Wikipedia/Code/EditInteractionFunnel.swift:80-92 | Wikipedia/Code/ImageRecommendationsFunnel.swift:85-97 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 5 call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (12–13 lines × 2) · ×1
  • Duplicated block (12–13 lines × 2) WMF Framework/ReadingListsAPIController.swift:287 — WMF Framework/ReadingListsAPIController.swift:287-298 | WMF Framework/ReadingListsAPIController.swift:350-362 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `WMF Framework/ReadingListsAPIController.swift:287` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `completion` to `@escaping (_ listIDs: []?,_ error: Error?) -> Swift.Void` in one and `@escaping (_ entryIDs: []?,_ error: Error?) -> Swift.Void` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (12 lines × 8) · ×1
  • Duplicated block (12 lines × 8) WMFComponents/Sources/WMFComponents/Components/Settings/Account/WMFAccountSettingsView.swift:16 — WMFComponents/Sources/WMFComponents/Components/Settings/Account/WMFAccountSettingsView.swift:16-27 | WMFComponents/Sources/WMFComponents/Components/Settings/Home/Community/WMFHomeFeedCommunitySettingsView.swift:14-25 | WMFComponents/Sources/WMFComponents/Components/Settings/Home/For You/WMFHomeFeedForYouSettingsView.swift:14-25 | WMFComponents/Sources/WMFComponents/Components/Settings/Home/For You/Whats Driving/WMFHomeFeedWhatsDrivingSettingsView.swift:14-25 | WMFComponents/Sources/WMFComponents/Components/Settings/Push Notifications/WMFPushNotificationsSettingsView.swift:16-27 | WMFComponents/Sources/WMFComponents/Components/Settings/Search/WMFSearchSettingsView.swift:16-27 | WMFComponents/Sources/WMFComponents/Components/Settings/Storage and Syncing/WMFStorageAndSyncingSettingsView.swift:16-27 | WMFComponents/Sources/WMFComponents/Components/Settings/Year In Review/WMFYearInReviewSettingsView.swift:16-27 — before extracting anything, compare `WMFComponents/Sources/WMFComponents/Components/Settings/Account/WMFAccountSettingsView.swift` and `WMFComponents/Sources/WMFComponents/Components/Settings/Push Notifications/WMFPushNotificationsSettingsView.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `WMFComponents/Sources/WMFComponents/Components/Settings/Account/WMFAccountSettingsView.swift:16` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind `viewModel` to `WMFAccountSettingsViewModel` in one and `WMFHomeFeedCommunitySettingsViewModel` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (9–12 lines × 4) · ×1
  • Duplicated block (9–12 lines × 4) Wikipedia/Code/DescriptionEditViewController.swift:147 — Wikipedia/Code/DescriptionEditViewController.swift:147-155 | Wikipedia/Code/DescriptionEditViewController.swift:170-178 | Wikipedia/Code/EditSaveViewController.swift:262-273 | Wikipedia/Code/EditSaveViewController.swift:296-307 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/DescriptionEditViewController.swift:147` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (12 lines × 4) · ×1
  • Duplicated block (12 lines × 4) Wikipedia/Code/TalkPageCellCommentView.swift:205 — Wikipedia/Code/TalkPageCellCommentView.swift:205-216 | Wikipedia/Code/TalkPageCellTopicView.swift:484-495 | Wikipedia/Code/TalkPageCoffeeRollView.swift:113-124 | Wikipedia/Code/TalkPageReplyComposeContentView.swift:428-439 — before extracting anything, compare `Wikipedia/Code/TalkPageCellCommentView.swift` and `Wikipedia/Code/TalkPageCellTopicView.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (10–12 lines × 2) · ×1
  • Duplicated block (10–12 lines × 2) Wikipedia/Code/ViewControllerRouter.swift:248 — Wikipedia/Code/ViewControllerRouter.swift:248-259 | Wikipedia/Code/WMFAppViewController+Extensions.swift:443-452 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (10–11 lines × 3) · ×1
  • Duplicated block (10–11 lines × 3) Wikipedia/Code/AppOnboardingCoordinator.swift:184 — Wikipedia/Code/AppOnboardingCoordinator.swift:184-193 | Wikipedia/Code/HomeFeedSettingsCoordinator.swift:96-105 | Wikipedia/Code/HomeFeedSettingsCoordinator.swift:181-191 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/AppOnboardingCoordinator.swift:184` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11 lines × 3) · ×1
  • Duplicated block (11 lines × 3) Wikipedia/Code/DonateCoordinator.swift:651 — Wikipedia/Code/DonateCoordinator.swift:651-661 | Wikipedia/Code/DonateCoordinator.swift:665-675 | Wikipedia/Code/DonateCoordinator.swift:678-688 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (8–11 lines × 2) · ×1
  • Duplicated block (8–11 lines × 2) WMFComponents/Sources/WMFComponents/Components/Search/Results/WMFSearchResultsViewModel.swift:289 — WMFComponents/Sources/WMFComponents/Components/Search/Results/WMFSearchResultsViewModel.swift:289-299 | WMFComponents/Sources/WMFComponents/Utility/UIImage+FaceCrop.swift:33-40 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `WMFComponents/Sources/WMFComponents/Components/Search/Results/WMFSearchResultsViewModel.swift:289` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (9–11 lines × 2) · ×1
  • Duplicated block (9–11 lines × 2) Wikipedia/Code/TalkPageFetcher.swift:199 — Wikipedia/Code/TalkPageFetcher.swift:199-209 | Wikipedia/Code/TalkPageFetcher.swift:222-230 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/TalkPageFetcher.swift:199` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (10 lines × 4) · ×1
  • Duplicated block (10 lines × 4) WMFData/Sources/WMFData/Data Controllers/Watchlist/WMFWatchlistDataController.swift:338 — WMFData/Sources/WMFData/Data Controllers/Watchlist/WMFWatchlistDataController.swift:338-347 | WMFData/Sources/WMFData/Data Controllers/Watchlist/WMFWatchlistDataController.swift:379-388 | WMFData/Sources/WMFData/Data Controllers/Watchlist/WMFWatchlistDataController.swift:421-430 | WMFData/Sources/WMFData/Data Controllers/Watchlist/WMFWatchlistDataController.swift:471-480 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `WMFData/Sources/WMFData/Data Controllers/Watchlist/WMFWatchlistDataController.swift:338` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note first that the copies are not typed on the same thing: the declarations holding them bind `completion` to `@escaping @Sendable (Result<Void, Error>) -> Void` in one and `@escaping @Sendable (Result<WMFUndoOrRollbackResult, Error>) -> Void` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `WMFData/Sources/WMFData/Data Controllers/Watchlist/WMFWatchlistDataController.swift:469` calls `String` and `WMFData/Sources/WMFData/Data Controllers/Watchlist/WMFWatchlistDataController.swift:378` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (6–10 lines × 4) · ×1
  • Duplicated block (6–10 lines × 4) Wikipedia/Code/ActivityTabViewController.swift:113 — Wikipedia/Code/ActivityTabViewController.swift:113-122 | Wikipedia/Code/ExploreViewController.swift:141-146 | Wikipedia/Code/PlacesViewController.swift:201-211 | Wikipedia/Code/SearchViewController.swift:385-394 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/ActivityTabViewController.swift:113` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (7–10 lines × 3) · ×1
  • Duplicated block (7–10 lines × 3) Wikipedia/Code/ArticlePeekPreviewViewController.swift:158 — Wikipedia/Code/ArticlePeekPreviewViewController.swift:158-167 | Wikipedia/Code/SavedAllArticlesCoordinator.swift:167-176 | Wikipedia/Code/WhichCameFirstCoordinator.swift:366-372 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/ArticlePeekPreviewViewController.swift:158` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Wikipedia/Code/ArticlePeekPreviewViewController.swift:157` calls `WMFArticle` and `Wikipedia/Code/WhichCameFirstCoordinator.swift:365` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (2–10 lines × 6) · ×1
  • Duplicated block (2–10 lines × 6) WMFComponents/Sources/WMFComponents/Components/Analytics Inspector/WMFAnalyticsInspectorViewController.swift:45 — WMFComponents/Sources/WMFComponents/Components/Analytics Inspector/WMFAnalyticsInspectorViewController.swift:45-46 | WMFComponents/Sources/WMFComponents/Components/Developer Settings/WMFDeveloperSettingsViewController.swift:43-44 | WMFComponents/Sources/WMFComponents/Components/Editors/Choose Editor/WMFChooseEditorHostingController.swift:24-25 | WMFComponents/Sources/WMFComponents/Components/Games/Which Came First/Core/WMFWhichCameFirstViewController.swift:68-83 | WMFComponents/Sources/WMFComponents/Components/Search/Semantic Search Info/WMFSemanticSearchInfoHostingController.swift:33-42 | Wikipedia/Code/TalkPageTopicComposeViewController.swift:214-216 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 6 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 6 times. Read the line range as the matched WINDOW rather than a finished unit: at `WMFComponents/Sources/WMFComponents/Components/Analytics Inspector/WMFAnalyticsInspectorViewController.swift:45` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (7–10 lines × 2) · ×1
  • Duplicated block (7–10 lines × 2) WMFComponents/Sources/WMFComponents/Components/Home/WMFForYouEndOfFeedCardView.swift:124 — WMFComponents/Sources/WMFComponents/Components/Home/WMFForYouEndOfFeedCardView.swift:124-133 | WMFComponents/Sources/WMFComponents/Components/Home/WMFForYouView.swift:930-936 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `WMFComponents/Sources/WMFComponents/Components/Home/WMFForYouEndOfFeedCardView.swift:124` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9–10 lines × 2) · ×1
  • Duplicated block (9–10 lines × 2) Wikipedia/Code/ActivityTabViewController.swift:165 — Wikipedia/Code/ActivityTabViewController.swift:165-174 | Wikipedia/Code/HomeViewController.swift:407-415 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/ActivityTabViewController.swift:165` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7–9 lines × 3) · ×1
  • Duplicated block (7–9 lines × 3) WMFData/Sources/WMFData/Data Controllers/Shared/WMFPageTopicsDataController.swift:34 — WMFData/Sources/WMFData/Data Controllers/Shared/WMFPageTopicsDataController.swift:34-42 | WMFData/Sources/WMFData/Data Controllers/Shared/WMFPageTopicsDataController.swift:287-295 | WMFData/Sources/WMFData/Data Controllers/Shared/WMFPageViewsDataController.swift:262-268 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `WMFData/Sources/WMFData/Data Controllers/Shared/WMFPageTopicsDataController.swift:34` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (8 lines × 4) · ×1
  • Duplicated block (8 lines × 4) Wikipedia/Code/ArticleLocationCollectionViewController.swift:219 — Wikipedia/Code/ArticleLocationCollectionViewController.swift:219-226 | Wikipedia/Code/ColumnarCollectionViewController.swift:508-515 | Wikipedia/Code/NewsViewController.swift:260-267 | Wikipedia/Code/OnThisDayViewController.swift:263-270 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/ArticleLocationCollectionViewController.swift:219` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (5–7 lines × 3) · ×1
  • Duplicated block (5–7 lines × 3) Wikipedia/Code/DescriptionEditViewController.swift:157 — Wikipedia/Code/DescriptionEditViewController.swift:157-163 | Wikipedia/Code/WMFAccountCreationViewController.swift:135-139 | Wikipedia/Code/WMFLoginViewController.swift:115-119 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/DescriptionEditViewController.swift:157` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (6 lines × 5) · ×1
  • Duplicated block (6 lines × 5) WMFData/Sources/WMFData/Data Controllers/Home/WMFPageInterestDataController.swift:64 — WMFData/Sources/WMFData/Data Controllers/Home/WMFPageInterestDataController.swift:64-72 | WMFData/Sources/WMFData/Data Controllers/Home/WMFPageInterestDataController.swift:97-105 | WMFData/Sources/WMFData/Data Controllers/Shared/WMFCategoriesDataController.swift:24-31 | WMFData/Sources/WMFData/Data Controllers/Shared/WMFPageTopicsDataController.swift:287-293 | WMFData/Sources/WMFData/Data Controllers/Shared/WMFPageViewsDataController.swift:262-267 — there are 5 copies across 4 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `WMFData/Sources/WMFData/Data Controllers/Home/WMFPageInterestDataController.swift:64` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (6 lines × 4) · ×1
  • Duplicated block (6 lines × 4) WMFData/Sources/WMFData/Data Controllers/Shared/WMFPageViewsDataController.swift:382 — WMFData/Sources/WMFData/Data Controllers/Shared/WMFPageViewsDataController.swift:382-387 | WMFData/Sources/WMFData/Data Controllers/Shared/WMFPageViewsDataController.swift:448-455 | WMFData/Sources/WMFData/Data Controllers/Shared/WMFPageViewsDataController.swift:555-560 | WMFData/Sources/WMFData/Data Controllers/Shared/WMFPageViewsDataController.swift:615-620 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `WMFData/Sources/WMFData/Data Controllers/Shared/WMFPageViewsDataController.swift:382` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (1–6 lines × 4) · ×1
  • Duplicated block (1–6 lines × 4) Wikipedia/Code/ActivityTabViewController.swift:591 — Wikipedia/Code/ActivityTabViewController.swift:591-599 | Wikipedia/Code/ExploreViewController.swift:1694-1699 | Wikipedia/Code/HelpViewController.swift:139-139 | Wikipedia/Code/YearInReviewCoordinator.swift:559-567 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/ActivityTabViewController.swift:591` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (8–9 lines × 2) · ×1
  • Duplicated block (8–9 lines × 2) Wikipedia/Code/ExploreViewController.swift:1037 — Wikipedia/Code/ExploreViewController.swift:1037-1044 | Wikipedia/Code/ExploreViewController.swift:1054-1062 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/ExploreViewController.swift:1037` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (6–7 lines × 2) · ×1
  • Duplicated block (6–7 lines × 2) Wikipedia/Code/UIViewController+Extensions.swift:52 — Wikipedia/Code/UIViewController+Extensions.swift:52-58 | Wikipedia/Code/UIViewController+Extensions.swift:68-73 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Wikipedia/Code/UIViewController+Extensions.swift:52` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Wikipedia/Code/UIViewController+Extensions.swift:50` calls `dismiss` and `Wikipedia/Code/UIViewController+Extensions.swift:67` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (2–5 lines × 4) · ×1
  • Duplicated block (2–5 lines × 4) WMFData/Sources/WMFData/Utility/WMFWikitextUtils.swift:239 — WMFData/Sources/WMFData/Utility/WMFWikitextUtils.swift:239-240 | WMFData/Sources/WMFData/Utility/WMFWikitextUtils.swift:241-245 | WMFData/Sources/WMFData/Utility/WMFWikitextUtils.swift:247-251 | WMFData/Sources/WMFData/Utility/WMFWikitextUtils.swift:252-255 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `WMFData/Sources/WMFData/Utility/WMFWikitextUtils.swift:239` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `WMFData/Sources/WMFData/Utility/WMFWikitextUtils.swift:251` calls `NSRegularExpression`, `matches`, `NSRange` and `WMFData/Sources/WMFData/Utility/WMFWikitextUtils.swift:240` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (7 lines × 9) · ×1
  • Duplicated block (7 lines × 9) WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/WMFYearInReviewViewCountSlideDataController.swift:60 — WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/WMFYearInReviewViewCountSlideDataController.swift:60-66 | WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewBiggestReadingDaySlideDataController.swift:182-189 | WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewDaysVisitedSlideDataController.swift:74-81 | WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewLongestReadSlideDataController.swift:179-186 | WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewMostViewedArticlesSlideDataController.swift:71-77 | WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewRabbitHolesSlideDataController.swift:151-158 | WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewReadingStreakSlideDataController.swift:119-126 | WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewTopArticlesSlideDataController.swift:136-143 | WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewTopTopicsSlideDataController.swift:236-243 — before extracting anything, compare `WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewBiggestReadingDaySlideDataController.swift` and `WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewLongestReadSlideDataController.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 55 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (7 lines × 5) · ×1
  • Duplicated block (7 lines × 5) Wikipedia/Code/ArticleViewController+Editing.swift:364 — Wikipedia/Code/ArticleViewController+Editing.swift:364-370 | Wikipedia/Code/DescriptionEditViewController.swift:40-46 | Wikipedia/Code/TempAccountSheetCoordinator.swift:38-44 | Wikipedia/Code/TempAccountSheetCoordinator.swift:45-51 | Wikipedia/Code/TempAccountSheetCoordinator.swift:53-59 — there are 5 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×1
  • Duplicated block (5 lines × 3) Wikipedia/Code/Advanced Settings/InsertMediaImagePositionSettingsViewController.swift:55 — Wikipedia/Code/Advanced Settings/InsertMediaImagePositionSettingsViewController.swift:55-59 | Wikipedia/Code/Advanced Settings/InsertMediaImageSizeSettingsViewController.swift:95-99 | Wikipedia/Code/Advanced Settings/InsertMediaImageTypeSettingsViewController.swift:55-59 — before extracting anything, compare `Wikipedia/Code/Advanced Settings/InsertMediaImagePositionSettingsViewController.swift` and `Wikipedia/Code/Advanced Settings/InsertMediaImageTypeSettingsViewController.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (13 lines × 4) · ×1
  • Duplicated block (13 lines × 4) Wikipedia/Code/NotificationsCenterCellViewModel+SheetActionExtensions.swift:260 — Wikipedia/Code/NotificationsCenterCellViewModel+SheetActionExtensions.swift:260-272 | Wikipedia/Code/NotificationsCenterDetailViewModel+ActionExtensions.swift:145-157 | Wikipedia/Code/NotificationsCenterDetailViewModel+ActionExtensions.swift:213-225 | Wikipedia/Code/NotificationsCenterDetailViewModel+ActionExtensions.swift:313-325 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (14–15 lines × 4) · ×1
  • Duplicated block (14–15 lines × 4) WMFData/Sources/WMFDataMocks/WMFMockBasicService.swift:175 — WMFData/Sources/WMFDataMocks/WMFMockBasicService.swift:175-188 | WMFData/Sources/WMFDataMocks/WMFMockBasicService.swift:199-212 | WMFData/Sources/WMFDataMocks/WMFMockGrowthTasksService.swift:109-123 | WMFData/Sources/WMFDataMocks/WMFMockWatchlistMediaWikiService.swift:155-168 — before extracting anything, compare `WMFData/Sources/WMFDataMocks/WMFMockBasicService.swift` and `WMFData/Sources/WMFDataMocks/WMFMockGrowthTasksService.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (14–15 lines × 3) · ×1
  • Duplicated block (14–15 lines × 3) WMFData/Sources/WMFDataMocks/WMFMockBasicService.swift:158 — WMFData/Sources/WMFDataMocks/WMFMockBasicService.swift:158-171 | WMFData/Sources/WMFDataMocks/WMFMockGrowthTasksService.swift:92-106 | WMFData/Sources/WMFDataMocks/WMFMockWatchlistMediaWikiService.swift:138-151 — before extracting anything, compare `WMFData/Sources/WMFDataMocks/WMFMockBasicService.swift` and `WMFData/Sources/WMFDataMocks/WMFMockGrowthTasksService.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (6–8 lines × 4) · ×1
  • Duplicated block (6–8 lines × 4) WMFData/Sources/WMFDataMocks/WMFMockGrowthTasksService.swift:12 — WMFData/Sources/WMFDataMocks/WMFMockGrowthTasksService.swift:12-17 | WMFData/Sources/WMFDataMocks/WMFMockGrowthTasksService.swift:25-30 | WMFData/Sources/WMFDataMocks/WMFMockGrowthTasksService.swift:38-43 | WMFData/Sources/WMFDataMocks/WMFMockWatchlistMediaWikiService.swift:75-82 — before extracting anything, compare `WMFData/Sources/WMFDataMocks/WMFMockGrowthTasksService.swift` and `WMFData/Sources/WMFDataMocks/WMFMockWatchlistMediaWikiService.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (7–8 lines × 4) · ×1
  • Duplicated block (7–8 lines × 4) WMFData/Sources/WMFDataMocks/WMFMockWatchlistMediaWikiService.swift:7 — WMFData/Sources/WMFDataMocks/WMFMockWatchlistMediaWikiService.swift:7-14 | WMFData/Sources/WMFDataMocks/WMFMockWatchlistMediaWikiService.swift:18-25 | WMFData/Sources/WMFDataMocks/WMFMockWatchlistMediaWikiService.swift:59-66 | WMFData/Sources/WMFDataMocks/WMFMockWatchlistMediaWikiService.swift:97-103 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `WMFData/Sources/WMFDataMocks/WMFMockWatchlistMediaWikiService.swift:7` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (5 lines × 5) · ×1
  • Duplicated block (5 lines × 5) WMFData/Sources/WMFDataMocks/WMFMockGrowthTasksService.swift:12 — WMFData/Sources/WMFDataMocks/WMFMockGrowthTasksService.swift:12-17 | WMFData/Sources/WMFDataMocks/WMFMockGrowthTasksService.swift:25-30 | WMFData/Sources/WMFDataMocks/WMFMockGrowthTasksService.swift:38-43 | WMFData/Sources/WMFDataMocks/WMFMockWatchlistMediaWikiService.swift:75-80 | WMFData/Sources/WMFDataMocks/WMFMockWatchlistMediaWikiService.swift:110-114 — before extracting anything, compare `WMFData/Sources/WMFDataMocks/WMFMockGrowthTasksService.swift` and `WMFData/Sources/WMFDataMocks/WMFMockWatchlistMediaWikiService.swift` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
PF3 · Async & latency hygiene · Sync-over-async blocking · ×1
  • Sync-over-async blocking WMFComponents/Sources/WMFComponents/Components/App Onboarding/WMFAppOnboardingViewModel.swift:237 — `sleep` is async and calls sleep — a blocking call inside async code stalls the cooperative pool's thread — one per core — and every task scheduled on it for as long as it runs.
Minor — 205 finding(s)
D10 · Test Quality · No direct assertions · ×97
  • No direct assertions: testFirstLaunchShowsOnboardingSmoke WikipediaUITests/AppOnboardingUITests.swift:7 — No conventional assertion call was detected, and 97 of 98 tests in `WikipediaUITests` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testOnboardingScreenshots WikipediaUITests/AppOnboardingUITests.swift:13 — No conventional assertion call was detected, and 97 of 98 tests in `WikipediaUITests` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testAdvanceThroughAllStepsCompletesOnboarding WikipediaUITests/AppOnboardingUITests.swift:45 — No conventional assertion call was detected, and 97 of 98 tests in `WikipediaUITests` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testSkipFromPersonalizationCompletesOnboarding WikipediaUITests/AppOnboardingUITests.swift:53 — No conventional assertion call was detected, and 97 of 98 tests in `WikipediaUITests` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testLearnMoreLinksPresentDestinations WikipediaUITests/AppOnboardingUITests.swift:61 — No conventional assertion call was detected, and 97 of 98 tests in `WikipediaUITests` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testAdditionalLanguageCanBeAddedDuringOnboarding WikipediaUITests/AppOnboardingUITests.swift:70 — No conventional assertion call was detected, and 97 of 98 tests in `WikipediaUITests` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testLaunchLocaleSeedsPreferredWikipediaLanguage WikipediaUITests/AppOnboardingUITests.swift:87 — No conventional assertion call was detected, and 97 of 98 tests in `WikipediaUITests` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testArticleBackButtonReturnsToHome WikipediaUITests/ArticleControlsUITests.swift:5 — No conventional assertion call was detected, and 97 of 98 tests in `WikipediaUITests` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testArticleHomeButtonReturnsToHome WikipediaUITests/ArticleControlsUITests.swift:10 — No conventional assertion call was detected, and 97 of 98 tests in `WikipediaUITests` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testArticleSearchButtonOpensSearch WikipediaUITests/ArticleControlsUITests.swift:15 — No conventional assertion call was detected, and 97 of 98 tests in `WikipediaUITests` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testArticleTableOfContentsButtonOpensContents WikipediaUITests/ArticleControlsUITests.swift:20 — No conventional assertion call was detected, and 97 of 98 tests in `WikipediaUITests` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testArticleLanguageControlSwitchesArticleLanguage WikipediaUITests/ArticleControlsUITests.swift:25 — No conventional assertion call was detected, and 97 of 98 tests in `WikipediaUITests` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testArticleSaveControlTogglesSavedState WikipediaUITests/ArticleControlsUITests.swift:32 — No conventional assertion call was detected, and 97 of 98 tests in `WikipediaUITests` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testArticleFindInArticleSearchesAndCloses WikipediaUITests/ArticleControlsUITests.swift:37 — No conventional assertion call was detected, and 97 of 98 tests in `WikipediaUITests` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testArticleThemeControlAdjustsReadingTheme WikipediaUITests/ArticleControlsUITests.swift:43 — No conventional assertion call was detected, and 97 of 98 tests in `WikipediaUITests` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testArticleTableOfContentsDismissesWhenTappingOutside WikipediaUITests/ArticleControlsUITests.swift:50 — No conventional assertion call was detected, and 97 of 98 tests in `WikipediaUITests` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testArticleTableOfContentsSectionSelectionWorks WikipediaUITests/ArticleControlsUITests.swift:56 — No conventional assertion call was detected, and 97 of 98 tests in `WikipediaUITests` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testArticleTableOfContentsWorksAfterRotation WikipediaUITests/ArticleControlsUITests.swift:72 — No conventional assertion call was detected, and 97 of 98 tests in `WikipediaUITests` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testArticleOverflowMenuItemsAreAvailable WikipediaUITests/ArticleControlsUITests.swift:77 — No conventional assertion call was detected, and 97 of 98 tests in `WikipediaUITests` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testArticleOverflowWatchCanBeTapped WikipediaUITests/ArticleControlsUITests.swift:84 — No conventional assertion call was detected, and 97 of 98 tests in `WikipediaUITests` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testArticleOverflowTalkPageCanBeTapped WikipediaUITests/ArticleControlsUITests.swift:89 — No conventional assertion call was detected, and 97 of 98 tests in `WikipediaUITests` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testArticleOverflowEditCanBeTapped WikipediaUITests/ArticleControlsUITests.swift:94 — No conventional assertion call was detected, and 97 of 98 tests in `WikipediaUITests` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testArticleOverflowBackReturnsToPreviousArticle WikipediaUITests/ArticleControlsUITests.swift:99 — No conventional assertion call was detected, and 97 of 98 tests in `WikipediaUITests` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testArticleOverflowRevisionHistoryCanBeTapped WikipediaUITests/ArticleControlsUITests.swift:106 — No conventional assertion call was detected, and 97 of 98 tests in `WikipediaUITests` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: testProtectedArticleEditIconCanBeTapped WikipediaUITests/ArticleControlsUITests.swift:147 — No conventional assertion call was detected, and 97 of 98 tests in `WikipediaUITests` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • + 72 more in this group — see findings.md.
D34 · Knowledge Freshness · Orphaned file · ×46
  • Orphaned file Widgets/Widgets/OnThisDayWidget.swift:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file Wikipedia/Code/PageHistoryCollectionViewCell.swift:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file WMF Framework/ColumnarCollectionViewLayout.swift:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file WMF Framework/ColumnarCollectionViewLayoutInfo.swift:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file WMF Framework/UIView+SemanticContent.swift:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file Wikipedia/Code/ArticleTableOfContentsDisplayController.swift:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file WMF Framework/CollectionViewCellActionsView.swift:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file WMF Framework/Event Platform/StorageManager.swift:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file REDACTED:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file Widgets/Views/Sparkline.swift:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file Wikipedia/Code/ShareViewController.swift:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file Wikipedia/Code/SaveButtonsController.swift:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file Wikipedia/Code/WMFKeychainCredentials.swift:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file Wikipedia/Code/NotificationsCenterDetailHeaderCell.swift:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file WMF Framework/Event Platform/SamplingController.swift:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file Wikipedia/Code/PlaceSearch.swift:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file scripts/generate_dice_roll_html.rb:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file Wikipedia/Code/MediaListGalleryViewController.swift:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file Wikipedia/Code/ReferenceBackLinksViewController.swift:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file Wikipedia/Code/ActionHandlerScript.swift:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file Wikipedia/Code/BatchEditSelectView.swift:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file Wikipedia/Code/PageHistoryComparisonSelectionViewController.swift:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file Wikipedia/Code/VanishAccountWarningView.swift:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file WMF Framework/ReadingList+CoreDataProperties.swift:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file WMF Framework/PermanentCacheController.swift:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • + 21 more in this group — see findings.md.
X10 · Duplicated predicate · Duplicated predicate · ×20
  • Duplicated predicate WMFComponents/Sources/WMFComponents/Components/Editors/Common Views/Input Accessory Views/Expanding/WMFEditorToolbarExpandingView.swift:173 — `!selectionState.isBulletSingleList && !selectionState.isBulletMultipleList` appears character-identically in 2 files — WMFComponents/Sources/WMFComponents/Components/Editors/Common Views/Input Accessory Views/Expanding/WMFEditorToolbarExpandingView.swift, WMFComponents/Sources/WMFComponents/Components/Editors/Common Views/Input Views/WMFEditorInputView.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate WMFComponents/Sources/WMFComponents/Components/Editors/Common Views/Input Accessory Views/Expanding/WMFEditorToolbarExpandingView.swift:170 — `!selectionState.isNumberSingleList && !selectionState.isNumberMultipleList` appears character-identically in 2 files — WMFComponents/Sources/WMFComponents/Components/Editors/Common Views/Input Accessory Views/Expanding/WMFEditorToolbarExpandingView.swift, WMFComponents/Sources/WMFComponents/Components/Editors/Common Views/Input Views/WMFEditorInputView.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate WMFComponents/Sources/WMFComponents/Components/Games/Which Came First/Core/WMFWhichCameFirstView.swift:71 — `UIDevice.current.userInterfaceIdiom != .pad && height <= 667` appears character-identically in 2 files — WMFComponents/Sources/WMFComponents/Components/Games/Which Came First/Core/WMFWhichCameFirstView.swift, WMFComponents/Sources/WMFComponents/Components/Games/Which Came First/Results/WMFWhichCameFirstResultsView.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate WMFComponents/Sources/WMFComponents/Extensions/Navigation Bar/WMFNavigationBarConfiguring.swift:436 — `UIDevice.current.userInterfaceIdiom == .pad && UITraitCollection.current.horizontalSizeClass == .regular` appears character-identically in 2 files — WMFComponents/Sources/WMFComponents/Extensions/Navigation Bar/WMFNavigationBarConfiguring.swift, Wikipedia/Code/SearchBarIPadCustomizer.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate WMFComponents/Sources/WMFComponents/Extensions/UIViewController+Extensions.swift:6 — `UIDevice.current.userInterfaceIdiom == .pad && traitCollection.horizontalSizeClass == .regular` appears character-identically in 3 files — WMFComponents/Sources/WMFComponents/Extensions/UIViewController+Extensions.swift, Wikipedia/Code/ArticleViewController.swift, Wikipedia/Code/SettingsTabViewController.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate Wikipedia/Code/SettingsCoordinator.swift:118 — `WMFTempAccountDataController.shared.primaryWikiHasTempAccountsEnabled && dataStore.authenticationManager.authStateIsTemporary` appears character-identically in 3 files — Wikipedia/Code/SettingsCoordinator.swift, Wikipedia/Code/UIViewController+ProfileButton.swift, Wikipedia/Code/WMFAppViewController+Extensions.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate WMF Framework/ActionButton.swift:25 — `contentSizeCategory == nil || contentSizeCategory != traitCollection.preferredContentSizeCategory` appears character-identically in 3 files — WMF Framework/ActionButton.swift, Wikipedia/Code/CollectionViewCell.swift, Wikipedia/Code/SizeThatFitsReusableView.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate Wikipedia/Code/ArticleRightAlignedImageCollectionViewCell.swift:60 — `descriptionLabel.wmf_hasText || !isImageViewHidden` appears character-identically in 2 files — Wikipedia/Code/ArticleRightAlignedImageCollectionViewCell.swift, Wikipedia/Code/SavedArticlesCollectionViewCell.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate Wikipedia/Code/CollectionViewCell.swift:178 — `fitSize.height == CGFloat.greatestFiniteMagnitude || fitSize.height == UIView.noIntrinsicMetric` appears character-identically in 2 files — Wikipedia/Code/CollectionViewCell.swift, Wikipedia/Code/SizeThatFitsReusableView.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate Wikipedia/Code/ColumnarCollectionViewController.swift:204 — `isCurrentlyEmpty != isEmpty || showingEmptyViewType != emptyViewType` appears character-identically in 2 files — Wikipedia/Code/ColumnarCollectionViewController.swift, Wikipedia/Code/InsertMediaSearchResultsCollectionViewController.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate WMFComponents/Sources/WMFComponents/Components/Discover/WMFDiscoverSettingsHostingController.swift:38 — `isMovingFromParent || isBeingDismissed || navigationController?.isBeingDismissed == true` appears character-identically in 2 files — WMFComponents/Sources/WMFComponents/Components/Discover/WMFDiscoverSettingsHostingController.swift, WMFComponents/Sources/WMFComponents/Components/Settings/Home/For You/Whats Driving/Your Interests/WMFHomeFeedInterestsSettingsViewController.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate WMFData/Sources/WMFData/Data Controllers/Home/WMFHomeDataController.swift:726 — `page.pageprops?.disambiguation == nil && page.pageprops?.mainpage == nil` appears character-identically in 2 files — WMFData/Sources/WMFData/Data Controllers/Home/WMFHomeDataController.swift, WMFData/Sources/WMFData/Data Controllers/Shared/WMFRelatedPagesDataController.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate WMFComponents/Sources/WMFComponents/Components/Editors/Common Views/Input Accessory Views/Expanding/WMFEditorToolbarExpandingView.swift:176 — `selectionState.isBulletMultipleList || selectionState.isNumberMultipleList` appears character-identically in 2 files — WMFComponents/Sources/WMFComponents/Components/Editors/Common Views/Input Accessory Views/Expanding/WMFEditorToolbarExpandingView.swift, WMFComponents/Sources/WMFComponents/Components/Editors/Common Views/Input Views/WMFEditorInputView.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate WMFComponents/Sources/WMFComponents/Components/Editors/Common Views/Input Accessory Views/Expanding/WMFEditorToolbarExpandingView.swift:169 — `selectionState.isBulletSingleList || selectionState.isBulletMultipleList` appears character-identically in 2 files — WMFComponents/Sources/WMFComponents/Components/Editors/Common Views/Input Accessory Views/Expanding/WMFEditorToolbarExpandingView.swift, WMFComponents/Sources/WMFComponents/Components/Editors/Common Views/Input Views/WMFEditorInputView.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate WMFComponents/Sources/WMFComponents/Components/Editors/Common Views/Input Accessory Views/Expanding/WMFEditorToolbarExpandingView.swift:180 — `selectionState.isBulletSingleList || selectionState.isBulletMultipleList || selectionState.isNumberSingleList || selectionState.isNumberMult…` appears character-identically in 2 files — WMFComponents/Sources/WMFComponents/Components/Editors/Common Views/Input Accessory Views/Expanding/WMFEditorToolbarExpandingView.swift, WMFComponents/Sources/WMFComponents/Components/Editors/Common Views/Input Views/WMFEditorInputView.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate WMFComponents/Sources/WMFComponents/Components/Editors/Common Views/Input Accessory Views/Expanding/WMFEditorToolbarExpandingView.swift:172 — `selectionState.isNumberSingleList || selectionState.isNumberMultipleList` appears character-identically in 2 files — WMFComponents/Sources/WMFComponents/Components/Editors/Common Views/Input Accessory Views/Expanding/WMFEditorToolbarExpandingView.swift, WMFComponents/Sources/WMFComponents/Components/Editors/Common Views/Input Views/WMFEditorInputView.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewBiggestReadingDaySlideDataController.swift:101 — `title != Self.englishMainPageTitle && title != mainPageTitles[readingTime.page.projectID]` appears character-identically in 2 files — WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewBiggestReadingDaySlideDataController.swift, WMFData/Sources/WMFData/Data Controllers/Year In Review/Slide Data Controllers/YearInReviewLongestReadSlideDataController.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate Wikipedia/Code/FundraisingAnnouncementPanel.swift:65 — `traitCollection.horizontalSizeClass == .regular && traitCollection.verticalSizeClass == .regular` appears character-identically in 2 files — Wikipedia/Code/FundraisingAnnouncementPanel.swift, Wikipedia/Code/PlacesViewController.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate Wikipedia/Code/SinglePageWebViewController.swift:468 — `url.scheme == "https" || url.scheme == "http"` appears character-identically in 2 files — Wikipedia/Code/SinglePageWebViewController.swift, Wikipedia/Code/ViewController+URLHandling.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate Wikipedia/Code/TalkPageCell.swift:153 — `viewModel.leadComment == nil && viewModel.otherContentHtml != nil` appears character-identically in 2 files — Wikipedia/Code/TalkPageCell.swift, Wikipedia/Code/TalkPageCellTopicView.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
X7 · Silent fallback defaults · Silent fallback default in catch · ×14
  • Silent fallback default in catch WMFComponents/Sources/WMFComponents/Components/Discover/WMFDiscoverSettingsViewModel.swift:85 — `fetchInterestCount` turns every thrown error into `0` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
  • Silent fallback default in catch WMFData/Sources/WMFData/Data Controllers/Activity Tab/WMFActivityTabDataController.swift:208 — `activityTabVisitCount` turns every thrown error into `0` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
  • Silent fallback default in catch WMFData/Sources/WMFData/Data Controllers/Evergreen Account Creation/WMFEvergreenAccountCreationDataController.swift:265 — `readingDays` turns every thrown error into `[]` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
  • Silent fallback default in catch WMFData/Sources/WMFData/Data Controllers/Evergreen Account Creation/WMFEvergreenAccountCreationDataController.swift:277 — `savedArticleCount` turns every thrown error into `0` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
  • Silent fallback default in catch WMFData/Sources/WMFData/Data Controllers/Home/WMFHomeDataController.swift:235 — `storedSeenArticles` turns every thrown error into `[:]` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
  • Silent fallback default in catch WMFData/Sources/WMFData/Data Controllers/Home/WMFHomeDataController.swift:250 — `hiddenCardKeys` turns every thrown error into `[]` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
  • Silent fallback default in catch WMFData/Sources/WMFData/Data Controllers/Local Notifications/WMFLocalNotificationDataController.swift:162 — `handledDays` turns every thrown error into `[:]` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
  • Silent fallback default in catch WMFData/Sources/WMFData/Data Controllers/Local Notifications/WMFLocalNotificationDataController.swift:191 — `loadLog` turns every thrown error into `[]` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
  • Silent fallback default in catch WMFData/Sources/WMFData/Data Controllers/Year In Review/WMFYearInReviewDataController.swift:250 — `fullSlideCount` turns every thrown error into `0` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
  • Silent fallback default in catch WMF Framework/CacheDBWriterHelper.swift:85 — `allDownloadedVariantItems` turns every thrown error into `[]` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
  • Silent fallback default in catch WMF Framework/CacheDBWriterHelper.swift:96 — `allVariantItems` turns every thrown error into `[]` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
  • Silent fallback default in catch WMF Framework/SharedContainerCache.swift:65 — `fileNames` turns every thrown error into `[]` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
  • Silent fallback default in catch Wikipedia/Code/NotificationsCenterViewModel.swift:397 — `numberOfUnreadNotifications` turns every thrown error into `0` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
  • Silent fallback default in catch Wikipedia/Code/NSString+Range.swift:11 — `ranges` turns every thrown error into `[]` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
D16 · Bus Factor · Off-boarding risk · ×4
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 89 significant file(s) lose their only recent owner: Wikipedia/Code/YearInReviewSlideViewModelFactory.swift, Wikipedia/Code/WhichCameFirstCoordinator.swift, WMFComponents/Sources/WMFComponents/Components/Year in Review/WMFYearInReviewView.swift, WMF Framework/ExploreCardCollectionViewCell.swift, Widgets/Widgets/OnThisDayView.swift, WMFComponents/Sources/WMFComponents/Components/Year in Review/WMFYearInReviewViewModel.swift, Wikipedia/Code/EvergreenAccountCreationCoordinator.swift, WMFComponents/Sources/WMFComponents/Components/Shared/Rive/WMFRiveAnimationViewModel.swift (+81 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 27 significant file(s) lose their only recent owner: WMFData/Sources/WMFData/Data Controllers/Donor Experience/WMFDonationReminderDataController.swift, Wikipedia/Code/TableOfContentsAnimator.swift, WMFComponents/Sources/WMFComponents/Components/Search/Results/WMFSearchResultsViewModel.swift, WMFComponents/Sources/WMFComponents/Components/Search/Semantic Search Results/Card/WMFSemanticSearchResultViewModel.swift, WMFComponents/Sources/WMFComponents/Components/Donation Reminder/WMFDonationReminderSetupView.swift, Wikipedia/Code/NotificationsCenterCommonViewModel+LinkExtensions.swift, WMFComponents/Sources/WMFComponents/Components/Search/Results/WMFSearchResultRow.swift, WMFData/Sources/WMFData/Data Controllers/Semantic Search/WMFSemanticSearchDataController+Results.swift (+19 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #3 — If anonymized user #3 becomes unavailable, 25 significant file(s) lose their only recent owner: WMFComponents/Sources/WMFComponents/Components/Suggested Edits/Image Recommendations/WMFImageRecommendationsViewController.swift, Wikipedia/Code/FindAndReplaceKeyboardBar.swift, Wikipedia/Code/InsertMediaViewController.swift, WMF Framework/LocationManager.swift, WMFData/Sources/WMFData/Data Controllers/Local Notifications/WMFLocalNotificationDataController.swift, Wikipedia/Code/UIViewController+FeatureComponentFactory.swift, Wikipedia/Code/EditLinkViewController.swift, Wikipedia/Code/DetailTransition.swift (+17 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #4 — If anonymized user #4 becomes unavailable, 4 significant file(s) lose their only recent owner: Wikipedia/Code/PageContentService+UITestAccessibilityScript.swift, Wikipedia/Code/TestNetworkFixtures/TestNetworkFixtureStore.swift, Wikipedia/Code/TestNetworkFixtures/TestNetworkFixtureHTTPClient.swift, Wikipedia/Code/TestNetworkFixtures/TestNetworkFixtureURLProtocol.swift. Pair on, review, or document these before any departure.
D21 · Naming Consistency · `httpUrlResponse` spells `Url` where 551 names in the project spell it `URL` · ×4
  • `httpUrlResponse` spells `Url` where 551 names in the project spell it `URL` WMF Framework/CacheFetching.swift:97 — 551 of 557 names in project repository spell the token `URL` (551 of 557; unit: names in project repository containing `URL`). Peers: WikipediaLanguageCommandLineUtility.getOutputFileURL (Command Line Tools/Update Languages/WikipediaLanguageCommandLineUtility.swift:38); WMFTodayContinueReadingWidgetViewController.articleURL (ContinueReadingWidget/WMFTodayContinueReadingWidgetViewController.swift:23); CacheDBWritingSyncSuccessResult.addURLRequests (WMF Framework/ArticleCacheDBWriter+SyncResources.swift:13); ArticleCacheResourceDBWriting.cacheURLs(mustHaveURLRequests) (WMF Framework/ArticleCacheResourceDBWriting.swift:81); ArticleCacheResourceDBWriting.cacheURLs(niceToHaveURLRequests) (WMF Framework/ArticleCacheResourceDBWriting.swift:81). Rename to `httpURLResponse`. [rule N6]
  • `httpUrlResponse` spells `Url` where 551 names in the project spell it `URL` WMF Framework/CacheFileWriterHelper.swift:28 — 551 of 557 names in project repository spell the token `URL` (551 of 557; unit: names in project repository containing `URL`). Peers: WikipediaLanguageCommandLineUtility.getOutputFileURL (Command Line Tools/Update Languages/WikipediaLanguageCommandLineUtility.swift:38); WMFTodayContinueReadingWidgetViewController.articleURL (ContinueReadingWidget/WMFTodayContinueReadingWidgetViewController.swift:23); CacheDBWritingSyncSuccessResult.addURLRequests (WMF Framework/ArticleCacheDBWriter+SyncResources.swift:13); ArticleCacheResourceDBWriting.cacheURLs(mustHaveURLRequests) (WMF Framework/ArticleCacheResourceDBWriting.swift:81); ArticleCacheResourceDBWriting.cacheURLs(niceToHaveURLRequests) (WMF Framework/ArticleCacheResourceDBWriting.swift:81). Rename to `httpURLResponse`. [rule N6]
  • `httpUrlResponse` spells `Url` where 551 names in the project spell it `URL` WMF Framework/PermanentlyPersistableURLCache.swift:320 — 551 of 557 names in project repository spell the token `URL` (551 of 557; unit: names in project repository containing `URL`). Peers: WikipediaLanguageCommandLineUtility.getOutputFileURL (Command Line Tools/Update Languages/WikipediaLanguageCommandLineUtility.swift:38); WMFTodayContinueReadingWidgetViewController.articleURL (ContinueReadingWidget/WMFTodayContinueReadingWidgetViewController.swift:23); CacheDBWritingSyncSuccessResult.addURLRequests (WMF Framework/ArticleCacheDBWriter+SyncResources.swift:13); ArticleCacheResourceDBWriting.cacheURLs(mustHaveURLRequests) (WMF Framework/ArticleCacheResourceDBWriting.swift:81); ArticleCacheResourceDBWriting.cacheURLs(niceToHaveURLRequests) (WMF Framework/ArticleCacheResourceDBWriting.swift:81). Rename to `httpURLResponse`. [rule N6]
  • `httpUrlResponse` spells `Url` where 551 names in the project spell it `URL` Wikipedia/Code/Session.swift:765 — 551 of 557 names in project repository spell the token `URL` (551 of 557; unit: names in project repository containing `URL`). Peers: WikipediaLanguageCommandLineUtility.getOutputFileURL (Command Line Tools/Update Languages/WikipediaLanguageCommandLineUtility.swift:38); WMFTodayContinueReadingWidgetViewController.articleURL (ContinueReadingWidget/WMFTodayContinueReadingWidgetViewController.swift:23); CacheDBWritingSyncSuccessResult.addURLRequests (WMF Framework/ArticleCacheDBWriter+SyncResources.swift:13); ArticleCacheResourceDBWriting.cacheURLs(mustHaveURLRequests) (WMF Framework/ArticleCacheResourceDBWriting.swift:81); ArticleCacheResourceDBWriting.cacheURLs(niceToHaveURLRequests) (WMF Framework/ArticleCacheResourceDBWriting.swift:81). Rename to `httpURLResponse`. [rule N6]
D29 · Static Analysis (SAST) · REDACTED · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 2 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (147 single-owned of 772 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 772 of the 1323 production source files in this repository met that bar). They are anonymized user #5 (1 file(s)), anonymized user #6 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: scripts/update-qqq.php, Wikipedia/Code/WikipediaLookup.swift.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found REDACTED:1 — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`. ADRs are expected here because `REDACTED` makes this repository a deployable product (line 1).
D21 · Naming Consistency · `learnMoreUrl` spells `Url` where 551 names in the project spell it `URL` · ×1
  • `learnMoreUrl` spells `Url` where 551 names in the project spell it `URL` Wikipedia/Code/InsertMediaSettingsViewController.swift:195 — 551 of 557 names in project repository spell the token `URL` (551 of 557; unit: names in project repository containing `URL`). Peers: WikipediaLanguageCommandLineUtility.getOutputFileURL (Command Line Tools/Update Languages/WikipediaLanguageCommandLineUtility.swift:38); WMFTodayContinueReadingWidgetViewController.articleURL (ContinueReadingWidget/WMFTodayContinueReadingWidgetViewController.swift:23); CacheDBWritingSyncSuccessResult.addURLRequests (WMF Framework/ArticleCacheDBWriter+SyncResources.swift:13); ArticleCacheResourceDBWriting.cacheURLs(mustHaveURLRequests) (WMF Framework/ArticleCacheResourceDBWriting.swift:81); ArticleCacheResourceDBWriting.cacheURLs(niceToHaveURLRequests) (WMF Framework/ArticleCacheResourceDBWriting.swift:81). Rename to `learnMoreURL`. [rule N6]
D21 · Naming Consistency · `pageLoadMeasurementUrlString` spells `Url` where 551 names in the project spell it `URL` · ×1
  • `pageLoadMeasurementUrlString` spells `Url` where 551 names in the project spell it `URL` Wikipedia/Code/SchemeHandler/SchemeHandler.swift:24 — 551 of 557 names in project repository spell the token `URL` (551 of 557; unit: names in project repository containing `URL`). Peers: WikipediaLanguageCommandLineUtility.getOutputFileURL (Command Line Tools/Update Languages/WikipediaLanguageCommandLineUtility.swift:38); WMFTodayContinueReadingWidgetViewController.articleURL (ContinueReadingWidget/WMFTodayContinueReadingWidgetViewController.swift:23); CacheDBWritingSyncSuccessResult.addURLRequests (WMF Framework/ArticleCacheDBWriter+SyncResources.swift:13); ArticleCacheResourceDBWriting.cacheURLs(mustHaveURLRequests) (WMF Framework/ArticleCacheResourceDBWriting.swift:81); ArticleCacheResourceDBWriting.cacheURLs(niceToHaveURLRequests) (WMF Framework/ArticleCacheResourceDBWriting.swift:81). Rename to `pageLoadMeasurementURLString`. [rule N6]
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion — 3 of 5 project(s) overshoot their size bounds, lowering Project Cohesion to 0.0/10. The most over is `(repository root)` (110502 LoC, 1468 module-visible types across 30 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D34 · Knowledge Freshness · Further orphaned files (smaller) · ×1
  • Further orphaned files (smaller) — 46 smaller file(s) also have no living knowledge — folded into the freshness score and metrics rather than raised one row each — most significant first: Widgets/Widgets/OnThisDayWidget.swift, Wikipedia/Code/PageHistoryCollectionViewCell.swift, WMF Framework/ColumnarCollectionViewLayout.swift, WMF Framework/ColumnarCollectionViewLayoutInfo.swift, WMF Framework/UIView+SemanticContent.swift, Wikipedia/Code/ArticleTableOfContentsDisplayController.swift, WMF Framework/CollectionViewCellActionsView.swift, WMF Framework/Event Platform/StorageManager.swift (and 38 more) (47 orphaned of 775 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 775 of the 1323 production source files in this repository met that bar). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
P10 · Library API & versioning · Implementation type on the public API · ×1
  • Implementation type on the public API WMFTestKitchen/Sources/WMFTestKitchen/Instrument/InstrumentImpl.swift:3 — 1 public type in `WMFTestKitchen~WMFTestKitchen` is marked as implementation by its own namespace, folder or name: `InstrumentImpl` (WMFTestKitchen/Sources/WMFTestKitchen/Instrument/InstrumentImpl.swift:3, name ends in `Impl`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST REDACTED:4 — No static application security testing detected. For this repository's stack, add CodeQL's Swift pack (Swift/Xcode) (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 21 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
P6 · Release Hygiene · No changelog · ×1
  • No changelog — No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
X5 · Nullable reference types · Ruby's type checker does not check nil everywhere · ×1
  • Ruby's type checker does not check nil everywhere — This repository commits no Sorbet configuration (`sorbet/config`) and no `Steepfile`, so nothing type-checks its 1 Ruby product file(s): a nilable value reaches a method call silently and raises `NoMethodError: undefined method … for nil` the first time it is nil. A `# typed:` sigil does nothing without a `sorbet/config` beside the code; a Steep run configured only on a command line is not something this check can read.
Minor — 4 finding(s)
D12 · Dependency Hygiene · Outdated · ×4
  • Outdated: cocoalumberjack — `cocoalumberjack` is resolved at 3.9.0, but 3.10.0 is the newest release tagged on https://github.com/CocoaLumberjack/CocoaLumberjack.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update cocoalumberjack` reaches this one with no change to Package.swift.
  • Outdated: rive-ios — `rive-ios` is resolved at 6.29.0, but 6.30.1 is the newest release tagged on https://github.com/rive-app/rive-ios.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update rive-ios` reaches this one with no change to Package.swift.
  • Outdated: sdwebimage — `sdwebimage` is resolved at 5.21.3, but 5.21.7 is the newest release tagged on https://github.com/SDWebImage/SDWebImage.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update sdwebimage` reaches this one with no change to Package.swift.
  • Outdated: swift-log — `swift-log` is resolved at 1.6.4, but 1.17.0 is the newest release tagged on https://github.com/apple/swift-log within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update swift-log` reaches this one with no change to Package.swift.

Appendix B — Reproduction & audit trail

Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-750c59275e6a47148a0b95ab065ef85d/history.json --exit-code 0 --source .128artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-750c59275e6a47148a0b95ab065ef85d/tree.json --exit-code 0 --source .0artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/canine-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt .48artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiesosv-scanner—osv-scanner --format json --recursive --experimental-disable-plugins transitivedependency/requirements --experimental-disable-plugins dotnet/csproj --experimental-disable-plugins dotnet/nugetcpm .0artifacts/raw/osv-scanner.json
D31 · IaC & Container Securitytrivy—trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.0—
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 53 file(s) — `Command Line Tools/Update Languages/WikipediaLanguageCommandLineUtilityAPI.swift`, `WMF Framework/CacheGroup+CoreDataProperties.swift`, `WMF Framework/CacheItem+CoreDataProperties.swift`, `WMF Framework/ReadingList+CoreDataProperties.swift`, `WMFComponents/Sources/WMFComponents/Components/App Onboarding/WMFAppOnboardingFeedPreferenceViewModel.swift`, … (+48 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciesosv-scanner—osv-scanner --format json --recursive --experimental-disable-plugins transitivedependency/requirements --experimental-disable-plugins dotnet/csproj --experimental-disable-plugins dotnet/nugetcpm .0artifacts/raw/osv-scanner.json

Run 01a1dc37-2087-7eeb-8a42-b354d693566a · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Downloadable artifacts

Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.

⬇ Findings, MITRE CWE-tagged .sarif⬇ Health changelog .md