Public report of duckduckgo/Android, published 24 October 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 reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.10.5). Watchdog 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, 24 October 2026, 22:06 UTC · Survey ID cd_ce0fa9e5883b4701a4fd6bf7647a311f
duckduckgo/Android
Measured 24 October 2026, 21:44 UTC, at code version 71cba3e
A regression is a drop of 0.5 points or more in the score, or of 2.5 or more out of 10 in a dimension, since the last survey.
Code coverage is not measured: JavaScript/TypeScript suite (CouldNotMeasureTestRunFailed).
Test reliability is not measured: A declared JavaScript/TypeScript suite contains no test files.
CAI scoreAt riskNo 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: 434,476 lines of product code in 201 projects, tests not counted · Estimated rebuild effort: about 7.2 person-years · Weakest lens: Production Readiness, 50
Findings by how serious they are
473 critical976 serious170 minor
11 dimensions are left out of the score. For each one, Watchdog either couldn't measure it in this code, or found no evidence of the safeguard it looks 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
Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
24 October 2026, 21:44 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 Watchdog. It is open to any tool that
implements it, and today Watchdog is the only one that does.
A critical security finding is open, such as a library with a known critical vulnerability or a password or key found in the code. The score itself is unchanged, but its band shows At risk until the finding is fixed. See the Security and Compliance lens.
The score is deterministic, which means the same code always gets the same score. Watchdog works 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 ▸
77of 80 dimensions measured by tools. The other 3 are advisory notes from an AI model, which explain the code but don't count towards the score.
1578of 1619 findings point to an exact file and line, so you can open each one in the code. The other 41 concern the repository as a whole, such as missing documentation.
80dimensions across 7 lenses, read from 434,476 lines of product code in 201 projects.
duckduckgo/Android scores 53 out of 100, but it is rated At risk while a critical security finding is open; the score itself is unchanged.
The weakest lens counts most in the score, and here that is Production Readiness, which scores 50 and is rated Adequate. Its Secret Scanning dimension scores 0 out of 10, and until that reaches 4, Production Readiness can't be rated higher than Adequate. The first actions are to resolve the 3 Leaked secret finding(s) in Secret Scanning and to resolve the 1 No ADRs found finding(s) in ADR Quality. The weakest lenses score close to each other, so improving any of them moves the score.
473 findings are critical: 437 in Static Analysis (SAST), 30 in Dependency Vulnerabilities, three in Secret Scanning, two in Change Coupling and one in Test Reliability.
Watchdog couldn't measure 9 dimensions in this code, among them Internal API Consistency, Navigability and Access Controls, so they are left out of the score. The product code is 434,476 lines, which would take an estimated 7.2 person-years, around €1,100,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 forThe 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.
The weakest lenses score close to each other, so improving any of them moves the score.
Code composition: what the lines of code are
Product code 54%Tests 46%
New since the last survey: 122 findings
These 122 critical or serious findings weren't in the previous survey, on 10 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.
Watchdog compares 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: 280 findings
These 280 critical or serious findings were in the previous survey, on 10 October 2026, and are gone from this one. The first 100 are listed here.
€350,000 to €1,800,000, for 5,821 to 18,468 hours of work, about 7.2 person-years for 4 to 14 engineers
Difficulty of the problem
High, 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 53. 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.
Size
Large: 434,476 lines of product code
How the estimate is made: Watchdog prices 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
Resolve the 3 Leaked secret finding(s) in Secret Scanning — start with REDACTED (2), REDACTED.
Raises the score by about 3 points · Low effort · Secret Scanning
2
Resolve the 1 No ADRs found finding(s) in ADR Quality.
Raises the score by about 1 point · Low effort · ADR Quality
3
Add a SAST step to CI running what this repository's stack ships: spotbugs with find-sec-bugs — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
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 €1,100,000 to build again, about 7.2 person-years of work. Its weakest lens is Production Readiness, at 50 (Adequate). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
One cause behind 64 Domain Modelling findings · Common cause
64 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. Other code can change an object's data directly, so it can put an order into a state the rules forbid. 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: Encapsulated state (8 findings) · Rich vs anemic model (40 findings) · Strongly-typed ids (16 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
Resolve the 3 Leaked secret finding(s) in Secret Scanning. Of all the actions in this report, it raises the score most for the work it takes: about 3 points for low effort, because it clears the 3 Secret Scanning findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
Architecture — module dependency graph
Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways — a layering smell or cycle. A clean layered graph has none.
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.
3858 modules, with 8103 dependencies between them. 89 loops run through 520 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 3818 more are left out to keep it readable.
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.
app.browser.favicon uses common.utils, so a change to common.utils can break app.browser.favicon, while a change to app.browser.favicon can't break common.utils.
Position
Below the diagonal: app.browser.favicon uses a module listed above it, which is the healthy direction.
app.browser.favicon uses feature.toggles.api, so a change to feature.toggles.api can break app.browser.favicon, while a change to app.browser.favicon can't break feature.toggles.api.
Position
Below the diagonal: app.browser.favicon uses a module listed above it, which is the healthy direction.
app.settings.db uses appbuildconfig.api, so a change to appbuildconfig.api can break app.settings.db, while a change to app.settings.db can't break appbuildconfig.api.
Position
Below the diagonal: app.settings.db uses a module listed above it, which is the healthy direction.
16→30 app.settings.db uses app.browser.omnibarpart of a loop✕
Connections
2 pairs of types, where a type in app.settings.db uses a type in app.browser.omnibar.
app.settings.db uses app.browser.omnibar, so a change to app.browser.omnibar can break app.settings.db, while a change to app.settings.db can't break app.browser.omnibar.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
app.statistics.pixels uses app.statistics.pixels.Pixel, so a change to app.statistics.pixels.Pixel can break app.statistics.pixels, while a change to app.statistics.pixels can't break app.statistics.pixels.Pixel.
Position
Below the diagonal: app.statistics.pixels uses a module listed above it, which is the healthy direction.
app.statistics.pixels uses appbuildconfig.api, so a change to appbuildconfig.api can break app.statistics.pixels, while a change to app.statistics.pixels can't break appbuildconfig.api.
Position
Below the diagonal: app.statistics.pixels uses a module listed above it, which is the healthy direction.
app.statistics.pixels uses common.utils, so a change to common.utils can break app.statistics.pixels, while a change to app.statistics.pixels can't break common.utils.
Position
Below the diagonal: app.statistics.pixels uses a module listed above it, which is the healthy direction.
app.statistics.pixels uses common.utils.plugins, so a change to common.utils.plugins can break app.statistics.pixels, while a change to app.statistics.pixels can't break common.utils.plugins.
Position
Below the diagonal: app.statistics.pixels uses a module listed above it, which is the healthy direction.
autofill.api uses autofill.api.domain.app, so a change to autofill.api.domain.app can break autofill.api, while a change to autofill.api can't break autofill.api.domain.app.
Position
Below the diagonal: autofill.api uses a module listed above it, which is the healthy direction.
autofill.api uses feature.toggles.api, so a change to feature.toggles.api can break autofill.api, while a change to autofill.api can't break feature.toggles.api.
Position
Below the diagonal: autofill.api uses a module listed above it, which is the healthy direction.
autofill.api uses navigation.api.GlobalActivityStarter, so a change to navigation.api.GlobalActivityStarter can break autofill.api, while a change to autofill.api can't break navigation.api.GlobalActivityStarter.
Position
Below the diagonal: autofill.api uses a module listed above it, which is the healthy direction.
browser.api uses feature.toggles.api, so a change to feature.toggles.api can break browser.api, while a change to browser.api can't break feature.toggles.api.
Position
Below the diagonal: browser.api uses a module listed above it, which is the healthy direction.
contentscopescripts.api uses js.messaging.api, so a change to js.messaging.api can break contentscopescripts.api, while a change to contentscopescripts.api can't break js.messaging.api.
Position
Below the diagonal: contentscopescripts.api uses a module listed above it, which is the healthy direction.
duckchat.api uses navigation.api.GlobalActivityStarter, so a change to navigation.api.GlobalActivityStarter can break duckchat.api, while a change to duckchat.api can't break navigation.api.GlobalActivityStarter.
Position
Below the diagonal: duckchat.api uses a module listed above it, which is the healthy direction.
navigation.api uses navigation.api.GlobalActivityStarter, so a change to navigation.api.GlobalActivityStarter can break navigation.api, while a change to navigation.api can't break navigation.api.GlobalActivityStarter.
Position
Below the diagonal: navigation.api uses a module listed above it, which is the healthy direction.
networkprotection.api uses navigation.api.GlobalActivityStarter, so a change to navigation.api.GlobalActivityStarter can break networkprotection.api, while a change to networkprotection.api can't break navigation.api.GlobalActivityStarter.
Position
Below the diagonal: networkprotection.api uses a module listed above it, which is the healthy direction.
privacy.config.api uses feature.toggles.api, so a change to feature.toggles.api can break privacy.config.api, while a change to privacy.config.api can't break feature.toggles.api.
Position
Below the diagonal: privacy.config.api uses a module listed above it, which is the healthy direction.
subscriptions.api uses js.messaging.api, so a change to js.messaging.api can break subscriptions.api, while a change to subscriptions.api can't break js.messaging.api.
Position
Below the diagonal: subscriptions.api uses a module listed above it, which is the healthy direction.
app.tabs.model uses browsermode.api, so a change to browsermode.api can break app.tabs.model, while a change to app.tabs.model can't break browsermode.api.
Position
Below the diagonal: app.tabs.model uses a module listed above it, which is the healthy direction.
app.tabs.model uses app.browser.favicon, so a change to app.browser.favicon can break app.tabs.model, while a change to app.tabs.model can't break app.browser.favicon.
Position
Below the diagonal: app.tabs.model uses a module listed above it, which is the healthy direction.
app.tabs.model uses privacy.config.api, so a change to privacy.config.api can break app.tabs.model, while a change to app.tabs.model can't break privacy.config.api.
Position
Below the diagonal: app.tabs.model uses a module listed above it, which is the healthy direction.
autofill.impl uses autofill.api.domain.app, so a change to autofill.api.domain.app can break autofill.impl, while a change to autofill.impl can't break autofill.api.domain.app.
Position
Below the diagonal: autofill.impl uses a module listed above it, which is the healthy direction.
autofill.impl uses browsermode.api, so a change to browsermode.api can break autofill.impl, while a change to autofill.impl can't break browsermode.api.
Position
Below the diagonal: autofill.impl uses a module listed above it, which is the healthy direction.
autofill.impl uses common.utils.plugins, so a change to common.utils.plugins can break autofill.impl, while a change to autofill.impl can't break common.utils.plugins.
Position
Below the diagonal: autofill.impl uses a module listed above it, which is the healthy direction.
autofill.impl uses privacy.config.api, so a change to privacy.config.api can break autofill.impl, while a change to autofill.impl can't break privacy.config.api.
Position
Below the diagonal: autofill.impl uses a module listed above it, which is the healthy direction.
mobile.android.vpn.service uses appbuildconfig.api, so a change to appbuildconfig.api can break mobile.android.vpn.service, while a change to mobile.android.vpn.service can't break appbuildconfig.api.
Position
Below the diagonal: mobile.android.vpn.service uses a module listed above it, which is the healthy direction.
mobile.android.vpn.service uses common.ui, so a change to common.ui can break mobile.android.vpn.service, while a change to mobile.android.vpn.service can't break common.ui.
Position
Below the diagonal: mobile.android.vpn.service uses a module listed above it, which is the healthy direction.
mobile.android.vpn.service uses common.utils, so a change to common.utils can break mobile.android.vpn.service, while a change to mobile.android.vpn.service can't break common.utils.
Position
Below the diagonal: mobile.android.vpn.service uses a module listed above it, which is the healthy direction.
mobile.android.vpn.service uses common.utils.plugins, so a change to common.utils.plugins can break mobile.android.vpn.service, while a change to mobile.android.vpn.service can't break common.utils.plugins.
Position
Below the diagonal: mobile.android.vpn.service uses a module listed above it, which is the healthy direction.
mobile.android.vpn.service uses mobile.android.vpn.state.VpnStateMonitor, so a change to mobile.android.vpn.state.VpnStateMonitor can break mobile.android.vpn.service, while a change to mobile.android.vpn.service can't break mobile.android.vpn.state.VpnStateMonitor.
Position
Below the diagonal: mobile.android.vpn.service uses a module listed above it, which is the healthy direction.
mobile.android.vpn.service uses networkprotection.api, so a change to networkprotection.api can break mobile.android.vpn.service, while a change to mobile.android.vpn.service can't break networkprotection.api.
Position
Below the diagonal: mobile.android.vpn.service uses a module listed above it, which is the healthy direction.
sync.impl uses feature.toggles.api, so a change to feature.toggles.api can break sync.impl, while a change to sync.impl can't break feature.toggles.api.
Position
Below the diagonal: sync.impl uses a module listed above it, which is the healthy direction.
app.browser.omnibar uses app.lifecycle, so a change to app.lifecycle can break app.browser.omnibar, while a change to app.browser.omnibar can't break app.lifecycle.
Position
Below the diagonal: app.browser.omnibar uses a module listed above it, which is the healthy direction.
app.browser.omnibar uses browsermode.api, so a change to browsermode.api can break app.browser.omnibar, while a change to app.browser.omnibar can't break browsermode.api.
Position
Below the diagonal: app.browser.omnibar uses a module listed above it, which is the healthy direction.
app.browser.omnibar uses common.utils, so a change to common.utils can break app.browser.omnibar, while a change to app.browser.omnibar can't break common.utils.
Position
Below the diagonal: app.browser.omnibar uses a module listed above it, which is the healthy direction.
app.browser.omnibar uses feature.toggles.api, so a change to feature.toggles.api can break app.browser.omnibar, while a change to app.browser.omnibar can't break feature.toggles.api.
Position
Below the diagonal: app.browser.omnibar uses a module listed above it, which is the healthy direction.
app.browser.omnibar uses app.settings.db, so a change to app.settings.db can break app.browser.omnibar, while a change to app.browser.omnibar can't break app.settings.db.
Position
Below the diagonal: app.browser.omnibar uses a module listed above it, which is the healthy direction.
app.browser.omnibar uses app.statistics.pixels, so a change to app.statistics.pixels can break app.browser.omnibar, while a change to app.browser.omnibar can't break app.statistics.pixels.
Position
Below the diagonal: app.browser.omnibar uses a module listed above it, which is the healthy direction.
app.browser.omnibar uses browser.api, so a change to browser.api can break app.browser.omnibar, while a change to app.browser.omnibar can't break browser.api.
Position
Below the diagonal: app.browser.omnibar uses a module listed above it, which is the healthy direction.
app.browser.omnibar uses duckchat.api, so a change to duckchat.api can break app.browser.omnibar, while a change to app.browser.omnibar can't break duckchat.api.
Position
Below the diagonal: app.browser.omnibar uses a module listed above it, which is the healthy direction.
app.browser.omnibar uses navigation.api, so a change to navigation.api can break app.browser.omnibar, while a change to app.browser.omnibar can't break navigation.api.
Position
Below the diagonal: app.browser.omnibar uses a module listed above it, which is the healthy direction.
app.browser.omnibar uses privacy.config.api, so a change to privacy.config.api can break app.browser.omnibar, while a change to app.browser.omnibar can't break privacy.config.api.
Position
Below the diagonal: app.browser.omnibar uses a module listed above it, which is the healthy direction.
app.browser.omnibar uses app.tabs.model, so a change to app.tabs.model can break app.browser.omnibar, while a change to app.browser.omnibar can't break app.tabs.model.
Position
Below the diagonal: app.browser.omnibar uses a module listed above it, which is the healthy direction.
30→38 app.browser.omnibar uses app.browserpart of a loop✕
Connections
4 pairs of types, where a type in app.browser.omnibar uses a type in app.browser.
app.browser.omnibar uses app.browser, so a change to app.browser can break app.browser.omnibar, while a change to app.browser.omnibar can't break app.browser.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
duckchat.impl.pixel uses app.lifecycle, so a change to app.lifecycle can break duckchat.impl.pixel, while a change to duckchat.impl.pixel can't break app.lifecycle.
Position
Below the diagonal: duckchat.impl.pixel uses a module listed above it, which is the healthy direction.
duckchat.impl.pixel uses app.statistics.pixels.Pixel, so a change to app.statistics.pixels.Pixel can break duckchat.impl.pixel, while a change to duckchat.impl.pixel can't break app.statistics.pixels.Pixel.
Position
Below the diagonal: duckchat.impl.pixel uses a module listed above it, which is the healthy direction.
duckchat.impl.pixel uses appbuildconfig.api, so a change to appbuildconfig.api can break duckchat.impl.pixel, while a change to duckchat.impl.pixel can't break appbuildconfig.api.
Position
Below the diagonal: duckchat.impl.pixel uses a module listed above it, which is the healthy direction.
duckchat.impl.pixel uses common.utils, so a change to common.utils can break duckchat.impl.pixel, while a change to duckchat.impl.pixel can't break common.utils.
Position
Below the diagonal: duckchat.impl.pixel uses a module listed above it, which is the healthy direction.
duckchat.impl.pixel uses common.utils.plugins, so a change to common.utils.plugins can break duckchat.impl.pixel, while a change to duckchat.impl.pixel can't break common.utils.plugins.
Position
Below the diagonal: duckchat.impl.pixel uses a module listed above it, which is the healthy direction.
duckchat.impl.pixel uses feature.toggles.api, so a change to feature.toggles.api can break duckchat.impl.pixel, while a change to duckchat.impl.pixel can't break feature.toggles.api.
Position
Below the diagonal: duckchat.impl.pixel uses a module listed above it, which is the healthy direction.
duckchat.impl.pixel uses app.statistics.pixels, so a change to app.statistics.pixels can break duckchat.impl.pixel, while a change to duckchat.impl.pixel can't break app.statistics.pixels.
Position
Below the diagonal: duckchat.impl.pixel uses a module listed above it, which is the healthy direction.
duckchat.impl.pixel uses duckchat.api, so a change to duckchat.api can break duckchat.impl.pixel, while a change to duckchat.impl.pixel can't break duckchat.api.
Position
Below the diagonal: duckchat.impl.pixel uses a module listed above it, which is the healthy direction.
duckchat.impl.pixel uses app.tabs.model, so a change to app.tabs.model can break duckchat.impl.pixel, while a change to duckchat.impl.pixel can't break app.tabs.model.
Position
Below the diagonal: duckchat.impl.pixel uses a module listed above it, which is the healthy direction.
subscriptions.impl uses app.lifecycle, so a change to app.lifecycle can break subscriptions.impl, while a change to subscriptions.impl can't break app.lifecycle.
Position
Below the diagonal: subscriptions.impl uses a module listed above it, which is the healthy direction.
subscriptions.impl uses common.utils, so a change to common.utils can break subscriptions.impl, while a change to subscriptions.impl can't break common.utils.
Position
Below the diagonal: subscriptions.impl uses a module listed above it, which is the healthy direction.
subscriptions.impl uses data.store.api, so a change to data.store.api can break subscriptions.impl, while a change to subscriptions.impl can't break data.store.api.
Position
Below the diagonal: subscriptions.impl uses a module listed above it, which is the healthy direction.
subscriptions.impl uses feature.toggles.api, so a change to feature.toggles.api can break subscriptions.impl, while a change to subscriptions.impl can't break feature.toggles.api.
Position
Below the diagonal: subscriptions.impl uses a module listed above it, which is the healthy direction.
subscriptions.impl uses js.messaging.api, so a change to js.messaging.api can break subscriptions.impl, while a change to subscriptions.impl can't break js.messaging.api.
Position
Below the diagonal: subscriptions.impl uses a module listed above it, which is the healthy direction.
subscriptions.impl uses mobile.android.vpn.state.VpnStateMonitor, so a change to mobile.android.vpn.state.VpnStateMonitor can break subscriptions.impl, while a change to subscriptions.impl can't break mobile.android.vpn.state.VpnStateMonitor.
Position
Below the diagonal: subscriptions.impl uses a module listed above it, which is the healthy direction.
subscriptions.impl uses navigation.api, so a change to navigation.api can break subscriptions.impl, while a change to subscriptions.impl can't break navigation.api.
Position
Below the diagonal: subscriptions.impl uses a module listed above it, which is the healthy direction.
subscriptions.impl uses subscriptions.api, so a change to subscriptions.api can break subscriptions.impl, while a change to subscriptions.impl can't break subscriptions.api.
Position
Below the diagonal: subscriptions.impl uses a module listed above it, which is the healthy direction.
subscriptions.impl uses mobile.android.vpn.service, so a change to mobile.android.vpn.service can break subscriptions.impl, while a change to subscriptions.impl can't break mobile.android.vpn.service.
Position
Below the diagonal: subscriptions.impl uses a module listed above it, which is the healthy direction.
app.onboarding.ui.page.welcome uses appbuildconfig.api, so a change to appbuildconfig.api can break app.onboarding.ui.page.welcome, while a change to app.onboarding.ui.page.welcome can't break appbuildconfig.api.
Position
Below the diagonal: app.onboarding.ui.page.welcome uses a module listed above it, which is the healthy direction.
app.onboarding.ui.page.welcome uses common.utils, so a change to common.utils can break app.onboarding.ui.page.welcome, while a change to app.onboarding.ui.page.welcome can't break common.utils.
Position
Below the diagonal: app.onboarding.ui.page.welcome uses a module listed above it, which is the healthy direction.
app.onboarding.ui.page.welcome uses app.statistics.pixels, so a change to app.statistics.pixels can break app.onboarding.ui.page.welcome, while a change to app.onboarding.ui.page.welcome can't break app.statistics.pixels.
Position
Below the diagonal: app.onboarding.ui.page.welcome uses a module listed above it, which is the healthy direction.
app.onboarding.ui.page.welcome uses autofill.api, so a change to autofill.api can break app.onboarding.ui.page.welcome, while a change to app.onboarding.ui.page.welcome can't break autofill.api.
Position
Below the diagonal: app.onboarding.ui.page.welcome uses a module listed above it, which is the healthy direction.
app.onboarding.ui.page.welcome uses navigation.api, so a change to navigation.api can break app.onboarding.ui.page.welcome, while a change to app.onboarding.ui.page.welcome can't break navigation.api.
Position
Below the diagonal: app.onboarding.ui.page.welcome uses a module listed above it, which is the healthy direction.
app.onboarding.ui.page.welcome uses app.browser.omnibar, so a change to app.browser.omnibar can break app.onboarding.ui.page.welcome, while a change to app.onboarding.ui.page.welcome can't break app.browser.omnibar.
Position
Below the diagonal: app.onboarding.ui.page.welcome uses a module listed above it, which is the healthy direction.
33→35 app.onboarding.ui.page.welcome uses app.onboardingpart of a loop✕
Connections
2 pairs of types, where a type in app.onboarding.ui.page.welcome uses a type in app.onboarding.
app.onboarding.ui.page.welcome uses app.onboarding, so a change to app.onboarding can break app.onboarding.ui.page.welcome, while a change to app.onboarding.ui.page.welcome can't break app.onboarding.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
duckchat.impl.history uses browsermode.api, so a change to browsermode.api can break duckchat.impl.history, while a change to duckchat.impl.history can't break browsermode.api.
Position
Below the diagonal: duckchat.impl.history uses a module listed above it, which is the healthy direction.
duckchat.impl.history uses common.ui, so a change to common.ui can break duckchat.impl.history, while a change to duckchat.impl.history can't break common.ui.
Position
Below the diagonal: duckchat.impl.history uses a module listed above it, which is the healthy direction.
duckchat.impl.history uses common.utils, so a change to common.utils can break duckchat.impl.history, while a change to duckchat.impl.history can't break common.utils.
Position
Below the diagonal: duckchat.impl.history uses a module listed above it, which is the healthy direction.
duckchat.impl.history uses common.utils.edgetoedge, so a change to common.utils.edgetoedge can break duckchat.impl.history, while a change to duckchat.impl.history can't break common.utils.edgetoedge.
Position
Below the diagonal: duckchat.impl.history uses a module listed above it, which is the healthy direction.
duckchat.impl.history uses common.utils.plugins, so a change to common.utils.plugins can break duckchat.impl.history, while a change to duckchat.impl.history can't break common.utils.plugins.
Position
Below the diagonal: duckchat.impl.history uses a module listed above it, which is the healthy direction.
duckchat.impl.history uses js.messaging.api, so a change to js.messaging.api can break duckchat.impl.history, while a change to duckchat.impl.history can't break js.messaging.api.
Position
Below the diagonal: duckchat.impl.history uses a module listed above it, which is the healthy direction.
duckchat.impl.history uses navigation.api.GlobalActivityStarter, so a change to navigation.api.GlobalActivityStarter can break duckchat.impl.history, while a change to duckchat.impl.history can't break navigation.api.GlobalActivityStarter.
Position
Below the diagonal: duckchat.impl.history uses a module listed above it, which is the healthy direction.
duckchat.impl.history uses app.statistics.pixels, so a change to app.statistics.pixels can break duckchat.impl.history, while a change to duckchat.impl.history can't break app.statistics.pixels.
Position
Below the diagonal: duckchat.impl.history uses a module listed above it, which is the healthy direction.
duckchat.impl.history uses duckchat.api, so a change to duckchat.api can break duckchat.impl.history, while a change to duckchat.impl.history can't break duckchat.api.
Position
Below the diagonal: duckchat.impl.history uses a module listed above it, which is the healthy direction.
duckchat.impl.history uses navigation.api, so a change to navigation.api can break duckchat.impl.history, while a change to duckchat.impl.history can't break navigation.api.
Position
Below the diagonal: duckchat.impl.history uses a module listed above it, which is the healthy direction.
duckchat.impl.history uses app.tabs.model, so a change to app.tabs.model can break duckchat.impl.history, while a change to duckchat.impl.history can't break app.tabs.model.
Position
Below the diagonal: duckchat.impl.history uses a module listed above it, which is the healthy direction.
duckchat.impl.history uses duckchat.impl.pixel, so a change to duckchat.impl.pixel can break duckchat.impl.history, while a change to duckchat.impl.history can't break duckchat.impl.pixel.
Position
Below the diagonal: duckchat.impl.history uses a module listed above it, which is the healthy direction.
app.onboarding uses app.statistics.pixels.Pixel, so a change to app.statistics.pixels.Pixel can break app.onboarding, while a change to app.onboarding can't break app.statistics.pixels.Pixel.
Position
Below the diagonal: app.onboarding uses a module listed above it, which is the healthy direction.
app.onboarding uses appbuildconfig.api, so a change to appbuildconfig.api can break app.onboarding, while a change to app.onboarding can't break appbuildconfig.api.
Position
Below the diagonal: app.onboarding uses a module listed above it, which is the healthy direction.
app.onboarding uses common.utils.plugins, so a change to common.utils.plugins can break app.onboarding, while a change to app.onboarding can't break common.utils.plugins.
Position
Below the diagonal: app.onboarding uses a module listed above it, which is the healthy direction.
app.onboarding uses data.store.api, so a change to data.store.api can break app.onboarding, while a change to app.onboarding can't break data.store.api.
Position
Below the diagonal: app.onboarding uses a module listed above it, which is the healthy direction.
app.onboarding uses feature.toggles.api, so a change to feature.toggles.api can break app.onboarding, while a change to app.onboarding can't break feature.toggles.api.
Position
Below the diagonal: app.onboarding uses a module listed above it, which is the healthy direction.
app.onboarding uses app.settings.db, so a change to app.settings.db can break app.onboarding, while a change to app.onboarding can't break app.settings.db.
Position
Below the diagonal: app.onboarding uses a module listed above it, which is the healthy direction.
app.onboarding uses app.statistics.pixels, so a change to app.statistics.pixels can break app.onboarding, while a change to app.onboarding can't break app.statistics.pixels.
Position
Below the diagonal: app.onboarding uses a module listed above it, which is the healthy direction.
app.onboarding uses privacy.config.api, so a change to privacy.config.api can break app.onboarding, while a change to app.onboarding can't break privacy.config.api.
Position
Below the diagonal: app.onboarding uses a module listed above it, which is the healthy direction.
app.onboarding uses app.onboarding.ui.page.welcome, so a change to app.onboarding.ui.page.welcome can break app.onboarding, while a change to app.onboarding can't break app.onboarding.ui.page.welcome.
Position
Below the diagonal: app.onboarding uses a module listed above it, which is the healthy direction.
duckchat.impl.contextual uses appbuildconfig.api, so a change to appbuildconfig.api can break duckchat.impl.contextual, while a change to duckchat.impl.contextual can't break appbuildconfig.api.
Position
Below the diagonal: duckchat.impl.contextual uses a module listed above it, which is the healthy direction.
duckchat.impl.contextual uses browsermode.api, so a change to browsermode.api can break duckchat.impl.contextual, while a change to duckchat.impl.contextual can't break browsermode.api.
Position
Below the diagonal: duckchat.impl.contextual uses a module listed above it, which is the healthy direction.
duckchat.impl.contextual uses common.ui, so a change to common.ui can break duckchat.impl.contextual, while a change to duckchat.impl.contextual can't break common.ui.
Position
Below the diagonal: duckchat.impl.contextual uses a module listed above it, which is the healthy direction.
duckchat.impl.contextual uses common.utils, so a change to common.utils can break duckchat.impl.contextual, while a change to duckchat.impl.contextual can't break common.utils.
Position
Below the diagonal: duckchat.impl.contextual uses a module listed above it, which is the healthy direction.
duckchat.impl.contextual uses js.messaging.api, so a change to js.messaging.api can break duckchat.impl.contextual, while a change to duckchat.impl.contextual can't break js.messaging.api.
Position
Below the diagonal: duckchat.impl.contextual uses a module listed above it, which is the healthy direction.
duckchat.impl.contextual uses contentscopescripts.api, so a change to contentscopescripts.api can break duckchat.impl.contextual, while a change to duckchat.impl.contextual can't break contentscopescripts.api.
Position
Below the diagonal: duckchat.impl.contextual uses a module listed above it, which is the healthy direction.
duckchat.impl.contextual uses duckchat.api, so a change to duckchat.api can break duckchat.impl.contextual, while a change to duckchat.impl.contextual can't break duckchat.api.
Position
Below the diagonal: duckchat.impl.contextual uses a module listed above it, which is the healthy direction.
duckchat.impl.contextual uses navigation.api, so a change to navigation.api can break duckchat.impl.contextual, while a change to duckchat.impl.contextual can't break navigation.api.
Position
Below the diagonal: duckchat.impl.contextual uses a module listed above it, which is the healthy direction.
duckchat.impl.contextual uses subscriptions.api, so a change to subscriptions.api can break duckchat.impl.contextual, while a change to duckchat.impl.contextual can't break subscriptions.api.
Position
Below the diagonal: duckchat.impl.contextual uses a module listed above it, which is the healthy direction.
duckchat.impl.contextual uses app.tabs.model, so a change to app.tabs.model can break duckchat.impl.contextual, while a change to duckchat.impl.contextual can't break app.tabs.model.
Position
Below the diagonal: duckchat.impl.contextual uses a module listed above it, which is the healthy direction.
duckchat.impl.contextual uses duckchat.impl.pixel, so a change to duckchat.impl.pixel can break duckchat.impl.contextual, while a change to duckchat.impl.contextual can't break duckchat.impl.pixel.
Position
Below the diagonal: duckchat.impl.contextual uses a module listed above it, which is the healthy direction.
duckchat.impl.contextual uses duckchat.impl.history, so a change to duckchat.impl.history can break duckchat.impl.contextual, while a change to duckchat.impl.contextual can't break duckchat.impl.history.
Position
Below the diagonal: duckchat.impl.contextual uses a module listed above it, which is the healthy direction.
36→38 duckchat.impl.contextual uses app.browserpart of a loop✕
Connections
1 pair of types, where a type in duckchat.impl.contextual uses a type in app.browser.
duckchat.impl.contextual uses app.browser, so a change to app.browser can break duckchat.impl.contextual, while a change to duckchat.impl.contextual can't break app.browser.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
app.cta.ui uses app.statistics.pixels.Pixel, so a change to app.statistics.pixels.Pixel can break app.cta.ui, while a change to app.cta.ui can't break app.statistics.pixels.Pixel.
Position
Below the diagonal: app.cta.ui uses a module listed above it, which is the healthy direction.
app.cta.ui uses common.utils.plugins, so a change to common.utils.plugins can break app.cta.ui, while a change to app.cta.ui can't break common.utils.plugins.
Position
Below the diagonal: app.cta.ui uses a module listed above it, which is the healthy direction.
app.cta.ui uses app.statistics.pixels, so a change to app.statistics.pixels can break app.cta.ui, while a change to app.cta.ui can't break app.statistics.pixels.
Position
Below the diagonal: app.cta.ui uses a module listed above it, which is the healthy direction.
app.cta.ui uses app.browser.omnibar, so a change to app.browser.omnibar can break app.cta.ui, while a change to app.cta.ui can't break app.browser.omnibar.
Position
Below the diagonal: app.cta.ui uses a module listed above it, which is the healthy direction.
app.cta.ui uses app.onboarding.ui.page.welcome, so a change to app.onboarding.ui.page.welcome can break app.cta.ui, while a change to app.cta.ui can't break app.onboarding.ui.page.welcome.
Position
Below the diagonal: app.cta.ui uses a module listed above it, which is the healthy direction.
app.browser uses app.statistics.pixels.Pixel, so a change to app.statistics.pixels.Pixel can break app.browser, while a change to app.browser can't break app.statistics.pixels.Pixel.
Position
Below the diagonal: app.browser uses a module listed above it, which is the healthy direction.
app.browser uses appbuildconfig.api, so a change to appbuildconfig.api can break app.browser, while a change to app.browser can't break appbuildconfig.api.
Position
Below the diagonal: app.browser uses a module listed above it, which is the healthy direction.
app.browser uses autofill.api.domain.app, so a change to autofill.api.domain.app can break app.browser, while a change to app.browser can't break autofill.api.domain.app.
Position
Below the diagonal: app.browser uses a module listed above it, which is the healthy direction.
app.browser uses common.utils.edgetoedge, so a change to common.utils.edgetoedge can break app.browser, while a change to app.browser can't break common.utils.edgetoedge.
Position
Below the diagonal: app.browser uses a module listed above it, which is the healthy direction.
app.browser uses common.utils.plugins, so a change to common.utils.plugins can break app.browser, while a change to app.browser can't break common.utils.plugins.
Position
Below the diagonal: app.browser uses a module listed above it, which is the healthy direction.
app.browser uses feature.toggles.api, so a change to feature.toggles.api can break app.browser, while a change to app.browser can't break feature.toggles.api.
Position
Below the diagonal: app.browser uses a module listed above it, which is the healthy direction.
app.browser uses app.browser.favicon, so a change to app.browser.favicon can break app.browser, while a change to app.browser can't break app.browser.favicon.
Position
Below the diagonal: app.browser uses a module listed above it, which is the healthy direction.
app.browser uses app.statistics.pixels, so a change to app.statistics.pixels can break app.browser, while a change to app.browser can't break app.statistics.pixels.
Position
Below the diagonal: app.browser uses a module listed above it, which is the healthy direction.
app.browser uses contentscopescripts.api, so a change to contentscopescripts.api can break app.browser, while a change to app.browser can't break contentscopescripts.api.
Position
Below the diagonal: app.browser uses a module listed above it, which is the healthy direction.
app.browser uses privacy.config.api, so a change to privacy.config.api can break app.browser, while a change to app.browser can't break privacy.config.api.
Position
Below the diagonal: app.browser uses a module listed above it, which is the healthy direction.
app.browser uses subscriptions.api, so a change to subscriptions.api can break app.browser, while a change to app.browser can't break subscriptions.api.
Position
Below the diagonal: app.browser uses a module listed above it, which is the healthy direction.
app.browser uses app.browser.omnibar, so a change to app.browser.omnibar can break app.browser, while a change to app.browser can't break app.browser.omnibar.
Position
Below the diagonal: app.browser uses a module listed above it, which is the healthy direction.
app.browser uses duckchat.impl.contextual, so a change to duckchat.impl.contextual can break app.browser, while a change to app.browser can't break duckchat.impl.contextual.
Position
Below the diagonal: app.browser uses a module listed above it, which is the healthy direction.
app.browser.di uses appbuildconfig.api, so a change to appbuildconfig.api can break app.browser.di, while a change to app.browser.di can't break appbuildconfig.api.
Position
Below the diagonal: app.browser.di uses a module listed above it, which is the healthy direction.
app.browser.di uses app.browser.favicon, so a change to app.browser.favicon can break app.browser.di, while a change to app.browser.di can't break app.browser.favicon.
Position
Below the diagonal: app.browser.di uses a module listed above it, which is the healthy direction.
app.browser.di uses app.settings.db, so a change to app.settings.db can break app.browser.di, while a change to app.browser.di can't break app.settings.db.
Position
Below the diagonal: app.browser.di uses a module listed above it, which is the healthy direction.
app.browser.di uses app.statistics.pixels, so a change to app.statistics.pixels can break app.browser.di, while a change to app.browser.di can't break app.statistics.pixels.
Position
Below the diagonal: app.browser.di uses a module listed above it, which is the healthy direction.
app.browser.di uses privacy.config.api, so a change to privacy.config.api can break app.browser.di, while a change to app.browser.di can't break privacy.config.api.
Position
Below the diagonal: app.browser.di uses a module listed above it, which is the healthy direction.
app.browser.di uses subscriptions.api, so a change to subscriptions.api can break app.browser.di, while a change to app.browser.di can't break subscriptions.api.
Position
Below the diagonal: app.browser.di uses a module listed above it, which is the healthy direction.
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 category
Findings
Severity
A05:2025 — Injection
462
High / Critical
A03:2025 — Software Supply Chain Failures
89
High / Critical
A07:2025 — Authentication Failures
3
High / Critical
Roadmap
Immediately resolve the three leaked secrets in REDACTED and REDACTED, then integrate a SAST step into CI to prevent future security regressions. Strengthen system resilience by enforcing timeouts on all outbound HTTP clients and wrapping dependency calls with retry or circuit breaker patterns. Finally, complete the migration to strongly-typed IDs to prevent argument errors and move business rules into entities to enforce invariants at the source.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 3 Leaked secret finding(s) in Secret Scanning — start with REDACTED (2), REDACTED.
Add a SAST step to CI running what this repository's stack ships: spotbugs with find-sec-bugs — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
Set connect and read timeouts on every client (`RestTemplateBuilder.connectTimeout/readTimeout`, WebClient `responseTimeout`, `HttpRequest.Builder.timeout`, `HttpURLConnection.setReadTimeout`, Feign `connectTimeout`/`readTimeout` in configuration), and wrap calls to dependencies in resilience4j `@Retry`/`@CircuitBreaker`/`@TimeLimiter` (or Spring Retry).
Give each aggregate one way in that can refuse — a guarded constructor, value-object parameters that validate themselves, or a private constructor behind a factory that returns a failure.
Make entity setters private/init-only and hand collections out as IReadOnlyList/IReadOnlyCollection over a private backing field; change state only through methods that enforce the invariants (Marten/EF can bind via constructor or private setters).
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 — 473
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 — 976
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 — 170
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 11
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
Watchdog 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. 77 of 80 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 3 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.9 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.
Every figure here is one of three 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; ◐ Advisory — an LLM prose judgement. 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; ◐ Sampled · advisory marks an LLM verdict over a bounded sample — advisory, never a deterministic measurement.
What we checked — 80 dimensions across the health lenses
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
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, 1578 of 1619 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.)
Is there a tool behind the number? Every score below names the method that produced it — Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — not a narrative.
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.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
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.
D11 Test Reliability — not measured this run — Watchdog 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. Test reliability not scored — the JavaScript/TypeScript suite (jest via `npm ci --ignore-scripts` in .github/actions/pr-asana-sync/ (0 tests)) ran but surfaced no test cases to the runner, so flakiness couldn't be exercised.
D14 License Compliance — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it 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 Gradle build (build.gradle/build.gradle.kts), but the licence verdict published here was taken over its gem dependencies. Nothing was read about its Gradle dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
D14 License Compliance — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it 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 package.json, but the licence verdict published here was taken over its gem dependencies. Nothing was read about its npm dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
D14 License Compliance — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it 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 Python pyproject.toml/requirements.txt (pip/uv/Poetry), but the licence verdict published here was taken over its gem dependencies. Nothing was read about its Python dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
D22 Internal API Consistency — not measured this run — Watchdog 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 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is a COLLECTOR gap, not an environment fault: it declares a published package (ad-blocking/ad-blocking-api/build.gradle), but no published-package marker D22 reads admitted any project here, so this ecosystem's public API has no collector, and the remedy is to write one — no change to the scan image can close it.
D27 Navigability — not measured this run — Watchdog 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. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
D32 Data Compliance (PII/GDPR) — not measured this run — Watchdog 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. `ad-click/ad-click-impl/src/main/java/com/duckduckgo/adclick/impl/store/exemptions/AdClickExemptionsDatabase.kt`, `android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/component/ComponentViewHolder.kt`, `android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/compose/theme/Typography.kt`, `android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/ViewExtension.kt`, `app-database/src/main/java/com/duckduckgo/app/browser/session/WebViewSessionEntity.kt`, … (+87 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.
AX1 Captive dependencies — not measured this run — Watchdog 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 Microsoft.Extensions.DependencyInjection registrations in C# and Spring beans in Java/Kotlin only, and this repository's container is Metro, whose lifetimes are not modelled 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.
AXR1 Runtime accessibility — not measured this run — Watchdog 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. Boot via AndroidApp (app). the Android app did not build — `./gradlew :app:assembleDebug` exited 1: -coroutines-core/1.7.3/kotlinx-coroutines-core-1.7.3.pom'.
> Could not GET 'https://repo.maven.apache.org/maven2/org/jetbrains/kotlinx/kotlinx-coroutines-core/1.7.3/kotlinx-coroutines-core-1.…; runtime evidence skipped (launch chosen because app/build.gradle applies the Android application plugin and gradlew builds it).
C2 Access Controls — not measured this run — Watchdog 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.
DM11 Constructible invalid state — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it 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. 107 further occurrence(s) are not listed individually; the score already reflects all 147.
DM4 Rich vs anemic model — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it 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. 10 further occurrence(s) are not listed individually; the score already reflects all 50.
DM9 Scattered domain decisions — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it 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. The frontend declares that it computes whether a construction is produced or passed, yet 6118 of 6140 constructions arrived without the answer. Arm two skipped them; it did not clear them.
ED5 Idempotency — not measured this run — Watchdog 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 decides whether a handler's mutation is safe to re-run by recognising its persistence writes (a database save, a repository write, an event publish) and its guards. Those markers are .NET member names, so in this repository's language a write such as `repository.save(order)` is not recognised and a same-named call on an unrelated library type could be. The handlers were found; their idempotency was neither confirmed nor ruled out.
GD1 Unfinished & placeholder code — not measured this run — Watchdog 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 Java, Kotlin, Python, cpp 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 — Watchdog 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 Kotlin, Python, cpp 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.
P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
S1 Web-Security Posture — not measured this run — Watchdog 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.
Repo exclusion declarations: 10 pattern(s) declared (.gitattributes linguist-generated/vendored, .editorconfig generated_code) excluded 0 source file(s) from code-quality scoring. Declarations are the repo's own visible statement that a tree is machine-written or vendored — auditable in any diff, honored by GitHub the same way.
Limitations & what we did not check
Watchdog assesses the repository exactly as committed, and only the repository. By design it does 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.
D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
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 Secret Scanning: Secret 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.
D19 Documentation Quality: Documentation quality is judged by an LLM over a bounded sample of docs — it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement. Its critique rows are drawn from a closed category vocabulary and each row means the same thing in every run, so two scans can be compared row by row; the SET that fires is still a sample, and does not repeat exactly. Measured on one frozen input, six scans at one engine SHA: 2-5 critique rows per scan, 8 distinct rows across the six, 3 of those 8 seen in only one scan. So a D19 row is evidence about the documentation, but a COUNT of D19 rows is not a quantity — never read a change in it as an improvement or a regression.
D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
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.
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 REDACTED, 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.
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.
C4 Data Retention: This control is scored from in-repo evidence only — its real-world effectiveness, exercised only at runtime, is outside a static scan.
C5 Data-Subject Rights: This control is scored from in-repo evidence only — absence of evidence here means the scan found no in-repo trace, not that the control does not exist.
DM4 Rich vs anemic 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: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
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.
The LLM boundary
LLM-set scores this run (3): D19, D21, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score; each names its own sample and method on its card. They are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.
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.
54 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was BrowserTabFragment.processCommand at 156. A further 23 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 RealPirRunStateHandler.handleState at 26 — they are counted neither in the figure above nor in this dimension's score. 19 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: app/src/main/java/com/duckduckgo/app/onboarding/ui/page/welcome/WelcomePageViewModel.kt (WelcomePageViewModel.handleCommandOnlyDialog at 26), pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/common/PirRunStateHandler.kt (RealPirRunStateHandler.handleState at 26), app/src/main/java/com/duckduckgo/app/onboarding/ui/page/welcome/DialogConfigResolver.kt (DialogConfigResolver.resolve at 25), app/src/main/java/com/duckduckgo/app/settings/SettingsActivity.kt (SettingsActivity.processCommand at 25), android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/component/ComponentViewHolder.kt (ComponentViewHolder.create at 24), and 14 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.
+ 47 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 2 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with BrowserTabFragment.processCommand (cyclomatic 156), DuckAiNativeStorageJsMessageHandler.getJsMessageHandler (cyclomatic 61). — 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 2 together lifts Cyclomatic Complexity from 5.5 to about 6.5/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
+ 100 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 1 body over 60 down to 60 or less in Cognitive Complexity — start with DuckAiNativeStorageJsMessageHandler.getJsMessageHandler (cognitive 96). — Refactoring it lifts Cognitive Complexity from 6.1 to about 6.5/10.
Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes9.0 / 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.
Resolve the 70 TooManyMethods finding(s) in God Classes — start with BrowserTabFragment.kt (2), BrowserTabViewModel.kt, NativeInputModeWidget.kt. — One of this dimension's main actionable groups (70 warning-level).
Resolve the 47 ClassTooLong finding(s) in God Classes — start with BrowserTabViewModel.kt, NativeInputModeWidget.kt, BrowserActivity.kt. — One of this dimension's main actionable groups (47 warning-level).
Resolve the 43 FileTooLong finding(s) in God Classes — start with BrowserTabFragment.kt, BrowserTabViewModel.kt, DuckChatPixels.kt. — One of this dimension's main actionable groups (43 warning-level).
Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Copy-pasted code that should be shared instead.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.
307 duplicated block group(s) detected. A further 6 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted. 1 of the 313 are in trees this repository does not ship — vendored, example/demo, 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.
+ 80 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 20 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with DuckPlayerScriptsJsMessaging.kt, AppDatabaseBookmarksMigrationCallback.kt, AppTPAndNetPEnabledNotificationContentPlugin.kt. — One of this dimension's main actionable groups (20 warning-level).
Resolve the 19 Duplicated block (12 lines × 2) finding(s) in Code Duplication — start with DialogsFragment.kt, DaxDialog.kt, TypeAnimationTextView.kt. — One of this dimension's main actionable groups (19 warning-level).
Resolve the 19 Duplicated block (11 lines × 2) finding(s) in Code Duplication — start with DaxRadioOptions.kt, ExclusionListAdapter.kt, BrowserActivity.kt. — One of this dimension's main actionable groups (19 warning-level).
Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling9.9 / 10Stronggated by 3 serious findings✓ 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.
201 production modules (Gradle+npm+CMake), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; edges a convention plugin adds from buildSrc or build-logic are not visible there; 3 module(s) off the main sequence, with abstractness counted on 196 of the 201 (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: :app-store · ×3
What to do
Resolve the 3 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (3 warning-level).
Enforce Coupling in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d5_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
Resolve the 16 Low cohesion finding(s) in Cohesion (LCOM4) — start with TextDrawable.kt, AutofillResponseWriter.kt, PromoBottomSheetDialog.kt. — One of this dimension's main actionable groups (16 warning-level).
Enforce Cohesion (LCOM4) in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D9 · Test Distribution10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.
Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.
71 test methods: 71 unit, 0 integration, 0 BDD, 0 e2e. The Python suite contributes 71 test function(s) across 1 file(s) declaring at least one — every `def test…` in a file pytest or unittest would collect, which is those frameworks' own definition of a case; a parametrize table counts once, so this is a floor. Its tier split is read from file names and paths only.
What it measures: Whether dependencies are current, secure, and not bloated.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (saturating for vulnerabilities, capped-linear for deprecation/outdated) per KLoC. Exhaustive, deterministic.
1 outdated direct gem(s), 0 pinning defect(s). 1 declaration(s) graded against rubygems.org, 1 of them against a version resolved in a committed REDACTED. Whether any of these gems is DEPRECATED or YANKED is not graded — rubygems.org publishes no deprecation marker, and a yank removes a version rather than flagging it. Whether any is UNMAINTAINED is not graded either: no registry publishes a maintenance status, and release age does not stand in for one. Whether any is UNUSED is a source question, not a registry one. Known CVEs in this dependency graph are D30's question, read from the manifest there.
Outdated: fastlane
✓ On the Gold path — maintain.
Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
Resolve the 3 Leaked secret finding(s) in Secret Scanning — start with REDACTED (2), REDACTED. — One of this dimension's main actionable groups (3 issue-level).
Enforce Secret Scanning in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d13_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
0 of 89 shipped gem(s) use a banned license. Licences were resolved from rubygems.org over the 89 gem(s) a consumer installs — this repository's runtime declarations closed transitively over its committed REDACTED. 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 Gradle build (build.gradle/build.gradle.kts), package.json and a Python pyproject.toml/requirements.txt (pip/uv/Poetry), and the licences of those dependency graphs 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.
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.
Resolve the 34 Hotspot finding(s) in Churn × Complexity Hotspots — start with RemoteMessageMapper.kt (2), BrowserTabFragment.kt, BrowserTabViewModel.kt. — One of this dimension's main actionable groups (34 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor8.9 / 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.
244 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/ui/dashboard/SyncActivity.kt. Counted over 2275 of the 4503 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Off-boarding risk: anonymized user #1 · ×17
Further sole-owners (lower concentration)
What to do
Resolve the 17 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (17 recommendation-level).
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.
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.
43 deducted task-comment markers across 434476 LoC (0.0/KLoC) → score 10.0. 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.
Resolve the 39 TodoComment finding(s) in Explicit Debt — start with TrackerBlockingVpnService.kt (5), FragmentStateAdapter.java (4), AppComponentsActivity.kt (2). — One of this dimension's main actionable groups (39 warning-level).
Resolve the 4 FixmeComment finding(s) in Explicit Debt — start with HttpsReferenceTest.kt, JsonModule.kt, SettingsViewModel.kt. — One of this dimension's main actionable groups (4 warning-level).
Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Judged by language model at low temperature (0.0-0.1) on a deterministic doc sample (READMEs plus first 25 architecture docs), with two-pass stability filtering. Advisory, sampled.
The repository's root README is a strong overview of the DuckDuckGo Android project (hiring, git submodule setup, terminology changes, contributing, license), with a dedicated build-benchmarks directory that explains how it measures build performance and tracks statistical metrics. The remaining directories document their own tiers (PixelDefinitions, ad-blocking, app-tracking-protection) without an overarching repository overview or installation guide, so the quality is mixed.
What to do
Improve Documentation Quality — currently 7.0/10. — The repository's root README is a strong overview of the DuckDuckGo Android project (hiring, git submodule setup, terminology changes, contributing, license), with a dedicated build-benchmarks directory that explains how it measures build performance and tracks statistical metrics. The remaining directories document their own tiers (PixelDefinitions, ad-blocking, app-tracking-protection) without an overarching repository overview or installation guide, so the quality is mixed.
Detailed fixes: d19_recommendation.md.
Do you agree with this assessment?
D20 · ADR Quality0.0 / 10Critical✓ Tool-verified
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Per-ADR judgment by language model at low temperature with two-pass stability; confidence is share of ADRs evaluated; enforcement-field presence detected deterministically. Advisory.
What it measures: Whether names — types, methods, variables — are clear and consistent.
Method: Judged by language model at low temperature (0.0-0.1) on a deterministic random symbol sample (fixed size, not exhaustive), with disclosed confidence band. Advisory, sampled.
13 of 195 build units (Gradle, Python) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesion
What to do
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.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: Secret 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.
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).
462 finding(s): 0 critical, 437 high, 24 medium, 1 low. 230 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 4 file(s) — `app/src/androidTest/resources/json/atb_response_invalid_malformed_json.json`, `autofill/autofill-internal/src/main/java/com/duckduckgo/autofill/internal/AutofillInternalSettingsActivity.kt` (line 655), `gradlew` (line 74, line 181), `subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/SubscriptionsManager.kt` — 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 24 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
+ 10 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 128 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (12), REDACTED (9), REDACTED (8). — One of this dimension's main actionable groups (128 issue-level).
Resolve the 9 REDACTED finding(s) charged to Static Analysis (SAST) — the other 230 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 (239 issue-level, 9 of them charged here).
Resolve the 23 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (7), REDACTED (3), REDACTED (2). — One of this dimension's main actionable groups (23 issue-level).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
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 REDACTED 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.
Resolve the 28 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (21), REDACTED (6), REDACTED. — One of this dimension's main actionable groups (28 issue-level).
Resolve the 1 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 High vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
64 of 2275 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/DaxDialog.kt. Counted over 2275 of the 4503 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
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.
Resolve the 2 Boundary-crossing change coupling finding(s) in Change Coupling — start with NativeInputAnimator.kt, BrowserMenuViewStateFactory.kt. — One of this dimension's main actionable groups (2 issue-level).
Resolve the 8 Change coupling finding(s) in Change Coupling — start with SyncActivity.kt, DuckAiFeatureState.kt, BrowserTabFragment.kt. — One of this dimension's main actionable groups (8 warning-level).
Resolve the 1 Change coupling clique finding(s) in Change Coupling — start with AttachmentView.kt. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
+ 7 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 38 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (38 warning-level).
Resolve the 2 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 warning-level).
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.
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. Scored 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. SCORED, not informational.
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.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 30 platform declaration(s) and 441 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.
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.
What to do
The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
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.
Other · Architecture — Whether the codebase has a recognisable, scale-appropriate structure (a named architectural style, or modular enough for its size) rather than being an ad-hoc ball of mud.
Method: Roslyn plus csproj analysis: architecture style detection (DDD, clean, vertical-slice, CQRS) and structure fitness for repo size. Deterministic.
Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').
Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.
Do you agree with this assessment?
C1 · Data Protection5.0 / 10Adequate✓ Tool-verified
Other · Security — Whether sensitive data is encrypted at rest and in transit and keys are vaulted.
Method: Roslyn plus filesystem scan: encryption presence (EF ColumnEncryption, key-vault references, HTTPS enforcement) and key-derivation KDF detection. Deterministic.
What to do
Strengthen data-at-rest protection: vault your keys (AWS KMS / Secrets Manager, GCP KMS / Secret Manager, Azure Key Vault, HashiCorp Vault — not a key compiled into the app) and encrypt the store that holds the personal data (SQLCipher, a Realm encryptionKey, field-level AEAD) — partial coverage still leaves gaps.
Enforce HTTPS on the server that receives this data: terminate TLS in it (Ktor's sslConnector, Spring's server.ssl and requiresSecure, Netty's SslContextBuilder.forServer) and send Strict-Transport-Security (Ktor's HttpsRedirect), or run it behind a TLS-terminating proxy, so data in transit is always encrypted.
Do you agree with this assessment?
C4 · Data Retention10.0 / 10Exemplary✓ Tool-verified
Other · Security — Whether data has a defined lifetime — retention periods, TTLs, cleanup jobs (storage limitation).
Method: Roslyn scan: retention/TTL configuration presence in schema; CascadeDelete detected but not scored as retention control. Deterministic, gated by PII presence.
Other · Security — Whether GDPR data-subject requests are supported in code — erasure, export/portability, consent.
Method: Roslyn scan: GDPR data-subject-rights corroboration (erasure/export/consent vocabulary co-occurring with subject-id store crossing or explicit GDPR pattern). Deterministic, gated by PII.
Corroborated rights: erasure ✓ · export ✗ · consent ✗. Each tick means this scan found code in the repository implementing that right — a deletion/anonymisation path for erasure, a data-export or portability path for export, and consent state recorded alongside the personal data it authorises. A ✗ therefore means no such code was recognised HERE, not that the right is unsupported: a capability provided by a platform, a manual runbook, or code spelled in a way this scan does not match is not visible to it. Confirm before treating a cross as a gap; where it is one, the right has to be fulfilled manually.
What to do
Implement data export/portability for a data subject (a machine-readable export of their personal data).
Track GDPR consent (lawful basis) alongside the personal data it authorises.
Other · Domain Modelling — Whether aggregates reference each other by identity (id) rather than by direct object reference — the core DDD consistency-boundary rule.
Method: Roslyn (DDD-gated): aggregate roots identified by convention; each aggregate field checked for direct references to other aggregates versus id-only. Deterministic, DDD-native.
Coverage: Population: aggregate roots identified by AggregateRoot/IAggregateRoot base/interface NAME convention; reference-by-identity then checked exhaustively within that set — a root not using those names is invisible.
Do you agree with this assessment?
DM10 · One transaction, one aggregate9.8 / 10Exemplary✓ Tool-verified
Other · Domain Modelling — Whether a single operation mutates more than one aggregate root. An aggregate is a consistency boundary, so saving two together fuses them into one — the second's invariants come to depend on the first's transaction, and the pair can no longer be separated. Reads of other aggregates are not counted.
Method: Neutral body surface (DDD-gated): every method body scanned for repository WRITE calls (Add/Update/Save/Remove/Delete/Insert/Store and their async forms), keyed on the ARGUMENT type rather than the repository type — three `IRepository<T>` writes collapse to one repository but are three distinct aggregates. Reads (Get/Find/Load/Query) are excluded, so loading another aggregate for context never counts. Score is offending methods over methods that write at all. Deterministic.
`RealSavedSitesRepository.insertFolderBranch` saves `BookmarkFolder`, `Bookmark` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event. — saved-sites/saved-sites-impl/src/main/java/com/duckduckgo/savedsites/impl/SavedSitesRepository.kt:158
`RealSavedSitesRepository.deleteFolderBranch` saves `BookmarkFolder`, `Bookmark` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event. — saved-sites/saved-sites-impl/src/main/java/com/duckduckgo/savedsites/impl/SavedSitesRepository.kt:209
`RealSavedSitesSyncPersisterAlgorithm.processDeletedItems` saves `Bookmark`, `Favorite`, `BookmarkFolder` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event. — saved-sites/saved-sites-impl/src/main/java/com/duckduckgo/savedsites/impl/sync/algorithm/SavedSitesSyncPersisterAlgorithm.kt:272
What to do
Mutate one aggregate per operation and let the others follow from a domain event — the second aggregate reaching consistency a moment later is the design, not a compromise.
Other · Domain Modelling — Whether an aggregate can be constructed in a state its own rules forbid — a public constructor that takes a raw primitive, stores it, and validates nothing, with no factory beside it. A constructor taking only value objects is not counted: each parameter has already validated itself.
Method: Neutral surface (DDD-gated): each non-abstract entity/aggregate checked for a PUBLIC constructor taking at least one RAW PRIMITIVE parameter whose body contains no guard token (throw / Guard. / Ensure. / ArgumentException / CheckRule), on a type that also offers no static Create/Of/From/New factory. A constructor taking only value objects is never charged -- measured: 64 of 87 unguarded public constructors on the C# corpus take value objects only, so ignoring parameter types would be 73% false positives. One finding per entity. Deterministic.
`WebCompatEntity`'s public constructor takes `json` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `WebCompatEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — web-compat/web-compat-store/src/main/java/com/duckduckgo/webcompat/store/WebCompatEntity.kt:22
`ManufacturerEntity`'s public constructor takes `name` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `ManufacturerEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — voice-search/voice-search-store/src/main/java/com/duckduckgo/voice/store/VoiceSearchDatabaseModels.kt:23
`LocaleEntity`'s public constructor takes `name` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `LocaleEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — voice-search/voice-search-store/src/main/java/com/duckduckgo/voice/store/VoiceSearchDatabaseModels.kt:29
`UserAgentExceptionEntity`'s public constructor takes `domain`, `reason` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `UserAgentExceptionEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — user-agent/user-agent-store/src/main/java/com/duckduckgo/user/agent/store/UserAgentDatabaseModels.kt:24
`ClientHintBrandDomainEntity`'s public constructor takes `url`, `brand` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `ClientHintBrandDomainEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — user-agent/user-agent-impl/src/main/java/com/duckduckgo/user/agent/impl/store/ClientBrandHintDatabaseModels.kt:23
`TdsCnameEntity`'s public constructor takes `cloakedHostName`, `uncloakedHostName` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `TdsCnameEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — tracker-detection/tracker-detection-impl/src/main/java/com/duckduckgo/app/trackerdetection/model/TdsCnameEntity.kt:23
`TdsDomainEntity`'s public constructor takes `domain`, `entityName` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `TdsDomainEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — tracker-detection/tracker-detection-impl/src/main/java/com/duckduckgo/app/trackerdetection/model/TdsDomainEntity.kt:23
`TdsEntity`'s public constructor takes `name`, `displayName`, `prevalence` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `TdsEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — tracker-detection/tracker-detection-impl/src/main/java/com/duckduckgo/app/trackerdetection/model/TdsEntity.kt:23
`TdsMetadata`'s public constructor takes `eTag` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `TdsMetadata` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — tracker-detection/tracker-detection-impl/src/main/java/com/duckduckgo/app/trackerdetection/model/TdsMetadata.kt:23
`TdsTracker`'s public constructor takes `ownerName` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `TdsTracker` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — tracker-detection/tracker-detection-impl/src/main/java/com/duckduckgo/app/trackerdetection/model/TdsTracker.kt:28
`SyncAttempt`'s public constructor takes `timestamp`, `meta` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `SyncAttempt` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — sync/sync-store/src/main/java/com/duckduckgo/sync/store/model/SyncDatabaseModels.kt:28
`SyncApiError`'s public constructor takes `feature`, `date` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `SyncApiError` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — sync/sync-store/src/main/java/com/duckduckgo/sync/store/model/SyncDatabaseModels.kt:48
`SyncOperationError`'s public constructor takes `feature`, `date` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `SyncOperationError` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — sync/sync-store/src/main/java/com/duckduckgo/sync/store/model/SyncDatabaseModels.kt:66
`SettingsSyncMetadataEntity`'s public constructor takes `key`, `modified_at`, `deleted_at` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `SettingsSyncMetadataEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — sync/sync-settings-impl/src/main/java/com/duckduckgo/sync/settings/impl/SettingsSyncMetadataEntity.kt:24
`DailyPixelFired`'s public constructor takes `name` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `DailyPixelFired` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — statistics/statistics-impl/src/main/java/com/duckduckgo/app/statistics/model/DailyPixelFired.kt:24
`UniquePixelFired`'s public constructor takes `name` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `UniquePixelFired` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — statistics/statistics-impl/src/main/java/com/duckduckgo/app/statistics/model/UniquePixelFired.kt:23
`WideEventDailyOccurrenceEntity`'s public constructor takes `dedupKey` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `WideEventDailyOccurrenceEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — statistics/statistics-impl/src/main/java/com/duckduckgo/app/statistics/wideevents/db/WideEventDailyOccurrenceEntity.kt:25
`WideEventEntity`'s public constructor takes `name`, `flowEntryPoint`, `metaType`, `metaVersion`, … as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `WideEventEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — statistics/statistics-impl/src/main/java/com/duckduckgo/app/statistics/wideevents/db/WideEventEntity.kt:36
`SitePreferencesEntity`'s public constructor takes `domain` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `SitePreferencesEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — site-preferences/site-preferences-impl/src/main/java/com/duckduckgo/site/preferences/impl/store/SitePreferencesEntity.kt:23
`SitePermissionsEntity`'s public constructor takes `domain`, `askCameraSetting`, `askMicSetting`, `askDrmSetting`, … as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `SitePermissionsEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — site-permissions/site-permissions-store/src/main/java/com/duckduckgo/site/permissions/store/sitepermissions/SitePermissionsEntity.kt:26
`SitePermissionAllowedEntity`'s public constructor takes `domain`, `tabId`, `permissionAllowed` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `SitePermissionAllowedEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — site-permissions/site-permissions-store/src/main/java/com/duckduckgo/site/permissions/store/sitepermissionsallowed/SitePermissionAllowedEntity.kt:26
`Entity`'s public constructor takes `entityId`, `title`, `url`, `lastModified` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `Entity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — saved-sites/saved-sites-store/src/main/java/com/duckduckgo/savedsites/store/RoomEntities.kt:26
`Relation`'s public constructor takes `folderId`, `entityId` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `Relation` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — saved-sites/saved-sites-store/src/main/java/com/duckduckgo/savedsites/store/RoomEntities.kt:58
`SavedSitesSyncMetadataEntity`'s public constructor takes `folderId`, `childrenResponse`, `childrenRequest` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `SavedSitesSyncMetadataEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — saved-sites/saved-sites-impl/src/main/java/com/duckduckgo/savedsites/impl/sync/store/SavedSitesSyncMetadataDao.kt:78
`RuntimeChecksEntity`'s public constructor takes `json` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `RuntimeChecksEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — runtime-checks/runtime-checks-store/src/main/java/com/duckduckgo/runtimechecks/store/RuntimeChecksEntity.kt:22
`RequestFiltererExceptionEntity`'s public constructor takes `domain`, `reason` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `RequestFiltererExceptionEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — request-filterer/request-filterer-store/src/main/java/com/duckduckgo/request/filterer/store/RequestFiltererDatabaseModels.kt:29
`RemoteMessageEntity`'s public constructor takes `id`, `message` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `RemoteMessageEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — remote-messaging/remote-messaging-store/src/main/java/com/duckduckgo/remote/messaging/store/RemoteMessageEntity.kt:23
`RemoteMessagingCohort`'s public constructor takes `messageId` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `RemoteMessagingCohort` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — remote-messaging/remote-messaging-store/src/main/java/com/duckduckgo/remote/messaging/store/RemoteMessagingCohort.kt:23
`RemoteMessagingConfig`'s public constructor takes `evaluationTimestamp` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `RemoteMessagingConfig` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — remote-messaging/remote-messaging-store/src/main/java/com/duckduckgo/remote/messaging/store/RemoteMessagingConfig.kt:24
`TrackerAllowlistEntity`'s public constructor takes `domain` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `TrackerAllowlistEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — privacy-config/privacy-config-store/src/main/java/com/duckduckgo/privacy/config/store/PrivacyConfigDatabaseModels.kt:31
`DrmExceptionEntity`'s public constructor takes `domain`, `reason` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `DrmExceptionEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — privacy-config/privacy-config-store/src/main/java/com/duckduckgo/privacy/config/store/PrivacyConfigDatabaseModels.kt:56
`UnprotectedTemporaryEntity`'s public constructor takes `domain`, `reason` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `UnprotectedTemporaryEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — privacy-config/privacy-config-store/src/main/java/com/duckduckgo/privacy/config/store/PrivacyConfigDatabaseModels.kt:66
`HttpsExceptionEntity`'s public constructor takes `domain`, `reason` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `HttpsExceptionEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — privacy-config/privacy-config-store/src/main/java/com/duckduckgo/privacy/config/store/PrivacyConfigDatabaseModels.kt:72
`GpcHeaderEnabledSiteEntity`'s public constructor takes `domain` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `GpcHeaderEnabledSiteEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — privacy-config/privacy-config-store/src/main/java/com/duckduckgo/privacy/config/store/PrivacyConfigDatabaseModels.kt:82
`GpcExceptionEntity`'s public constructor takes `domain` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `GpcExceptionEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — privacy-config/privacy-config-store/src/main/java/com/duckduckgo/privacy/config/store/PrivacyConfigDatabaseModels.kt:89
`GpcContentScopeConfigEntity`'s public constructor takes `config` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `GpcContentScopeConfigEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — privacy-config/privacy-config-store/src/main/java/com/duckduckgo/privacy/config/store/PrivacyConfigDatabaseModels.kt:96
`ContentBlockingExceptionEntity`'s public constructor takes `domain`, `reason` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `ContentBlockingExceptionEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — privacy-config/privacy-config-store/src/main/java/com/duckduckgo/privacy/config/store/PrivacyConfigDatabaseModels.kt:102
`PrivacyConfig`'s public constructor takes `readme`, `eTag`, `timestamp` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `PrivacyConfig` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — privacy-config/privacy-config-store/src/main/java/com/duckduckgo/privacy/config/store/PrivacyConfigDatabaseModels.kt:112
`AmpLinkFormatEntity`'s public constructor takes `format` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `AmpLinkFormatEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — privacy-config/privacy-config-store/src/main/java/com/duckduckgo/privacy/config/store/PrivacyConfigDatabaseModels.kt:125
`AmpKeywordEntity`'s public constructor takes `keyword` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `AmpKeywordEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — privacy-config/privacy-config-store/src/main/java/com/duckduckgo/privacy/config/store/PrivacyConfigDatabaseModels.kt:130
What to do
Give each aggregate one way in that can refuse — a guarded constructor, value-object parameters that validate themselves, or a private constructor behind a factory that returns a failure.
Do you agree with this assessment?
DM12 · Ambient inputs in the domain10.0 / 10Exemplary○ Nothing flagged
Other · Domain Modelling — Whether domain types receive the time and randomness their rules depend on, rather than reading the process clock or a global random source directly — an ambient read makes the rule it feeds untestable at the instant that matters and lets two reads inside one operation disagree.
Method: Roslyn (DDD-gated, C#/VB only): domain-layer types scanned for ambient reads — DateTime/DateTimeOffset.Now/UtcNow/Today, Random.Shared, new Random(), Stopwatch.GetTimestamp — resolved against the semantic model, with a comment/string-stripped token fallback only where resolution fails. Body reads are scored; field/property initialisers are surfaced unscored. Apply/When folds excluded (ES1 owns them). Deterministic, symbol-resolved.
Other · Domain Modelling — How much of the domain uses strongly-typed ids vs raw Guid/string/int — adoption curve, not all-or-nothing.
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.
`Relation.folderId` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that. — saved-sites/saved-sites-store/src/main/java/com/duckduckgo/savedsites/store/RoomEntities.kt:60
`Relation.entityId` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that. — saved-sites/saved-sites-store/src/main/java/com/duckduckgo/savedsites/store/RoomEntities.kt:61
`RemoteMessagingCohort.messageId` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that. — remote-messaging/remote-messaging-store/src/main/java/com/duckduckgo/remote/messaging/store/RemoteMessagingCohort.kt:24
`StoredExtractedProfile.profileQueryId` is a raw `Long` — give it a strongly-typed id: a dedicated single-field type wrapping the `Long`, in whatever form your language spells that. — pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/store/db/ExtractedProfileEntities.kt:41
`StoredExtractedProfile.reportId` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that. — pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/store/db/ExtractedProfileEntities.kt:51
`ScanCompletedBroker.profileQueryId` is a raw `Long` — give it a strongly-typed id: a dedicated single-field type wrapping the `Long`, in whatever form your language spells that. — pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/store/db/ScanResultsEntities.kt:31
`Started.rootPlanId` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that. — onboarding/onboarding-api/src/main/java/com/duckduckgo/onboarding/api/LinearOnboardingOrchestrator.kt:68
`NetPManuallyExcludedApp.packageId` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that. — network-protection/network-protection-store/src/main/java/com/duckduckgo/networkprotection/store/db/NetPExclusionListEntities.kt:24
`NetPEgressServer.publicKey` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that. — network-protection/network-protection-store/src/main/java/com/duckduckgo/networkprotection/store/remote_config/NetPEgressServer.kt:27
`Action.tabId` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that. — duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/wideevents/DuckAiSelectionJourneyWideEvent.kt:184
`AppTracker.trackerCompanyId` is a raw `Int` — give it a strongly-typed id: a dedicated single-field type wrapping the `Int`, in whatever form your language spells that. — app-tracking-protection/vpn-store/src/main/java/com/duckduckgo/mobile/android/vpn/trackers/AppTracker.kt:28
`AppTrackerExcludedPackage.packageId` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that. — app-tracking-protection/vpn-store/src/main/java/com/duckduckgo/mobile/android/vpn/trackers/AppTracker.kt:51
`AppTrackerSystemAppOverridePackage.packageId` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that. — app-tracking-protection/vpn-store/src/main/java/com/duckduckgo/mobile/android/vpn/trackers/AppTracker.kt:63
`AppTrackerManualExcludedApp.packageId` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that. — app-tracking-protection/vpn-store/src/main/java/com/duckduckgo/mobile/android/vpn/trackers/AppTracker.kt:87
`Notification.notificationId` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that. — app-database/src/main/java/com/duckduckgo/app/notification/model/Notification.kt:27
`Survey.surveyId` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that. — app-database/src/main/java/com/duckduckgo/app/survey/model/Survey.kt:28
What to do
Adopt strongly-typed ids across the domain — finish the migration or document the boundary; primitive ids invite transposed-argument bugs.
Do you agree with this assessment?
DM4 · Rich vs anemic model3.0 / 10Weak✓ Tool-verified
Other · Domain Modelling — Whether aggregates/entities carry the behaviour that protects their invariants, rather than being data bags driven by external services.
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.
`TdsCnameEntity` is an aggregate/entity with 2 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — tracker-detection/tracker-detection-impl/src/main/java/com/duckduckgo/app/trackerdetection/model/TdsCnameEntity.kt:23
`TdsDomainEntity` is an aggregate/entity with 2 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — tracker-detection/tracker-detection-impl/src/main/java/com/duckduckgo/app/trackerdetection/model/TdsDomainEntity.kt:23
`TdsEntity` is an aggregate/entity with 3 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — tracker-detection/tracker-detection-impl/src/main/java/com/duckduckgo/app/trackerdetection/model/TdsEntity.kt:23
`TdsMetadata` is an aggregate/entity with 2 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — tracker-detection/tracker-detection-impl/src/main/java/com/duckduckgo/app/trackerdetection/model/TdsMetadata.kt:23
`TdsTracker` is an aggregate/entity with 5 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — tracker-detection/tracker-detection-impl/src/main/java/com/duckduckgo/app/trackerdetection/model/TdsTracker.kt:28
`SyncAttempt` is an aggregate/entity with 4 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — sync/sync-store/src/main/java/com/duckduckgo/sync/store/model/SyncDatabaseModels.kt:28
`SyncApiError` is an aggregate/entity with 5 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — sync/sync-store/src/main/java/com/duckduckgo/sync/store/model/SyncDatabaseModels.kt:48
`SyncOperationError` is an aggregate/entity with 5 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — sync/sync-store/src/main/java/com/duckduckgo/sync/store/model/SyncDatabaseModels.kt:66
`DailyPixelFired` is an aggregate/entity with 2 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — statistics/statistics-impl/src/main/java/com/duckduckgo/app/statistics/model/DailyPixelFired.kt:24
`UniquePixelFired` is an aggregate/entity with 1 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — statistics/statistics-impl/src/main/java/com/duckduckgo/app/statistics/model/UniquePixelFired.kt:23
`Relation` is an aggregate/entity with 3 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — saved-sites/saved-sites-store/src/main/java/com/duckduckgo/savedsites/store/RoomEntities.kt:58
`RemoteMessagingCohort` is an aggregate/entity with 2 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — remote-messaging/remote-messaging-store/src/main/java/com/duckduckgo/remote/messaging/store/RemoteMessagingCohort.kt:23
`RemoteMessagingConfig` is an aggregate/entity with 4 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — remote-messaging/remote-messaging-store/src/main/java/com/duckduckgo/remote/messaging/store/RemoteMessagingConfig.kt:24
`PrivacyConfig` is an aggregate/entity with 5 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — privacy-config/privacy-config-store/src/main/java/com/duckduckgo/privacy/config/store/PrivacyConfigDatabaseModels.kt:112
`BrokerJsonEtag` is an aggregate/entity with 2 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/store/db/BrokerEntities.kt:24
`BrokerScan` is an aggregate/entity with 2 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/store/db/BrokerEntities.kt:51
`BrokerOptOut` is an aggregate/entity with 3 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/store/db/BrokerEntities.kt:67
`PirEmailConfirmationLog` is an aggregate/entity with 3 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/store/db/EmailConfirmationLogEntities.kt:28
`StoredExtractedProfile` is an aggregate/entity with 17 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/store/db/ExtractedProfileEntities.kt:39
`OptOutCompletedBroker` is an aggregate/entity with 6 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/store/db/OptOutEntities.kt:28
`OptOutActionLog` is an aggregate/entity with 7 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/store/db/OptOutEntities.kt:42
`PirEventLog` is an aggregate/entity with 2 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/store/db/ScanLogEntities.kt:23
`PirBrokerScanLog` is an aggregate/entity with 3 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/store/db/ScanLogEntities.kt:41
`ScanCompletedBroker` is an aggregate/entity with 5 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/store/db/ScanResultsEntities.kt:29
`UserProfile` is an aggregate/entity with 6 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/store/db/UserProfileEntities.kt:24
`FlaggedIncompatibleApp` is an aggregate/entity with 1 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — network-protection/network-protection-store/src/main/java/com/duckduckgo/networkprotection/store/db/AutoExcludeEntities.kt:23
`VpnIncompatibleApp` is an aggregate/entity with 1 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — network-protection/network-protection-store/src/main/java/com/duckduckgo/networkprotection/store/db/AutoExcludeEntities.kt:28
`NetPManuallyExcludedApp` is an aggregate/entity with 2 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — network-protection/network-protection-store/src/main/java/com/duckduckgo/networkprotection/store/db/NetPExclusionListEntities.kt:23
`NetPGeoswitchingLocation` is an aggregate/entity with 3 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — network-protection/network-protection-store/src/main/java/com/duckduckgo/networkprotection/store/db/NetPGeoswitchingEntities.kt:23
`NetPConfigToggle` is an aggregate/entity with 4 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — network-protection/network-protection-store/src/main/java/com/duckduckgo/networkprotection/store/remote_config/NetPConfigToggle.kt:24
`NetPEgressServer` is an aggregate/entity with 7 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — network-protection/network-protection-store/src/main/java/com/duckduckgo/networkprotection/store/remote_config/NetPEgressServer.kt:25
`SelectedEgressServerName` is an aggregate/entity with 2 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — network-protection/network-protection-store/src/main/java/com/duckduckgo/networkprotection/store/remote_config/NetPEgressServer.kt:36
`HttpsBloomFilterSpec` is an aggregate/entity with 5 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — httpsupgrade/httpsupgrade-store/src/main/java/com/duckduckgo/httpsupgrade/store/HttpsBloomFilterSpec.kt:23
`HttpsFalsePositiveDomain` is an aggregate/entity with 1 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — httpsupgrade/httpsupgrade-store/src/main/java/com/duckduckgo/httpsupgrade/store/HttpsFalsePositiveDomain.kt:23
`UserAllowListedDomain` is an aggregate/entity with 1 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — browser-api/src/main/java/com/duckduckgo/app/privacy/model/UserAllowListedDomain.kt:23
`AppTracker` is an aggregate/entity with 5 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — app-tracking-protection/vpn-store/src/main/java/com/duckduckgo/mobile/android/vpn/trackers/AppTracker.kt:26
`AppTrackerMetadata` is an aggregate/entity with 2 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — app-tracking-protection/vpn-store/src/main/java/com/duckduckgo/mobile/android/vpn/trackers/AppTracker.kt:36
`AppTrackerPackage` is an aggregate/entity with 2 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — app-tracking-protection/vpn-store/src/main/java/com/duckduckgo/mobile/android/vpn/trackers/AppTracker.kt:42
`AppTrackerExcludedPackage` is an aggregate/entity with 2 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — app-tracking-protection/vpn-store/src/main/java/com/duckduckgo/mobile/android/vpn/trackers/AppTracker.kt:48
`AppTrackerExclusionListMetadata` is an aggregate/entity with 2 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — app-tracking-protection/vpn-store/src/main/java/com/duckduckgo/mobile/android/vpn/trackers/AppTracker.kt:56
What to do
Move business rules onto the aggregates/entities they govern so invariants are enforced at the source, not in anemic services.
Other · Domain Modelling — Whether entities protect their state — private/init-only setters, and collections handed out as read-only views rather than the mutable backing collection — instead of exposing writable state that bypasses invariants. Softened when a rehydration framework (Marten/EF) is present.
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.
`Relation` exposes publicly writable state (folderId, entityId). — saved-sites/saved-sites-store/src/main/java/com/duckduckgo/savedsites/store/RoomEntities.kt:58
`HttpsFalsePositiveDomain` exposes publicly writable state (domain). — httpsupgrade/httpsupgrade-store/src/main/java/com/duckduckgo/httpsupgrade/store/HttpsFalsePositiveDomain.kt:23
`AppTrackerMetadata` exposes publicly writable state (id). — app-tracking-protection/vpn-store/src/main/java/com/duckduckgo/mobile/android/vpn/trackers/AppTracker.kt:36
`AppTrackerExclusionListMetadata` exposes publicly writable state (id). — app-tracking-protection/vpn-store/src/main/java/com/duckduckgo/mobile/android/vpn/trackers/AppTracker.kt:56
`AppTrackerSystemAppOverrideListMetadata` exposes publicly writable state (id). — app-tracking-protection/vpn-store/src/main/java/com/duckduckgo/mobile/android/vpn/trackers/AppTracker.kt:67
`AppTrackerExceptionRuleMetadata` exposes publicly writable state (id). — app-tracking-protection/vpn-store/src/main/java/com/duckduckgo/mobile/android/vpn/trackers/AppTracker.kt:80
`DismissedCta` exposes publicly writable state (ctaId). — app-database/src/main/java/com/duckduckgo/app/cta/model/DismissedCta.kt:47
`Survey` exposes publicly writable state (status). — app-database/src/main/java/com/duckduckgo/app/survey/model/Survey.kt:27
What to do
Make entity setters private/init-only and hand collections out as IReadOnlyList/IReadOnlyCollection over a private backing field; change state only through methods that enforce the invariants (Marten/EF can bind via constructor or private setters).
Other · Domain Modelling — Whether the domain layer stays free of infrastructure dependencies (EF/Marten/HTTP/ASP.NET) — 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.
Other · Domain Modelling — Whether repositories are per aggregate root (not per child entity) and keep the persistence query handle behind the contract, so the root's invariants can't be bypassed.
Method: Roslyn (DDD-gated): repository abstraction detection; repositories over non-aggregate-root entities flagged, and (C#/VB) repository INTERFACES whose members return a live persistence query handle (IQueryable/DbSet/IMongoQueryable) — implementations and specification evaluators are out of population by design, since composing a query internally is what an implementation is for. Deterministic, DDD-native.
Coverage: Population: repositories + aggregate roots by NAME convention; per-root repository rule checked within the set.
Other · Domain Modelling — Whether clusters of primitives that travel together (a missing value object) are extracted — a low-weight suggestion, LLM-confirmed when configured.
Method: Roslyn (DDD-gated): primitive parameter clusters recurring three or more times across signatures extracted, then confirmed by language model when configured. Advisory, low-weight.
Other · Domain Modelling — Whether one domain rule is decided — or one measurement produced — in more than one place, rather than living on the type that owns it.
Method: Neutral body surface plus Roslyn (DDD-gated), two arms. DECISION (Roslyn only): a predicate over a domain type's members judged in two or more types, where none of those decisions live on the owning type — operands of comparisons and relational property patterns only, so a member merely passed as an argument is not judged. DERIVATION: a plain all-numeric carrier of ≥2 members, with no base type and exactly one constructor, CONSTRUCTED as the result of a method (returned or assigned, never inline as an argument) in two or more types other than its own — the same measurement produced twice, which centralising the judgement does not fix. DERIVATION runs on every language whose frontend declares the produced-or-passed fact per construction (Roslyn and the Java sidecar today); a target with only the derivation arm carries an engine gap naming the decision arm as not assessed, and a frontend that declares nothing keeps the dimension not measured rather than clean. Single-member rules, test code and generated code are out of population for both. Advisory.
Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
3373 code files changed in the last 6 months but the README was not touched — it may no longer reflect the system.
What to do
Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
Add a README to the 200 of 204 project(s) that lack one — worth up to 2 pts.
Review the README against recent changes; refresh the parts that drifted.
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.
Maturity · Maturity — Whether the README actually describes the code that exists (LLM-judged, advisory).
Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.
data-store/readme.md links to `❓`, but `data-store/❓` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — data-store/readme.md:9
duckchat/readme.md links to `❓`, but `duckchat/❓` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — duckchat/readme.md:11
example-feature/readme.md links to `❓`, but `example-feature/❓` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — example-feature/readme.md:10
.github/actions/pr-asana-sync/README.md links to `./.github/workflows/asana.yml`, but `.github/actions/pr-asana-sync/.github/workflows/asana.yml` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — .github/actions/pr-asana-sync/README.md:14
.github/actions/pr-asana-sync/README.md documents the environment variable `NO_AUTOCLOSE_PROJECTS`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — .github/actions/pr-asana-sync/README.md:47
.github/actions/pr-asana-sync/README.md documents the environment variable `SKIPPED_USERS`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — .github/actions/pr-asana-sync/README.md:50
What to do
Reconcile the README with reality: data-store/readme.md links to `❓`, but `data-store/❓` does not exist; duckchat/readme.md links to `❓`, but `duckchat/❓` does not exist; example-feature/readme.md links to `❓`, but `example-feature/❓` does not exist; .github/actions/pr-asana-sync/README.md links to `./.github/workflows/asana.yml`, but `.github/actions/pr-asana-sync/.github/workflows/asana.yml` does not exist; .github/actions/pr-asana-sync/README.md documents the environment variable `NO_AUTOCLOSE_PROJECTS`, but no code, script or configuration file names it.
Only 3/6 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `common/common-utils`, `perf-benchmarks`.
What to do
Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
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 spotbugs with find-sec-bugs (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 361016 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.
What to do
Add a SAST step to CI running what this repository's stack ships: spotbugs with find-sec-bugs — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
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.
Do you agree with this assessment?
P6 · Release Hygiene8.0 / 10Strong✓ 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.
The changelog this check read carries 0 versioned entries, against a bar of 3. Counted as either the distinct `x.y.z` versions it names (a link's target is not counted) or its version-shaped section headings (`## [1.2.0]`, `## V14.x.x`, `## Updates in 8.0.x`), whichever is the larger — so a log sectioned by minor series counts its sections, not its individual patch numbers. Entries recorded somewhere this check does not read — release notes generated at tag time from a generator config it did not recognise, or a log kept outside the repository — are not counted here, and this row is about what is re-findable in the tree rather than about how often you release.
What to do
Keep the changelog current — add a versioned entry (Keep-a-Changelog ## [x.y.z]) for each release so the history isn't a stub.
Readiness · Readiness — Whether outbound HTTP calls are wrapped in resilience (retry/timeout/circuit-breaker) so a failing dependency doesn't cascade.
Method: Source scan: outbound HTTP clients and what bounds them — resilience handlers (Polly, AddStandardResilienceHandler) on .NET; on Go, the JVM, Python, JavaScript/TypeScript, Ruby, PHP, Rust, Elixir, Swift, Dart and Erlang, a timeout, deadline, retry or breaker beside each call, or a process-wide client default (a framework-wide deadline such as Drupal core's, Laravel's or actix's awc counts). Exhaustive, deterministic.
`Retrofit.Builder(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×2) — app/src/main/java/com/duckduckgo/app/di/NetworkModule.kt:119, app/src/main/java/com/duckduckgo/app/di/NetworkModule.kt:135
What to do
Set connect and read timeouts on every client (`RestTemplateBuilder.connectTimeout/readTimeout`, WebClient `responseTimeout`, `HttpRequest.Builder.timeout`, `HttpURLConnection.setReadTimeout`, Feign `connectTimeout`/`readTimeout` in configuration), and wrap calls to dependencies in resilience4j `@Retry`/`@CircuitBreaker`/`@TimeLimiter` (or Spring Retry).
Readiness · Performance — Whether the code protects its performance with benchmarks — a benchmark suite, allocation/memory measurement, and (ideally) a CI gate. Presence is credited as a bonus, never a deduction.
Method: Repo + source scan: BenchmarkDotNet referenced (csproj/source), [Benchmark]/[MemoryDiagnoser] attribute counts, and a benchmark step in CI; off .NET, the same ladder over Go testing.B, Rust criterion/#[bench]/divan, JMH/kotlinx-benchmark, pytest-benchmark/asv/pyperf, tinybench/mitata/vitest bench/benchmark.js and Swift package-benchmark — scored as a bonus ladder (absence is neutral, never a deduction). Deterministic, presence detection.
Readiness · Performance — Whether the code is written to minimise allocations so it doesn't pressure its host's memory manager — buffer/slice views over copies, object pooling, stack or value-type allocation, and buffer writers. Reward-only: credited where present, never penalised where a simpler style is fine.
Method: Production-source scan: density (per 1k LoC) of allocation-aware APIs — in .NET Span/Memory, ArrayPool/ObjectPool, stackalloc, ValueTask, value-type structs, IBufferWriter, string.Create, SkipLocalsInit; off .NET, with comments and strings blanked, Go's sync.Pool, preallocated slices/maps, Grow, strconv.Append* and buf[:0] reuse; the JVM's NIO buffer views, MemorySegment, primitive collections, pools and literal presizes (plus Kotlin primitive arrays and value classes, Scala AnyVal and @specialized); Swift's reserveCapacity, ContiguousArray, withUnsafe* access and ~Copyable. Activated off .NET on the same floor (400 lines, and benchmarks or 8 uses); Rust and garbage-collected scripting languages are not applicable. Reward-only. Deterministic, syntax/text detection.
What to do
Raise allocation-aware density on the hot paths — currently 138 use(s) across 488,772 production line(s) (~0.3/1k). More of the idioms below on the allocation-heavy paths climbs this toward 10.
Java: on hot paths, work through buffer views (ByteBuffer/LongBuffer slices, MemorySegment) instead of copies, avoid boxing with primitive collections (fastutil, Eclipse Collections, HPPC, Trove), presize collections and StringBuilders, and pool expensive buffers (Netty's pooled allocator, commons-pool).
Kotlin: on hot paths, use primitive arrays (IntArray, LongArray …) and @JvmInline value classes instead of boxed values, primitive collections (androidx.collection, fastutil) instead of boxed ones, and presize collections and StringBuilders.
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 the language 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.
`getAppsAndProtectionInfo` is async and calls runBlocking — a blocking call inside async code stalls the coroutine's thread, and every coroutine dispatched to it for as long as it runs. — app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/apps/TrackingProtectionAppsRepository.kt:91
What to do
Kotlin: call the suspend function directly instead of wrapping it in runBlocking, use delay() instead of Thread.sleep, and move unavoidable blocking I/O into withContext(Dispatchers.IO).
Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.
Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.
Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.
Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.
Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. Deterministic, provable per finding. Advisory.
Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.
Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X15 · Unvalidated length from an untrusted reader10.0 / 10Exemplary○ Nothing flagged
Other · Security — Whether a length read out of the stream being parsed is bounded before it is allocated or read — an unchecked count taken from the input lets the input choose the allocation.
Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a loop that shortens a string until it fits a length budget has a floor — one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.
Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X17 · Uncapped recursion over a caller-supplied document2.7 / 10Weak✓ Tool-verified
Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.
Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.
`visitDocument` is public, takes a document from its caller (line 42) and hands it to `visitNode`, which calls itself at line 75 with a piece of `node` — the function is not `tailrec`, so every call is a real frame — and nowhere in `visitNode` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. On the JVM's default 1 MB thread stack a recursive walk throws `StackOverflowError` from about 500–2,000 levels on a cold first call and 6,000–17,000 once warmed up (OpenJDK 21 and 25; Android's threads are smaller). kotlinx.serialization's `parseToJsonElement` accepts nested arrays to any depth and Android's built-in `org.json` sets no limit, while Jackson 2.15+ stops at 1,000 — on a cold JVM past the point the walk fails; Gson 2.12+ and Moshi stop at 255. `StackOverflowError` is an `Error`, not an `Exception`: a `catch (e: Exception)` around the call does not stop it, and on Android an uncaught one ends the process. Thread a depth argument through `visitNode` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack or a `DeepRecursiveFunction`. — lint-rules/src/main/java/com/duckduckgo/lint/strings/PlaceholderDetector.kt:75
`visitDocument` is public, takes a document from its caller (line 42) and hands it to `visitNode`, which calls itself at line 96 with a piece of `node` — the function is not `tailrec`, so every call is a real frame — and nowhere in `visitNode` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. On the JVM's default 1 MB thread stack a recursive walk throws `StackOverflowError` from about 500–2,000 levels on a cold first call and 6,000–17,000 once warmed up (OpenJDK 21 and 25; Android's threads are smaller). kotlinx.serialization's `parseToJsonElement` accepts nested arrays to any depth and Android's built-in `org.json` sets no limit, while Jackson 2.15+ stops at 1,000 — on a cold JVM past the point the walk fails; Gson 2.12+ and Moshi stop at 255. `StackOverflowError` is an `Error`, not an `Exception`: a `catch (e: Exception)` around the call does not stop it, and on Android an uncaught one ends the process. Thread a depth argument through `visitNode` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack or a `DeepRecursiveFunction`. — lint-rules/src/main/java/com/duckduckgo/lint/strings/MissingInstructionDetector.kt:96
What to do
Each finding names the externally-callable member that accepts the document and the self-call that descends, and states that no depth parameter or counter exists anywhere in the walk. Confirm from the two, then thread a depth argument through the walk and reject documents past a fixed maximum, or rewrite it with an explicit stack.
Other · Code Health — Whether a type's disposal matches what it OWNS — releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.
Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer — an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Dart is read for the owned-and-never-released arm: a Flutter `State` (or a class declaring `dispose()`/`close()`) whose library-private field is written only with direct creations of a framework controller, `FocusNode`, `StreamController` or periodic `Timer` (or a `.listen(…)` into a field declared `StreamSubscription`), which nothing in the class or its library releases (`dispose`/`close`/`cancel`) and which is never handed on except as a named argument. Ruby is read for the owned-and-never-released arm and the abandoned-local arm: a class declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose instance variable is written only with a blockless core descriptor creation (`File.open`/`new`, `Tempfile`, `Dir.open`, `IO.popen`, the `socket` and `openssl` socket classes) that no method of the class closes and that is never handed on (passed, returned, stored, exposed by `attr_reader`, delegated) — a class whose superclass or mixin lies outside the repository is not judged — and a blockless creation read through and dropped (`File.open(path).read`) or held in a local that is never closed, returned, passed or stored (a `&:read` block-pass, an `autoclose: false` borrow and a `fileno` hand-over are not abandonment). PHP is read for the same two arms: a class (not a trait, and not one using a trait) declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose `private` property (or a `final` class's `protected` one) is written only with a direct core `fopen`, `tmpfile`, `popen`, `proc_open`, `fsockopen`, `stream_socket_client`/`server` or `opendir` that nothing in the class closes (`fclose`, `pclose`, `closedir`, `unset`, a reset to `null`) and that is never handed on, and a handle held in a function's local, or read through as the argument of a reader, that is never closed, returned, passed, captured or stored; a `php://` stream, `curl_init`, `SplFileObject`, `PDO` and a function the repository declares under the core name are not read. Deterministic, provable per finding. Advisory.
`FileInputStream(…)` opens something that has to be given back — a file descriptor, a socket, a directory handle — and it is held in `input`, and every later use of `input` in its block reads a member through it — it is never returned, passed, stored, captured by a lambda, reassigned or released, so this expression both creates the value and is the last place that can release it, and does not. Every call leaks one more open handle until the collector happens to reach it: `Too many open files` under load, and on Windows a file that cannot be replaced or deleted while it is held. Open it with `FileInputStream(…).use { r -> … }`, which releases it on every path including a throw, or hold it and call `.close()` in a `finally`. — network-protection/network-protection-internal/src/main/java/com/duckduckgo/networkprotection/internal/feature/NetPInternalSettingsActivity.kt:102
What to do
Each finding names the value and the span that decides who owns it — the `new` that created it, or the constructor parameter that handed it over. Confirm ownership from that span, then make the disposal match it: release what this type created, leave what it was injected with to whoever created THAT, and drop a finalizer whose type holds nothing unmanaged to release.
Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.
Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether suspend functions that make a cancellable request accept or pass on the coroutine's cancellation (adoption curve).
Method: Roslyn scan: every async method (excluding framework-fixed overrides/Blazor handlers) checked for CancellationToken parameter presence. Deterministic, adoption percentage. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same question: every named async function that itself makes a request an AbortSignal can cancel (global `fetch`, axios and its file-local instances, ky, ofetch) counts, and it is compliant when its parameters or body name a signal or it hands one of its own parameters to the request as options; signatures a framework fixes (JSX event handlers, route and lifecycle exports, request-first handlers, `override`, `'use server'` modules, TanStack `mutationFn`) are exempt unless they take a signal. Deterministic, adoption percentage.
Only 0/4 suspend functions that make a cancellable request (Ktor, OkHttp newCall, URL streams) accept the coroutine's cancellation or pass one on, so a request keeps running after whatever wanted it has given up — a screen navigated away from, a disposed widget, a superseded search. In a suspend function, make the request with a call that suspends — Ktor, OkHttp's `executeAsync()`, or a `suspendCancellableCoroutine` that cancels the `Call` — not a blocking `execute()`: `withContext(Dispatchers.IO)` moves the call off the caller's thread but does not make it cancellable; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
`download` suspends, but makes its request with `newCall(…).execute()`, which blocks: its caller's cancellation cannot reach the request, so it runs to its end after whatever wanted it has given up — `withContext(Dispatchers.IO)` moves it off the caller's thread and does not change that. Make the request with a call that suspends: Ktor, OkHttp's `executeAsync()`, or a `suspendCancellableCoroutine` over `enqueue` that cancels the `Call` in `invokeOnCancellation`. — ad-blocking/ad-blocking-impl/src/main/java/com/duckduckgo/adblocking/impl/ScriptletDownloader.kt:39
`requestEmbed` suspends, but makes its request with `newCall(…).execute()`, which blocks: its caller's cancellation cannot reach the request, so it runs to its end after whatever wanted it has given up — `withContext(Dispatchers.IO)` moves it off the caller's thread and does not change that. Make the request with a call that suspends: Ktor, OkHttp's `executeAsync()`, or a `suspendCancellableCoroutine` over `enqueue` that cancels the `Call` in `invokeOnCancellation`. — ad-blocking/ad-blocking-impl/src/main/java/com/duckduckgo/adblocking/impl/duckplayer/DuckPlayerFeatureRepository.kt:239
`fetchTitle` suspends, but makes its request with `newCall(…).execute()`, which blocks: its caller's cancellation cannot reach the request, so it runs to its end after whatever wanted it has given up — `withContext(Dispatchers.IO)` moves it off the caller's thread and does not change that. Make the request with a call that suspends: Ktor, OkHttp's `executeAsync()`, or a `suspendCancellableCoroutine` over `enqueue` that cancels the `Call` in `invokeOnCancellation`. — app/src/main/java/com/duckduckgo/app/tabs/model/PageTitleFetcher.kt:47
`downloadZip` suspends, but makes its request with `newCall(…).execute()`, which blocks: its caller's cancellation cannot reach the request, so it runs to its end after whatever wanted it has given up — `withContext(Dispatchers.IO)` moves it off the caller's thread and does not change that. Make the request with a call that suspends: Ktor, OkHttp's `executeAsync()`, or a `suspendCancellableCoroutine` over `enqueue` that cancels the `Call` in `invokeOnCancellation`. — autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/takeout/zip/TakeoutZipDownloader.kt:50
What to do
Thread the coroutine's cancellation through suspend functions that make requests, so the work stops when its caller gives up.
Other · Code Health — Whether an argument guard throws the exception its own condition describes — a guard that rejects a value for being EMPTY and reports it as `NullPointerException` (Java, Kotlin, Scala), `ArgumentError.notNull` (Dart) or `ArgumentNullException` (F#'s `nullArg`) tells the caller a parameter was null when it provably was not.
Method: Roslyn syntax: `throw new ArgumentNullException(nameof(p))` statements controlled by an `if`, whose condition is read for a test that is true of a NON-null `p` — an emptiness test that dereferences it (`p.Count == 0`, `!p.Any()`) or a BCL predicate documented true of the empty value (`string.IsNullOrEmpty(p)`). Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.
Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies — reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back.
Method: Roslyn syntax: `try` statements whose `finally` releases a synchronisation primitive under a bare local-bool guard, where the method also TOOK that same primitive before the `try`, checked for a `return` of a bool literal whose value disagrees with the flag state the method's own straight-line assignments put it in. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.
Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X24 · Document value interpolated into markup unescaped10.0 / 10Exemplary○ Nothing flagged
Other · Security — Whether text read out of the document being converted is escaped before it is written into generated markup — a value the document's author chose, interpolated into an attribute the surrounding literal delimits, can close that attribute and open another.
Method: Roslyn semantic model over the whole compilation: a string-typed `Value`/`InnerText`/`InnerXml`/`Text` member declared inside `DocumentFormat.OpenXml` or `System.Xml` is a taint SOURCE, propagated through assignments, returns, arguments, tuple elements and string composition to its transitive closure, then read at interpolated-string holes that sit in a markup position the surrounding literal itself delimits. Escaper/encoder calls and enclosing validator conditions cut the flow. Flow- and container-insensitive by construction. A second arm needs no provenance at all and reports a type that CONTRADICTS ITSELF — the same expression escaped at one delimited markup hole and interpolated raw at another hole in the same markup position of the same type, which the type's own escaping proves is a defect without knowing where the value came from. On a repository with no .NET source it reads JavaScript/TypeScript off the token stream with the same rule: a DOM read of raw document text (`getAttribute`, `textContent`, `innerText`, `nodeValue`) is the source, propagated through local bindings and string composition, and judged at template-literal and concatenation holes in the same two delimited markup positions; escapers and validating conditions cut it, and documentation-site, test, vendored and minified scripts are not read. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.
Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.
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.
Do you agree with this assessment?
X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether an enhanced `for` leaves the collection it is walking alone — a body that adds to or removes from the very collection the loop is iterating invalidates the fail-fast iterator it is holding, so the next `next()` throws `ConcurrentModificationException` and the remaining elements are never seen. Whether a `for` loop leaves the `dict`, `set` or `deque` it is walking alone — CPython's iterators over those check that the collection has not changed size since the loop began, so a body that removes from (or empties) the very collection the loop is walking makes the next step raise `RuntimeError: dictionary changed size during iteration` and the remaining items are never seen. Whether a `for (x in c)` or `c.forEach { … }` leaves the collection it is walking alone — a `mutableListOf`/`ArrayList`, `mutableMapOf`/`HashMap` or `mutableSetOf`/`HashSet` is a `java.util` collection on the JVM and is walked by its own fail-fast iterator, so a body that adds to or removes from the very collection the loop is walking makes the next step throw `ConcurrentModificationException` and the remaining elements are never seen.
Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
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.
Do you agree with this assessment?
X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.
Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.
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.
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. (×2) — android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/ViewExtension.kt:92, network-protection/network-protection-impl/src/main/java/com/wireguard/config/InetAddresses.kt:26
`catch (t: Throwable)` 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. (×3) — app-tracking-protection/vpn-store/src/main/java/com/duckduckgo/mobile/android/vpn/store/VpnDatabase.kt:281, app-tracking-protection/vpn-store/src/main/java/com/duckduckgo/mobile/android/vpn/store/VpnDatabase.kt:297, sync/sync-store/src/main/java/com/duckduckgo/sync/store/SyncDatabase.kt:58
`catch (_: Exception)` 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. (×7) — app/src/main/java/com/duckduckgo/app/browser/defaultbrowsing/DefaultBrowserChangedSurveySampler.kt:60, app/src/main/java/com/duckduckgo/app/startup/metrics/MemoryCollector.kt:55, app/src/main/java/com/duckduckgo/app/tabs/model/TabDataRepository.kt:408, …
`catch (e: Exception)` 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. (×14) — app/src/main/java/com/duckduckgo/app/browser/omnibar/OmnibarLayoutViewModel.kt:580, app/src/main/java/com/duckduckgo/app/buildconfig/RealAppBuildConfig.kt:72, app/src/main/java/com/duckduckgo/app/generalsettings/showonapplaunch/IdleThresholdResolver.kt:48, …
`catch (exception: Exception)` 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. (×2) — app/src/main/java/com/duckduckgo/app/fire/DatabaseCleaner.kt:66, cookies/cookies-impl/src/main/java/com/duckduckgo/cookies/impl/features/firstparty/FirstPartyCookiesModifier.kt:154
`catch (e: Throwable)` 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. (×3) — pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/brokers/BrokerJsonProcessor.kt:96, subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/ui/SubscriptionsWebViewClient.kt:58, sync/sync-store/src/main/java/com/duckduckgo/sync/store/SharedPrefsProvider.kt:41
What to do
Swallowed exception (empty catch)
Do you agree with this assessment?
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.
Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether log calls use message templates (queryable) rather than interpolated strings.
Method: Roslyn syntax scan: every log call-site counted; interpolated-string first-argument violations flagged. Population is all log calls, not estimated. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `trace`/`debug`/`info`/`warn`/`error`/`fatal`/`verbose`/`silly`/`http`/`log` call on a receiver named for a logger, in a package whose own or an enclosing `package.json` declares a logger that carries values as fields (pino, pino-http, nestjs-pino, Fastify, winston, bunyan, tslog, LogTape, roarr), whose first deciding argument is a template literal with substitutions; an object-literal fields argument is stepped over, a plain string message clears the call. Python is read the same way: a `debug`/`info`/`warning`/`error`/`exception`/`critical`/`log` call on a logger in a file that imports the standard library’s `logging` or structlog (loguru, which formats at the call, is not judged), whose message is a whole f-string with a non-constant field; a `%`-formatted, `.format()`-ed or concatenated message is not convicted, as in C#. PHP is read the same way: a PSR-3 level call (`emergency`…`debug`, `log`) on a logger (`$logger`, `$this->logger`, Laravel’s `Log::`, `logger()`, `\Drupal::logger()`) in a package whose `composer.json` requires a PSR-3 logger or a framework that hands one out (psr/log, Monolog, Laravel, Symfony, Drupal, CakePHP), or a file that imports one, whose message is a double-quoted string interpolating a variable; a single-quoted message clears the call, and `sprintf` or `.` concatenation is not convicted, as in C#. Dart is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on Sentry’s structured logger (`Sentry.logger`) whose message is a whole string literal interpolating a value (`$name`, `${…}`); the `Sentry.logger.fmt` template API clears the call. Dart that logs only through loggers with one message and no fields (package:logging, package:logger, talker, dart:developer) is not applicable rather than a reach gap. Ruby is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on the console gem’s `Console` (declared by a Gemfile, gemspec or REDACTED, or required) or, where SemanticLogger, Ougai or dry-logger is declared or required, on a receiver named for a logger (`logger`, `@logger`, `Rails.logger`, `log`), whose first deciding argument is, as the whole argument, a double-quoted string interpolating a non-constant value (`#{…}`, `#@ivar`); a plain literal clears the call, keyword arguments are the fields, and a block, `%`-format or `+` concatenation is not convicted. Ruby that logs only through the standard Logger (Rails.logger) is not applicable rather than a reach gap. Deterministic.
`info` at line 34 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — scripts/piranha/clean.py:34
`info` at line 56 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — scripts/piranha/clean.py:56
Other · Code Health — Whether Kotlin's null safety is not undermined by not-null assertions — `String` cannot hold null and `String?` must be checked before use in every Kotlin module, and each `!!` is a run-time `NullPointerException` the author has told the compiler cannot happen.
Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.
Do you agree with this assessment?
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.
Unscored — 3 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 — 25 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 20 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X9 Subsumed condition operand — 2 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 — Repo shows no audit-logging mechanism (an audit-log table or model — an Exposed table, a data class, a Room entity or a SQL migration's table named for it — Hibernate Envers' @Audited, a JPA entity listener, Hibernate event listener or jOOQ RecordListener that records each change) for sensitive changes — absence of evidence is not evidence of a working control. Record an audit trail in code (or document where it lives) so this dimension can be scored.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 46 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.
AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
AC7 A11y enforcement — No web markup found — accessibility is not applicable to this repository.
AX1 Captive dependencies — 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
AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No class in this Java code is a Spring, JSR-330 or CDI singleton bean. No class in this Kotlin code is a Spring, JSR-330 or CDI singleton bean. No function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads. 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).
AX4 Dependency direction — not applicable to a CQRS architecture (the inward-dependency rule is for layered/clean styles)
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX8 Test isolation — no test/production split to check
AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXR1 Runtime accessibility — the Android app did not build — `./gradlew :app:assembleDebug` exited 1: -coroutines-core/1.7.3/kotlinx-coroutines-core-1.7.3.pom'.
> Could not GET 'https://repo.maven.apache.org/maven2/org/jetbrains/kotlinx/kotlinx-coroutines-core/1.7.3/kotlinx-coroutines-core-1.…; runtime evidence skipped (launch chosen because app/build.gradle applies the Android application plugin and gradlew builds it) This is a statement about this run, not a statement about your application: nothing here says the app is inaccessible, only that it was never run.
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.
D10 Test Quality — ~365309 lines of test source are present (.kt) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
D11 Test Reliability — No tests discovered
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.
D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
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+ projects each declaring an entity of their own. 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 — No inline comments to assess — comment value is not applicable here.
D25 ADR Conformance — no ADRs to check
D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.kt), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
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) — 92 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
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
D8 Code Coverage — Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured — the jest suite in .github/actions/pr-asana-sync/ ran and not one test passed (No tests found, exiting with code 1), so the coverage would describe the failed run, not the code. Coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan. Alternatively, commit the lcov/Cobertura report your CI produces and it is read without a re-run.
DM3 Integration-event coupling — no integration events detected — coupling check not applicable
ED1 Event-Driven — not scored — this repository shows only 1 of the 3 signals this lens looks for (5 CQRS handler(s))
ED5 Idempotency — Not assessed, and this one is on us: 5 command handler(s) or message consumer(s) were found here, but this check does not yet recognise persistence writes in this repository's language. Idempotency was neither confirmed nor ruled out — this is a limit of the analyzer, not a finding about your code.
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'.
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 — no coverage report found on disk — produce a coverage report in a standard format (JaCoCo XML — the Gradle `jacocoTestReport` task) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
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.
SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
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.
X6 Hand-rolled structured-format parsing — 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.
Boundary-crossing change coupling: NativeInputAnimator.kt ↔ NativeInputModeWidget.kt app/src/main/java/com/duckduckgo/app/browser/nativeinput/NativeInputAnimator.kt:1— `app/src/main/java/com/duckduckgo/app/browser/nativeinput/NativeInputAnimator.kt` (context main) and `duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/nativeinput/views/NativeInputModeWidget.kt` (context duckchat) sit in DIFFERENT parts of the tree yet change together 67% of the time (10 of the 15 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — 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 10 shared commits counted here, the most recent 3 are `25767fef` [Brand design updates - Core App Components] Ship review amendments (…; `d242cdab` Add nav buttons to native input in search-only mode (#9324); `0116e07b` UTI: Nav bar polish, first-focus visibility and back arrow (#9202) — run `git show` on any of them.
Boundary-crossing change coupling: BrowserMenuViewStateFactory.kt ↔ BrowserMenuBottomSheet.kt app/src/main/java/com/duckduckgo/app/browser/menu/BrowserMenuViewStateFactory.kt:1— `app/src/main/java/com/duckduckgo/app/browser/menu/BrowserMenuViewStateFactory.kt` (context main) and `browser/browser-ui/src/main/java/com/duckduckgo/browser/ui/browsermenu/BrowserMenuBottomSheet.kt` (context browser) sit in DIFFERENT parts of the tree yet 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 — 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 `f5550bc5` Add internal feedback item to the browser menu (#10008); `61bb3855` Hide Report Broken Site in the menu on Duck.ai (#9455); `1ec5886a` Update Browser menu for Duck.ai (#8752) — run `git show` on any of them.
D11 · Test Reliability· Test suite declares a test script but contains no test files · ×1
Test suite declares a test script but contains no test files: .github/actions/pr-asana-sync/ — The jest suite in .github/actions/pr-asana-sync/ was installed and launched successfully, and the runner then found no test files to run — No tests found, exiting with code 1. The package declares a test script, so it reads as a tested package to anyone who checks its manifest, but there is nothing behind the declaration: no test case exists, so it cannot detect a regression and its presence overstates how much of this repository is tested. The ask is the owner's: write the first test for this package, or remove the test script from a package that has none. This is not a report that the tests FAIL — there are none.
TooManyMethods: BrowserTabViewModel app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt:499— TooManyMethods — 390 methods. The bar is 30 methods; this is 360 over it, 13.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: BrowserTabFragment app/src/main/java/com/duckduckgo/app/browser/BrowserTabFragment.kt:423— TooManyMethods — 270 methods. The bar is 30 methods; this is 240 over it, 9.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: NativeInputModeWidget duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/nativeinput/views/NativeInputModeWidget.kt:266— TooManyMethods — 159 methods. The bar is 30 methods; this is 129 over it, 5.30× 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: RealDuckChatPixels duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/pixel/DuckChatPixels.kt:319— TooManyMethods — 120 methods. The bar is 30 methods; this is 90 over it, 4.00× the bar. Most of these members implement pixel.DuckChatPixels (107 of 119 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member.
TooManyMethods: RealDeviceShieldPixels app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/pixels/DeviceShieldPixels.kt:410— TooManyMethods — 108 methods. The bar is 30 methods; this is 78 over it, 3.60× the bar. Most of these members implement pixels.DeviceShieldPixels (97 of 105 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member.
TooManyMethods: RealPirPixelSender pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/pixels/PirPixelSender.kt:763— TooManyMethods — 92 methods. The bar is 30 methods; this is 62 over it, 3.07× the bar. Most of these members implement pixels.PirPixelSender (81 of 92 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member.
TooManyMethods: RealDuckChat duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/RealDuckChat.kt:447— TooManyMethods — 88 methods. The bar is 30 methods; this is 58 over it, 2.93× 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: RealSyncPixels sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/pixels/SyncPixels.kt:328— TooManyMethods — 87 methods. The bar is 30 methods; this is 57 over it, 2.90× the bar. Most of these members implement pixels.SyncPixels (66 of 86 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member.
TooManyMethods: RealNetworkProtectionPixel network-protection/network-protection-impl/src/main/java/com/duckduckgo/networkprotection/impl/pixels/NetworkProtectionPixels.kt:313— TooManyMethods — 83 methods. The bar is 30 methods; this is 53 over it, 2.77× the bar. Most of these members implement pixels.NetworkProtectionPixels (74 of 81 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member.
TooManyMethods: BrowserActivity app/src/main/java/com/duckduckgo/app/browser/BrowserActivity.kt:171— TooManyMethods — 77 methods. The bar is 30 methods; this is 47 over it, 2.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: RealPirRepository pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/store/PirRepository.kt:313— TooManyMethods — 75 methods. The bar is 30 methods; this is 45 over it, 2.50× the bar. Most of these members implement store.PirRepository (62 of 75 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member.
TooManyMethods: OmnibarLayout app/src/main/java/com/duckduckgo/app/browser/omnibar/OmnibarLayout.kt:147— TooManyMethods — 72 methods. The bar is 30 methods; this is 42 over it, 2.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: RealNativeInputManager app/src/main/java/com/duckduckgo/app/browser/nativeinput/NativeInputManager.kt:190— TooManyMethods — 70 methods. The bar is 30 methods; this is 40 over it, 2.33× 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: SyncInternalSettingsViewModel sync/sync-internal/src/main/java/com/duckduckgo/sync/internal/ui/SyncInternalSettingsViewModel.kt:88— TooManyMethods — 70 methods. The bar is 30 methods; this is 40 over it, 2.33× 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: AutofillPasswordsManagementViewModel autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/ui/credential/management/AutofillPasswordsManagementViewModel.kt:122— TooManyMethods — 63 methods. The bar is 30 methods; this is 33 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.
TooManyMethods: NativeInputModeWidgetViewModel duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/NativeInputModeWidgetViewModel.kt:108— TooManyMethods — 63 methods. The bar is 30 methods; this is 33 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.
TooManyMethods: DuckDuckGoWebView app/src/main/java/com/duckduckgo/app/browser/DuckDuckGoWebView.kt:68— 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: SubscriptionPixelSenderImpl subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/pixels/SubscriptionPixelSender.kt:159— TooManyMethods — 62 methods. The bar is 30 methods; this is 32 over it, 2.07× the bar. Most of these members implement pixels.SubscriptionPixelSender (58 of 62 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member.
TooManyMethods: AppSyncAccountRepository sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/SyncAccountRepository.kt:162— TooManyMethods — 61 methods. The bar is 30 methods; this is 31 over it, 2.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: SharedPreferencesDuckChatDataStore duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/store/DuckChatDataStore.kt:188— TooManyMethods — 60 methods. The bar is 30 methods; this is 30 over it, 2.00× the bar. Most of these members implement store.DuckChatDataStore (57 of 60 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member.
TooManyMethods: CtaViewModel app/src/main/java/com/duckduckgo/app/cta/ui/CtaViewModel.kt:88— TooManyMethods — 59 methods. The bar is 30 methods; this is 29 over it, 1.97× 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: TabSwitcherActivity app/src/main/java/com/duckduckgo/app/tabs/ui/TabSwitcherActivity.kt:129— TooManyMethods — 59 methods. The bar is 30 methods; this is 29 over it, 1.97× 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: SyncActivityViewModel sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/ui/dashboard/SyncActivityViewModel.kt:101— TooManyMethods — 58 methods. The bar is 30 methods; this is 28 over it, 1.93× 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: TabSwitcherViewModel app/src/main/java/com/duckduckgo/app/tabs/ui/TabSwitcherViewModel.kt:104— TooManyMethods — 54 methods. The bar is 30 methods; this is 24 over it, 1.80× 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: RealSavedSitesRepository saved-sites/saved-sites-impl/src/main/java/com/duckduckgo/savedsites/impl/SavedSitesRepository.kt:46— TooManyMethods — 53 methods. The bar is 30 methods; this is 23 over it, 1.77× the bar. Most of these members implement api.SavedSitesRepository (37 of 51 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member.
ClassTooLong: BrowserTabViewModel app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt:499— ClassTooLong — 3628 significant lines (blank, comment-only and punctuation-only lines excluded), 390 methods. The bar is 400 significant lines; this is 3228 over it, 9.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.
ClassTooLong: NativeInputModeWidget duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/nativeinput/views/NativeInputModeWidget.kt:266— ClassTooLong — 1120 significant lines (blank, comment-only and punctuation-only lines excluded), 159 methods. The bar is 400 significant lines; this is 720 over it, 2.80× 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: BrowserActivity app/src/main/java/com/duckduckgo/app/browser/BrowserActivity.kt:171— ClassTooLong — 1095 significant lines (blank, comment-only and punctuation-only lines excluded), 77 methods. The bar is 400 significant lines; this is 695 over it, 2.74× 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: OmnibarLayout app/src/main/java/com/duckduckgo/app/browser/omnibar/OmnibarLayout.kt:147— ClassTooLong — 1054 significant lines (blank, comment-only and punctuation-only lines excluded), 72 methods. The bar is 400 significant lines; this is 654 over it, 2.64× 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: RealNativeInputManager app/src/main/java/com/duckduckgo/app/browser/nativeinput/NativeInputManager.kt:190— ClassTooLong — 918 significant lines (blank, comment-only and punctuation-only lines excluded), 70 methods. The bar is 400 significant lines; this is 518 over it, 2.30× 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: AppSyncAccountRepository sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/SyncAccountRepository.kt:162— ClassTooLong — 861 significant lines (blank, comment-only and punctuation-only lines excluded), 61 methods. The bar is 400 significant lines; this is 461 over it, 2.15× 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: NewUserOnboardingPlanProvider app/src/main/java/com/duckduckgo/app/onboarding/orchestrator/NewUserOnboardingPlanProvider.kt:100— ClassTooLong — 832 significant lines (blank, comment-only and punctuation-only lines excluded), 45 methods. The bar is 400 significant lines; this is 432 over it, 2.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: OmnibarLayoutViewModel app/src/main/java/com/duckduckgo/app/browser/omnibar/OmnibarLayoutViewModel.kt:107— ClassTooLong — 817 significant lines (blank, comment-only and punctuation-only lines excluded), 46 methods. The bar is 400 significant lines; this is 417 over it, 2.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: ComponentViewHolder android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/component/ComponentViewHolder.kt:123— ClassTooLong — 797 significant lines (blank, comment-only and punctuation-only lines excluded), 2 methods. The bar is 400 significant lines; this is 397 over it, 1.99× 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: TabSwitcherActivity app/src/main/java/com/duckduckgo/app/tabs/ui/TabSwitcherActivity.kt:129— ClassTooLong — 777 significant lines (blank, comment-only and punctuation-only lines excluded), 59 methods. The bar is 400 significant lines; this is 377 over it, 1.94× 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: RealPirPixelSender pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/pixels/PirPixelSender.kt:763— ClassTooLong — 774 significant lines (blank, comment-only and punctuation-only lines excluded), 92 methods. The bar is 400 significant lines; this is 374 over it, 1.94× 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: RealSubscriptionsManager subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/SubscriptionsManager.kt:270— ClassTooLong — 720 significant lines (blank, comment-only and punctuation-only lines excluded), 47 methods. The bar is 400 significant lines; this is 320 over it, 1.80× 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: SyncInternalSettingsViewModel sync/sync-internal/src/main/java/com/duckduckgo/sync/internal/ui/SyncInternalSettingsViewModel.kt:88— ClassTooLong — 719 significant lines (blank, comment-only and punctuation-only lines excluded), 70 methods. The bar is 400 significant lines; this is 319 over it, 1.80× 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: BrowserWebViewClient app/src/main/java/com/duckduckgo/app/browser/BrowserWebViewClient.kt:117— ClassTooLong — 694 significant lines (blank, comment-only and punctuation-only lines excluded), 40 methods. The bar is 400 significant lines; this is 294 over it, 1.74× 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: DialogsFragment android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/dialogs/DialogsFragment.kt:82— ClassTooLong — 686 significant lines (blank, comment-only and punctuation-only lines excluded), 4 methods. The bar is 400 significant lines; this is 286 over it, 1.72× 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: RealDuckChatPixels duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/pixel/DuckChatPixels.kt:319— ClassTooLong — 670 significant lines (blank, comment-only and punctuation-only lines excluded), 120 methods. The bar is 400 significant lines; this is 270 over it, 1.68× 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: RealDuckAiDebugServer duckchat/duckchat-internal/src/main/java/com/duckduckgo/duckchat/internal/store/DuckAiDebugServer.kt:58— ClassTooLong — 591 significant lines (blank, comment-only and punctuation-only lines excluded), 4 methods. The bar is 400 significant lines; this is 191 over it, 1.48× 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: DuckChatContextualWebViewFragment duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/contextual/DuckChatContextualWebViewFragment.kt:121— ClassTooLong — 585 significant lines (blank, comment-only and punctuation-only lines excluded), 39 methods. The bar is 400 significant lines; this is 185 over it, 1.46× 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: SitePermissionsDialogActivityLauncher site-permissions/site-permissions-impl/src/main/java/com/duckduckgo/site/permissions/impl/SitePermissionsDialogActivityLauncher.kt:79— ClassTooLong — 570 significant lines (blank, comment-only and punctuation-only lines excluded), 30 methods. The bar is 400 significant lines; this is 170 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.
ClassTooLong: RealExchangeV2Runner sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/exchange/v2/ExchangeV2Runner.kt:157— ClassTooLong — 567 significant lines (blank, comment-only and punctuation-only lines excluded), 44 methods. The bar is 400 significant lines; this is 167 over it, 1.42× 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: RealDuckChatJSHelper duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/helper/DuckChatJSHelper.kt:126— ClassTooLong — 554 significant lines (blank, comment-only and punctuation-only lines excluded), 24 methods. The bar is 400 significant lines; this is 154 over it, 1.39× 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: TabSwitcherViewModel app/src/main/java/com/duckduckgo/app/tabs/ui/TabSwitcherViewModel.kt:104— ClassTooLong — 542 significant lines (blank, comment-only and punctuation-only lines excluded), 54 methods. The bar is 400 significant lines; this is 142 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: DuckChatContextualWebViewViewModel duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/contextual/DuckChatContextualWebViewViewModel.kt:72— ClassTooLong — 538 significant lines (blank, comment-only and punctuation-only lines excluded), 42 methods. The bar is 400 significant lines; this is 138 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: BookmarksActivity saved-sites/saved-sites-impl/src/main/java/com/duckduckgo/savedsites/impl/bookmarks/BookmarksActivity.kt:117— ClassTooLong — 534 significant lines (blank, comment-only and punctuation-only lines excluded), 49 methods. The bar is 400 significant lines; this is 134 over it, 1.34× 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: SubscriptionWebViewViewModel subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/ui/SubscriptionWebViewViewModel.kt:103— ClassTooLong — 512 significant lines (blank, comment-only and punctuation-only lines excluded), 36 methods. The bar is 400 significant lines; this is 112 over it, 1.28× 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.
FileTooLong: browser/BrowserTabFragment.kt app/src/main/java/com/duckduckgo/app/browser/BrowserTabFragment.kt— FileTooLong — 4615 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 4115 over it, 9.23× 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: browser/BrowserTabViewModel.kt app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt— FileTooLong — 4107 significant lines (blank, comment-only and punctuation-only lines excluded), about 88% of them inside a single declaration: BrowserTabViewModel (499-6156). The bar is 500 significant lines; this is 3607 over it, 8.21× 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: pixel/DuckChatPixels.kt duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/pixel/DuckChatPixels.kt— FileTooLong — 1567 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1067 over it, 3.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: component/ComponentViewHolder.kt android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/component/ComponentViewHolder.kt— FileTooLong — 1407 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 907 over it, 2.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: views/NativeInputModeWidget.kt duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/nativeinput/views/NativeInputModeWidget.kt— FileTooLong — 1351 significant lines (blank, comment-only and punctuation-only lines excluded), about 83% of them inside a single declaration: NativeInputModeWidget (266-2100). The bar is 500 significant lines; this is 851 over it, 2.70× 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: browser/BrowserActivity.kt app/src/main/java/com/duckduckgo/app/browser/BrowserActivity.kt— FileTooLong — 1248 significant lines (blank, comment-only and punctuation-only lines excluded), about 88% of them inside a single declaration: BrowserActivity (171-1914). The bar is 500 significant lines; this is 748 over it, 2.50× 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: omnibar/OmnibarLayout.kt app/src/main/java/com/duckduckgo/app/browser/omnibar/OmnibarLayout.kt— FileTooLong — 1220 significant lines (blank, comment-only and punctuation-only lines excluded), about 86% of them inside a single declaration: OmnibarLayout (147-1763). The bar is 500 significant lines; this is 720 over it, 2.44× 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: pixels/PirPixelSender.kt pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/pixels/PirPixelSender.kt— FileTooLong — 1156 significant lines (blank, comment-only and punctuation-only lines excluded), about 67% of them inside a single declaration: RealPirPixelSender (763-1854). The bar is 500 significant lines; this is 656 over it, 2.31× 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: nativeinput/NativeInputManager.kt app/src/main/java/com/duckduckgo/app/browser/nativeinput/NativeInputManager.kt— FileTooLong — 1093 significant lines (blank, comment-only and punctuation-only lines excluded), about 84% of them inside a single declaration: RealNativeInputManager (190-1630). The bar is 500 significant lines; this is 593 over it, 2.19× 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: impl/SyncAccountRepository.kt sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/SyncAccountRepository.kt— FileTooLong — 1069 significant lines (blank, comment-only and punctuation-only lines excluded), about 81% of them inside a single declaration: AppSyncAccountRepository (162-1571). The bar is 500 significant lines; this is 569 over it, 2.14× 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: ui/Cta.kt app/src/main/java/com/duckduckgo/app/cta/ui/Cta.kt— FileTooLong — 931 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 431 over it, 1.86× 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: pixels/SyncPixels.kt sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/pixels/SyncPixels.kt— FileTooLong — 931 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 431 over it, 1.86× 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: impl/SubscriptionsManager.kt subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/SubscriptionsManager.kt— FileTooLong — 914 significant lines (blank, comment-only and punctuation-only lines excluded), about 79% of them inside a single declaration: RealSubscriptionsManager (270-1332). The bar is 500 significant lines; this is 414 over it, 1.83× 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: omnibar/OmnibarLayoutViewModel.kt app/src/main/java/com/duckduckgo/app/browser/omnibar/OmnibarLayoutViewModel.kt— FileTooLong — 912 significant lines (blank, comment-only and punctuation-only lines excluded), about 90% of them inside a single declaration: OmnibarLayoutViewModel (107-1263). The bar is 500 significant lines; this is 412 over it, 1.82× 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: orchestrator/NewUserOnboardingPlanProvider.kt app/src/main/java/com/duckduckgo/app/onboarding/orchestrator/NewUserOnboardingPlanProvider.kt— FileTooLong — 907 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: NewUserOnboardingPlanProvider (100-1317). The bar is 500 significant lines; this is 407 over it, 1.81× 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: ui/TabSwitcherActivity.kt app/src/main/java/com/duckduckgo/app/tabs/ui/TabSwitcherActivity.kt— FileTooLong — 887 significant lines (blank, comment-only and punctuation-only lines excluded), about 88% of them inside a single declaration: TabSwitcherActivity (129-1330). The bar is 500 significant lines; this is 387 over it, 1.77× 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: browser/BrowserWebViewClient.kt app/src/main/java/com/duckduckgo/app/browser/BrowserWebViewClient.kt— FileTooLong — 818 significant lines (blank, comment-only and punctuation-only lines excluded), about 85% of them inside a single declaration: BrowserWebViewClient (117-1185). The bar is 500 significant lines; this is 318 over it, 1.64× 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: ui/SyncInternalSettingsViewModel.kt sync/sync-internal/src/main/java/com/duckduckgo/sync/internal/ui/SyncInternalSettingsViewModel.kt— FileTooLong — 788 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: SyncInternalSettingsViewModel (88-1125). The bar is 500 significant lines; this is 288 over it, 1.58× 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: dialogs/DialogsFragment.kt android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/dialogs/DialogsFragment.kt— FileTooLong — 748 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: DialogsFragment (82-1079). The bar is 500 significant lines; this is 248 over it, 1.50× 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: contextual/DuckChatContextualWebViewFragment.kt duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/contextual/DuckChatContextualWebViewFragment.kt— FileTooLong — 681 significant lines (blank, comment-only and punctuation-only lines excluded), about 86% of them inside a single declaration: DuckChatContextualWebViewFragment (121-1018). The bar is 500 significant lines; this is 181 over it, 1.36× 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: impl/RealDuckChat.kt duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/RealDuckChat.kt— FileTooLong — 668 significant lines (blank, comment-only and punctuation-only lines excluded), about 69% of them inside a single declaration: RealDuckChat (447-1143). The bar is 500 significant lines; this is 168 over it, 1.34× 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: helper/DuckChatJSHelper.kt duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/helper/DuckChatJSHelper.kt— FileTooLong — 649 significant lines (blank, comment-only and punctuation-only lines excluded), about 85% of them inside a single declaration: RealDuckChatJSHelper (126-894). The bar is 500 significant lines; this is 149 over it, 1.30× 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: common/PirRunStateHandler.kt pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/common/PirRunStateHandler.kt— FileTooLong — 647 significant lines (blank, comment-only and punctuation-only lines excluded), about 63% of them inside a single declaration: RealPirRunStateHandler (290-842). The bar is 500 significant lines; this is 147 over it, 1.29× 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: store/DuckAiDebugServer.kt duckchat/duckchat-internal/src/main/java/com/duckduckgo/duckchat/internal/store/DuckAiDebugServer.kt— FileTooLong — 638 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: RealDuckAiDebugServer (58-835). The bar is 500 significant lines; this is 138 over it, 1.28× 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: store/PirRepository.kt pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/store/PirRepository.kt— FileTooLong — 637 significant lines (blank, comment-only and punctuation-only lines excluded), about 75% of them inside a single declaration: RealPirRepository (313-1010). The bar is 500 significant lines; this is 137 over it, 1.27× 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.
+ 18 more in this group — see findings.md.
DM11 · Constructible invalid state· Constructible in an invalid state · ×40
Constructible in an invalid state: WebCompatEntity web-compat/web-compat-store/src/main/java/com/duckduckgo/webcompat/store/WebCompatEntity.kt:22— `WebCompatEntity`'s public constructor takes `json` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `WebCompatEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
Constructible in an invalid state: ManufacturerEntity voice-search/voice-search-store/src/main/java/com/duckduckgo/voice/store/VoiceSearchDatabaseModels.kt:23— `ManufacturerEntity`'s public constructor takes `name` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `ManufacturerEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
Constructible in an invalid state: LocaleEntity voice-search/voice-search-store/src/main/java/com/duckduckgo/voice/store/VoiceSearchDatabaseModels.kt:29— `LocaleEntity`'s public constructor takes `name` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `LocaleEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
Constructible in an invalid state: UserAgentExceptionEntity user-agent/user-agent-store/src/main/java/com/duckduckgo/user/agent/store/UserAgentDatabaseModels.kt:24— `UserAgentExceptionEntity`'s public constructor takes `domain`, `reason` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `UserAgentExceptionEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
Constructible in an invalid state: ClientHintBrandDomainEntity user-agent/user-agent-impl/src/main/java/com/duckduckgo/user/agent/impl/store/ClientBrandHintDatabaseModels.kt:23— `ClientHintBrandDomainEntity`'s public constructor takes `url`, `brand` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `ClientHintBrandDomainEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
Constructible in an invalid state: TdsCnameEntity tracker-detection/tracker-detection-impl/src/main/java/com/duckduckgo/app/trackerdetection/model/TdsCnameEntity.kt:23— `TdsCnameEntity`'s public constructor takes `cloakedHostName`, `uncloakedHostName` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `TdsCnameEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
Constructible in an invalid state: TdsDomainEntity tracker-detection/tracker-detection-impl/src/main/java/com/duckduckgo/app/trackerdetection/model/TdsDomainEntity.kt:23— `TdsDomainEntity`'s public constructor takes `domain`, `entityName` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `TdsDomainEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
Constructible in an invalid state: TdsEntity tracker-detection/tracker-detection-impl/src/main/java/com/duckduckgo/app/trackerdetection/model/TdsEntity.kt:23— `TdsEntity`'s public constructor takes `name`, `displayName`, `prevalence` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `TdsEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
Constructible in an invalid state: TdsMetadata tracker-detection/tracker-detection-impl/src/main/java/com/duckduckgo/app/trackerdetection/model/TdsMetadata.kt:23— `TdsMetadata`'s public constructor takes `eTag` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `TdsMetadata` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
Constructible in an invalid state: TdsTracker tracker-detection/tracker-detection-impl/src/main/java/com/duckduckgo/app/trackerdetection/model/TdsTracker.kt:28— `TdsTracker`'s public constructor takes `ownerName` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `TdsTracker` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
Constructible in an invalid state: SyncAttempt sync/sync-store/src/main/java/com/duckduckgo/sync/store/model/SyncDatabaseModels.kt:28— `SyncAttempt`'s public constructor takes `timestamp`, `meta` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `SyncAttempt` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
Constructible in an invalid state: SyncApiError sync/sync-store/src/main/java/com/duckduckgo/sync/store/model/SyncDatabaseModels.kt:48— `SyncApiError`'s public constructor takes `feature`, `date` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `SyncApiError` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
Constructible in an invalid state: SyncOperationError sync/sync-store/src/main/java/com/duckduckgo/sync/store/model/SyncDatabaseModels.kt:66— `SyncOperationError`'s public constructor takes `feature`, `date` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `SyncOperationError` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
Constructible in an invalid state: SettingsSyncMetadataEntity sync/sync-settings-impl/src/main/java/com/duckduckgo/sync/settings/impl/SettingsSyncMetadataEntity.kt:24— `SettingsSyncMetadataEntity`'s public constructor takes `key`, `modified_at`, `deleted_at` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `SettingsSyncMetadataEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
Constructible in an invalid state: DailyPixelFired statistics/statistics-impl/src/main/java/com/duckduckgo/app/statistics/model/DailyPixelFired.kt:24— `DailyPixelFired`'s public constructor takes `name` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `DailyPixelFired` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
Constructible in an invalid state: UniquePixelFired statistics/statistics-impl/src/main/java/com/duckduckgo/app/statistics/model/UniquePixelFired.kt:23— `UniquePixelFired`'s public constructor takes `name` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `UniquePixelFired` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
Constructible in an invalid state: WideEventDailyOccurrenceEntity statistics/statistics-impl/src/main/java/com/duckduckgo/app/statistics/wideevents/db/WideEventDailyOccurrenceEntity.kt:25— `WideEventDailyOccurrenceEntity`'s public constructor takes `dedupKey` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `WideEventDailyOccurrenceEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
Constructible in an invalid state: WideEventEntity statistics/statistics-impl/src/main/java/com/duckduckgo/app/statistics/wideevents/db/WideEventEntity.kt:36— `WideEventEntity`'s public constructor takes `name`, `flowEntryPoint`, `metaType`, `metaVersion`, … as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `WideEventEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
Constructible in an invalid state: SitePreferencesEntity site-preferences/site-preferences-impl/src/main/java/com/duckduckgo/site/preferences/impl/store/SitePreferencesEntity.kt:23— `SitePreferencesEntity`'s public constructor takes `domain` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `SitePreferencesEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
Constructible in an invalid state: SitePermissionsEntity site-permissions/site-permissions-store/src/main/java/com/duckduckgo/site/permissions/store/sitepermissions/SitePermissionsEntity.kt:26— `SitePermissionsEntity`'s public constructor takes `domain`, `askCameraSetting`, `askMicSetting`, `askDrmSetting`, … as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `SitePermissionsEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
Constructible in an invalid state: SitePermissionAllowedEntity site-permissions/site-permissions-store/src/main/java/com/duckduckgo/site/permissions/store/sitepermissionsallowed/SitePermissionAllowedEntity.kt:26— `SitePermissionAllowedEntity`'s public constructor takes `domain`, `tabId`, `permissionAllowed` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `SitePermissionAllowedEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
Constructible in an invalid state: Entity saved-sites/saved-sites-store/src/main/java/com/duckduckgo/savedsites/store/RoomEntities.kt:26— `Entity`'s public constructor takes `entityId`, `title`, `url`, `lastModified` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `Entity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
Constructible in an invalid state: Relation saved-sites/saved-sites-store/src/main/java/com/duckduckgo/savedsites/store/RoomEntities.kt:58— `Relation`'s public constructor takes `folderId`, `entityId` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `Relation` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
Constructible in an invalid state: SavedSitesSyncMetadataEntity saved-sites/saved-sites-impl/src/main/java/com/duckduckgo/savedsites/impl/sync/store/SavedSitesSyncMetadataDao.kt:78— `SavedSitesSyncMetadataEntity`'s public constructor takes `folderId`, `childrenResponse`, `childrenRequest` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `SavedSitesSyncMetadataEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
Constructible in an invalid state: RuntimeChecksEntity runtime-checks/runtime-checks-store/src/main/java/com/duckduckgo/runtimechecks/store/RuntimeChecksEntity.kt:22— `RuntimeChecksEntity`'s public constructor takes `json` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule` or `Requires.` — a guard reached through a helper method those tokens do not name is not seen; for a FACTORY, only this type's OWN static members were read, and only names beginning `Create`, `Of`, `From`, `New` or `Build` — one inherited from a base type, one on a companion builder, or one called `Parse`, `Make` or `Rehydrate` is not seen. If either exists, this row is wrong. If neither does, a caller can build a `RuntimeChecksEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
Anemic entity: TdsCnameEntity tracker-detection/tracker-detection-impl/src/main/java/com/duckduckgo/app/trackerdetection/model/TdsCnameEntity.kt:23— `TdsCnameEntity` is an aggregate/entity with 2 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
Anemic entity: TdsDomainEntity tracker-detection/tracker-detection-impl/src/main/java/com/duckduckgo/app/trackerdetection/model/TdsDomainEntity.kt:23— `TdsDomainEntity` is an aggregate/entity with 2 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
Anemic entity: TdsEntity tracker-detection/tracker-detection-impl/src/main/java/com/duckduckgo/app/trackerdetection/model/TdsEntity.kt:23— `TdsEntity` is an aggregate/entity with 3 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
Anemic entity: TdsMetadata tracker-detection/tracker-detection-impl/src/main/java/com/duckduckgo/app/trackerdetection/model/TdsMetadata.kt:23— `TdsMetadata` is an aggregate/entity with 2 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
Anemic entity: TdsTracker tracker-detection/tracker-detection-impl/src/main/java/com/duckduckgo/app/trackerdetection/model/TdsTracker.kt:28— `TdsTracker` is an aggregate/entity with 5 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
Anemic entity: SyncAttempt sync/sync-store/src/main/java/com/duckduckgo/sync/store/model/SyncDatabaseModels.kt:28— `SyncAttempt` is an aggregate/entity with 4 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
Anemic entity: SyncApiError sync/sync-store/src/main/java/com/duckduckgo/sync/store/model/SyncDatabaseModels.kt:48— `SyncApiError` is an aggregate/entity with 5 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
Anemic entity: SyncOperationError sync/sync-store/src/main/java/com/duckduckgo/sync/store/model/SyncDatabaseModels.kt:66— `SyncOperationError` is an aggregate/entity with 5 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
Anemic entity: DailyPixelFired statistics/statistics-impl/src/main/java/com/duckduckgo/app/statistics/model/DailyPixelFired.kt:24— `DailyPixelFired` is an aggregate/entity with 2 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
Anemic entity: UniquePixelFired statistics/statistics-impl/src/main/java/com/duckduckgo/app/statistics/model/UniquePixelFired.kt:23— `UniquePixelFired` is an aggregate/entity with 1 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
Anemic entity: Relation saved-sites/saved-sites-store/src/main/java/com/duckduckgo/savedsites/store/RoomEntities.kt:58— `Relation` is an aggregate/entity with 3 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
Anemic entity: RemoteMessagingCohort remote-messaging/remote-messaging-store/src/main/java/com/duckduckgo/remote/messaging/store/RemoteMessagingCohort.kt:23— `RemoteMessagingCohort` is an aggregate/entity with 2 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
Anemic entity: RemoteMessagingConfig remote-messaging/remote-messaging-store/src/main/java/com/duckduckgo/remote/messaging/store/RemoteMessagingConfig.kt:24— `RemoteMessagingConfig` is an aggregate/entity with 4 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
Anemic entity: PrivacyConfig privacy-config/privacy-config-store/src/main/java/com/duckduckgo/privacy/config/store/PrivacyConfigDatabaseModels.kt:112— `PrivacyConfig` is an aggregate/entity with 5 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
Anemic entity: BrokerJsonEtag pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/store/db/BrokerEntities.kt:24— `BrokerJsonEtag` is an aggregate/entity with 2 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
Anemic entity: BrokerScan pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/store/db/BrokerEntities.kt:51— `BrokerScan` is an aggregate/entity with 2 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
Anemic entity: BrokerOptOut pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/store/db/BrokerEntities.kt:67— `BrokerOptOut` is an aggregate/entity with 3 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
Anemic entity: PirEmailConfirmationLog pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/store/db/EmailConfirmationLogEntities.kt:28— `PirEmailConfirmationLog` is an aggregate/entity with 3 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
Anemic entity: StoredExtractedProfile pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/store/db/ExtractedProfileEntities.kt:39— `StoredExtractedProfile` is an aggregate/entity with 17 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
Anemic entity: OptOutCompletedBroker pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/store/db/OptOutEntities.kt:28— `OptOutCompletedBroker` is an aggregate/entity with 6 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
Anemic entity: OptOutActionLog pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/store/db/OptOutEntities.kt:42— `OptOutActionLog` is an aggregate/entity with 7 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
Anemic entity: PirEventLog pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/store/db/ScanLogEntities.kt:23— `PirEventLog` is an aggregate/entity with 2 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
Anemic entity: PirBrokerScanLog pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/store/db/ScanLogEntities.kt:41— `PirBrokerScanLog` is an aggregate/entity with 3 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
Anemic entity: ScanCompletedBroker pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/store/db/ScanResultsEntities.kt:29— `ScanCompletedBroker` is an aggregate/entity with 5 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
Anemic entity: UserProfile pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/store/db/UserProfileEntities.kt:24— `UserProfile` is an aggregate/entity with 6 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
TodoComment ad-blocking/ad-blocking-impl/src/main/java/com/duckduckgo/adblocking/impl/RealAdBlockingOmnibarAnimation.kt:67— // TODO update to new video_player_color_24.xml resource when AppBrandDesignUpdateToggles.addressBar() is removed — 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 android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/AppComponentsActivity.kt:59— // TODO when ADS is all compose we should start using DI for AppComponentsActivity and AppComponentsViewModel — 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 android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/AppComponentsActivity.kt:114— // TODO if we add another theme (e.g. true black) we would change the toggle and move this logic to the VM — 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 android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/compose/theme/Color.kt:43— // TODO we'll need to do an exploration into using the app pref for Theme switching — 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 android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/compose/theme/Color.kt:90— // TODO: Doesn't seem to exist in the android design system on Figma, but we have a View version. Need confirmation on what the deal is. — 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 app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/health/CPUMonitorWorker.kt:50— // TODO: move thresholds to remote config — 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 app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/heartbeat/VpnServiceHeartbeatMonitor.kt:114— // TODO this is for now just in NetP, move it to public repo once tested — 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 app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/service/TrackerBlockingVpnService.kt:417— // TODO this is temporary hack until we know this approach works for moto g. If it does we'll spend time making it better/more permanent — 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 app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/service/TrackerBlockingVpnService.kt:457— // TODO should we protect all comms with our controller BE? other VPNs do that — 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 app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/service/TrackerBlockingVpnService.kt:494— // TODO: eventually routes will be set by remote config — 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 app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/service/TrackerBlockingVpnService.kt:508— // TODO filtering Ipv6 out for now for simplicity. Once we support IPv6 we'll come back to this — 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 app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/service/TrackerBlockingVpnService.kt:838— // TODO commented out for now, we'll see if we need it once we enable the new networking layer — 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 app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/ui/onboarding/AppTPVpnOnboardingResourceHelper.kt:33— // TODO: Remove this class when we can rely on the platform day/night/system theme — 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 app/src/main/java/com/duckduckgo/app/browser/BrowserWebViewClient.kt:842— // TODO (cbarreiro - 22/05/2024): Extract to plugins — 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 app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt:5103— // TODO: Eventually, we might want plugins 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 app/src/main/java/com/duckduckgo/app/browser/commands/Command.kt:390— // TODO (cbarreiro) Rename to SendResponseToCSS — 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 app/src/main/java/com/duckduckgo/app/browser/omnibar/QueryUrlConverter.kt:92— // TODO remove the DuckUri check when the predictor is updated to include 'duck' scheme — 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 app/src/main/java/com/duckduckgo/app/browser/tabs/adapter/FragmentStateAdapter.java:293— // TODO(133419201): check if a Fragment provided here is a new Fragment — 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 app/src/main/java/com/duckduckgo/app/browser/tabs/adapter/FragmentStateAdapter.java:424— // TODO(b/141956012): Suppressed during upgrade to AGP 3.6. — 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 app/src/main/java/com/duckduckgo/app/browser/tabs/adapter/FragmentStateAdapter.java:613— // TODO(b/122670460): add lint rule — 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 app/src/main/java/com/duckduckgo/app/browser/tabs/adapter/FragmentStateAdapter.java:624— // TODO(b/122670460): add lint rule — 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 app/src/main/java/com/duckduckgo/app/di/PrivacyModule.kt:89— // TODO: Burns currently only clear @RegularMode tabs. Cross-mode tab clearing will be — 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 app/src/main/java/com/duckduckgo/app/notification/NotificationRegistrar.kt:117— // TODO this is hack because we don't have a good way to remove channels when we no longer use them — 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 app/src/main/java/com/duckduckgo/app/onboarding/OnboardingFlowCheckerImpl.kt:41— // TODO Consider adding allOnboardingCtasShown() in the future. — 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 app/src/main/java/com/duckduckgo/app/webtrackingprotection/WebTrackingProtectionActivity.kt:68— // TODO eligible for extraction and use in AutoConsent as well when removing old settings — 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.
Hotspot: app/src/main/java/com/duckduckgo/app/browser/BrowserTabFragment.kt app/src/main/java/com/duckduckgo/app/browser/BrowserTabFragment.kt:2685— app/src/main/java/com/duckduckgo/app/browser/BrowserTabFragment.kt changed 62 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 156 in BrowserTabFragment.processCommand at line 2685. 5 of those changes were fix/bug commits, and the other 57 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 21:28:36 +00:00' --until='2026-10-23 21:28:36 +00:00' --full-history --no-merges -- app/src/main/java/com/duckduckgo/app/browser/BrowserTabFragment.kt`: 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: app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt:1474— app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt changed 52 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in BrowserTabViewModel.submitQuery at line 1474. 3 of those changes were fix/bug commits, and the other 49 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 21:28:36 +00:00' --until='2026-10-23 21:28:36 +00:00' --full-history --no-merges -- app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt`: 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: duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/pixel/DuckChatPixels.kt duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/pixel/DuckChatPixels.kt:445— duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/pixel/DuckChatPixels.kt changed 30 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 41 in RealDuckChatPixels.sendReportMetricPixel at line 445. 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 21:28:36 +00:00' --until='2026-10-23 21:28:36 +00:00' --full-history --no-merges -- duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/pixel/DuckChatPixels.kt`: 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: duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/helper/DuckChatJSHelper.kt duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/helper/DuckChatJSHelper.kt:156— duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/helper/DuckChatJSHelper.kt changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 44 in RealDuckChatJSHelper.processJsCallbackMessage at line 156. 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 21:28:36 +00:00' --until='2026-10-23 21:28:36 +00:00' --full-history --no-merges -- duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/helper/DuckChatJSHelper.kt`: 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: sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/ui/dashboard/SyncActivity.kt sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/ui/dashboard/SyncActivity.kt:388— sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/ui/dashboard/SyncActivity.kt changed 25 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in SyncActivity.processCommand at line 388. 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 21:28:36 +00:00' --until='2026-10-23 21:28:36 +00:00' --full-history --no-merges -- sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/ui/dashboard/SyncActivity.kt`: 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: app/src/main/java/com/duckduckgo/app/browser/nativeinput/NativeInputManager.kt app/src/main/java/com/duckduckgo/app/browser/nativeinput/NativeInputManager.kt:564— app/src/main/java/com/duckduckgo/app/browser/nativeinput/NativeInputManager.kt changed 28 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in RealNativeInputManager.showNativeInput at line 564. 2 of those changes were fix/bug commits, and the other 26 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 21:28:36 +00:00' --until='2026-10-23 21:28:36 +00:00' --full-history --no-merges -- app/src/main/java/com/duckduckgo/app/browser/nativeinput/NativeInputManager.kt`: 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: app/src/main/java/com/duckduckgo/app/browser/BrowserActivity.kt app/src/main/java/com/duckduckgo/app/browser/BrowserActivity.kt:798— app/src/main/java/com/duckduckgo/app/browser/BrowserActivity.kt changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in BrowserActivity.processIntent at line 798. 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 21:28:36 +00:00' --until='2026-10-23 21:28:36 +00:00' --full-history --no-merges -- app/src/main/java/com/duckduckgo/app/browser/BrowserActivity.kt`: 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: app/src/main/java/com/duckduckgo/app/browser/BrowserWebViewClient.kt app/src/main/java/com/duckduckgo/app/browser/BrowserWebViewClient.kt:299— app/src/main/java/com/duckduckgo/app/browser/BrowserWebViewClient.kt changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 44 in BrowserWebViewClient.shouldOverride at line 299. 2 of those changes were fix/bug commits, and the other 8 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 21:28:36 +00:00' --until='2026-10-23 21:28:36 +00:00' --full-history --no-merges -- app/src/main/java/com/duckduckgo/app/browser/BrowserWebViewClient.kt`: 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: duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/RealDuckChat.kt duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/RealDuckChat.kt:1044— duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/RealDuckChat.kt changed 22 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in RealDuckChat.cacheUserSettings at line 1044. 1 of those changes was a fix/bug commit, and the other 21 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 21:28:36 +00:00' --until='2026-10-23 21:28:36 +00:00' --full-history --no-merges -- duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/RealDuckChat.kt`: 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: app/src/main/java/com/duckduckgo/app/onboarding/ui/page/welcome/WelcomePageViewModel.kt app/src/main/java/com/duckduckgo/app/onboarding/ui/page/welcome/WelcomePageViewModel.kt:522— app/src/main/java/com/duckduckgo/app/onboarding/ui/page/welcome/WelcomePageViewModel.kt changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in WelcomePageViewModel.handleCommandOnlyDialog at line 522. 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 21:28:36 +00:00' --until='2026-10-23 21:28:36 +00:00' --full-history --no-merges -- app/src/main/java/com/duckduckgo/app/onboarding/ui/page/welcome/WelcomePageViewModel.kt`: 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: app/src/main/java/com/duckduckgo/app/onboarding/ui/page/welcome/DialogConfigResolver.kt app/src/main/java/com/duckduckgo/app/onboarding/ui/page/welcome/DialogConfigResolver.kt:33— app/src/main/java/com/duckduckgo/app/onboarding/ui/page/welcome/DialogConfigResolver.kt changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in DialogConfigResolver.resolve 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 21:28:36 +00:00' --until='2026-10-23 21:28:36 +00:00' --full-history --no-merges -- app/src/main/java/com/duckduckgo/app/onboarding/ui/page/welcome/DialogConfigResolver.kt`: 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: site-permissions/site-permissions-impl/src/main/java/com/duckduckgo/site/permissions/impl/SitePermissionsDialogActivityLauncher.kt site-permissions/site-permissions-impl/src/main/java/com/duckduckgo/site/permissions/impl/SitePermissionsDialogActivityLauncher.kt:823— site-permissions/site-permissions-impl/src/main/java/com/duckduckgo/site/permissions/impl/SitePermissionsDialogActivityLauncher.kt changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in SitePermissionsDialogActivityLauncher.showSystemPermissionsDeniedDialog at line 823. 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 21:28:36 +00:00' --until='2026-10-23 21:28:36 +00:00' --full-history --no-merges -- site-permissions/site-permissions-impl/src/main/java/com/duckduckgo/site/permissions/impl/SitePermissionsDialogActivityLauncher.kt`: 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: app/src/main/java/com/duckduckgo/app/cta/ui/CtaViewModel.kt app/src/main/java/com/duckduckgo/app/cta/ui/CtaViewModel.kt:469— app/src/main/java/com/duckduckgo/app/cta/ui/CtaViewModel.kt changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in CtaViewModel.getBrowserCta at line 469. 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 21:28:36 +00:00' --until='2026-10-23 21:28:36 +00:00' --full-history --no-merges -- app/src/main/java/com/duckduckgo/app/cta/ui/CtaViewModel.kt`: 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: app/src/main/java/com/duckduckgo/app/onboarding/ui/page/OnboardingPixelSender.kt app/src/main/java/com/duckduckgo/app/onboarding/ui/page/OnboardingPixelSender.kt:173— app/src/main/java/com/duckduckgo/app/onboarding/ui/page/OnboardingPixelSender.kt changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in RealOnboardingPixelSender.fire at line 173. 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 21:28:36 +00:00' --until='2026-10-23 21:28:36 +00:00' --full-history --no-merges -- app/src/main/java/com/duckduckgo/app/onboarding/ui/page/OnboardingPixelSender.kt`: 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: pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/scheduling/PirJobsRunner.kt pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/scheduling/PirJobsRunner.kt:104— pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/scheduling/PirJobsRunner.kt changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in RealPirJobsRunner.runEligibleJobs at line 104. 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 21:28:36 +00:00' --until='2026-10-23 21:28:36 +00:00' --full-history --no-merges -- pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/scheduling/PirJobsRunner.kt`: 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: android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/component/ComponentViewHolder.kt android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/component/ComponentViewHolder.kt:1243— android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/component/ComponentViewHolder.kt changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in ComponentViewHolder.create at line 1243. 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 21:28:36 +00:00' --until='2026-10-23 21:28:36 +00:00' --full-history --no-merges -- android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/component/ComponentViewHolder.kt`: 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: app/src/main/java/com/duckduckgo/app/onboarding/ui/page/welcome/WelcomePageFragment.kt app/src/main/java/com/duckduckgo/app/onboarding/ui/page/welcome/WelcomePageFragment.kt:306— app/src/main/java/com/duckduckgo/app/onboarding/ui/page/welcome/WelcomePageFragment.kt changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in WelcomePageFragment.handleCommand at line 306. 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 21:28:36 +00:00' --until='2026-10-23 21:28:36 +00:00' --full-history --no-merges -- app/src/main/java/com/duckduckgo/app/onboarding/ui/page/welcome/WelcomePageFragment.kt`: 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: app/src/main/java/com/duckduckgo/app/onboarding/ui/page/welcome/engine/ContentController.kt app/src/main/java/com/duckduckgo/app/onboarding/ui/page/welcome/engine/ContentController.kt:91— app/src/main/java/com/duckduckgo/app/onboarding/ui/page/welcome/engine/ContentController.kt changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in ContentControllerImpl.bind at line 91. 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 21:28:36 +00:00' --until='2026-10-23 21:28:36 +00:00' --full-history --no-merges -- app/src/main/java/com/duckduckgo/app/onboarding/ui/page/welcome/engine/ContentController.kt`: 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: app/src/main/java/com/duckduckgo/app/onboarding/ui/page/welcome/OnboardingDialogShownPixels.kt app/src/main/java/com/duckduckgo/app/onboarding/ui/page/welcome/OnboardingDialogShownPixels.kt:37— app/src/main/java/com/duckduckgo/app/onboarding/ui/page/welcome/OnboardingDialogShownPixels.kt changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in OnboardingDialogShownPixels.fireFor at line 37. 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 21:28:36 +00:00' --until='2026-10-23 21:28:36 +00:00' --full-history --no-merges -- app/src/main/java/com/duckduckgo/app/onboarding/ui/page/welcome/OnboardingDialogShownPixels.kt`: 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: duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/contextual/DuckChatContextualWebViewFragment.kt duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/contextual/DuckChatContextualWebViewFragment.kt:258— duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/contextual/DuckChatContextualWebViewFragment.kt changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in DuckChatContextualWebViewFragment.onViewCreated at line 258. 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 21:28:36 +00:00' --until='2026-10-23 21:28:36 +00:00' --full-history --no-merges -- duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/contextual/DuckChatContextualWebViewFragment.kt`: 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: subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/SubscriptionsManager.kt subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/SubscriptionsManager.kt:1119— subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/SubscriptionsManager.kt changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in RealSubscriptionsManager.purchase at line 1119. 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 21:28:36 +00:00' --until='2026-10-23 21:28:36 +00:00' --full-history --no-merges -- subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/SubscriptionsManager.kt`: 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: sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/RealSyncCodeDispatcher.kt sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/RealSyncCodeDispatcher.kt:306— sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/RealSyncCodeDispatcher.kt changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in RealSyncCodeDispatcher.mapV2Transition at line 306. 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 21:28:36 +00:00' --until='2026-10-23 21:28:36 +00:00' --full-history --no-merges -- sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/RealSyncCodeDispatcher.kt`: 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: duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/nativeinput/footer/usagelimits/UsageLimitFooterPlugin.kt duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/nativeinput/footer/usagelimits/UsageLimitFooterPlugin.kt:88— duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/nativeinput/footer/usagelimits/UsageLimitFooterPlugin.kt changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in UsageLimitFooterPlugin.createFooter at line 88. 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 21:28:36 +00:00' --until='2026-10-23 21:28:36 +00:00' --full-history --no-merges -- duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/nativeinput/footer/usagelimits/UsageLimitFooterPlugin.kt`: 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: duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/nativeinput/footer/highusage/HighUsageModelFooterPlugin.kt duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/nativeinput/footer/highusage/HighUsageModelFooterPlugin.kt:68— duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/nativeinput/footer/highusage/HighUsageModelFooterPlugin.kt changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in HighUsageModelFooterPlugin.createFooter at line 68. 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 21:28:36 +00:00' --until='2026-10-23 21:28:36 +00:00' --full-history --no-merges -- duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/nativeinput/footer/highusage/HighUsageModelFooterPlugin.kt`: 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: app/src/main/java/com/duckduckgo/app/browser/nativeinput/NativeInputLayoutCoordinator.kt app/src/main/java/com/duckduckgo/app/browser/nativeinput/NativeInputLayoutCoordinator.kt:172— app/src/main/java/com/duckduckgo/app/browser/nativeinput/NativeInputLayoutCoordinator.kt changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in NativeInputLayoutCoordinator.configureContentOffset at line 172. 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-07-25..2026-10-23, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-25 21:28:36 +00:00' --until='2026-10-23 21:28:36 +00:00' --full-history --no-merges -- app/src/main/java/com/duckduckgo/app/browser/nativeinput/NativeInputLayoutCoordinator.kt`: 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.
Swallowed exception (caught, then discarded) app-tracking-protection/vpn-store/src/main/java/com/duckduckgo/mobile/android/vpn/store/VpnDatabase.kt:281— `catch (t: Throwable)` 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) app-tracking-protection/vpn-store/src/main/java/com/duckduckgo/mobile/android/vpn/store/VpnDatabase.kt:297— `catch (t: Throwable)` 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) app/src/main/java/com/duckduckgo/app/browser/defaultbrowsing/DefaultBrowserChangedSurveySampler.kt:60— `catch (_: Exception)` 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) app/src/main/java/com/duckduckgo/app/browser/omnibar/OmnibarLayoutViewModel.kt:580— `catch (e: Exception)` 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) app/src/main/java/com/duckduckgo/app/buildconfig/RealAppBuildConfig.kt:72— `catch (e: Exception)` 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) app/src/main/java/com/duckduckgo/app/fire/DatabaseCleaner.kt:66— `catch (exception: Exception)` 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) app/src/main/java/com/duckduckgo/app/generalsettings/showonapplaunch/IdleThresholdResolver.kt:48— `catch (e: Exception)` 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) app/src/main/java/com/duckduckgo/app/startup/metrics/MemoryCollector.kt:55— `catch (_: Exception)` 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) app/src/main/java/com/duckduckgo/app/tabs/model/TabDataRepository.kt:408— `catch (_: Exception)` 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) autoconsent/autoconsent-impl/src/main/java/com/duckduckgo/autoconsent/impl/RealAutoconsent.kt:122— `catch (e: Exception)` 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) broken-site/broken-site-impl/src/main/java/com/duckduckgo/brokensite/impl/BrokenSitePomptDataStore.kt:159— `catch (e: Exception)` 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) browser-api/src/main/java/com/duckduckgo/app/browser/UriString.kt:69— `catch (e: Exception)` 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) cookies/cookies-impl/src/main/java/com/duckduckgo/cookies/impl/features/firstparty/FirstPartyCookiesModifier.kt:154— `catch (exception: Exception)` 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) duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/history/RenameChatViewModel.kt:59— `catch (e: Exception)` 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) duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/rmf/RMFDaysSinceDuckAiUsedMatchingAttribute.kt:86— `catch (e: Exception)` 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) event-hub/event-hub-impl/src/main/java/com/duckduckgo/eventhub/impl/pixels/EventHubConfigParser.kt:91— `catch (e: Exception)` 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) malicious-site-protection/malicious-site-protection-impl/src/main/kotlin/com/duckduckgo/malicioussiteprotection/impl/data/MaliciousSiteRepository.kt:149— `catch (e: Exception)` 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) pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/brokers/BrokerJsonProcessor.kt:96— `catch (e: Throwable)` 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) pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/service/DbpServiceUtils.kt:31— `catch (e: Exception)` 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) pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/store/PirRepository.kt:713— `catch (_: Exception)` 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) pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/store/secure/PirSecureStorageKeyStore.kt:115— `catch (_: Exception)` 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) subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/SubscriptionsManager.kt:511— `catch (e: Exception)` 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) subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/SubscriptionsManager.kt:855— `catch (_: Exception)` 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) subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/SubscriptionsManager.kt:971— `catch (_: Exception)` 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) subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/rmf/RMFSubscriptionDaysUntilExpiryRenewalMatchingAttribute.kt:89— `catch (e: Exception)` 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.
MethodTooLong: DialogsFragment.onViewCreated android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/dialogs/DialogsFragment.kt:95— MethodTooLong — onViewCreated runs 660 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 560 over it, 6.60× 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: DuckChatParamRemovalPlugin.names duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/pixel/DuckChatPixels.kt:1770— MethodTooLong — names runs 254 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 154 over it, 2.54× 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: ComponentTextInputFragment.setupComposeViews android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/component/textinput/ComponentTextInputFragment.kt:138— MethodTooLong — setupComposeViews runs 253 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 153 over it, 2.53× 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: ComponentButtonsFragment.setupComposeViews android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/component/buttons/ComponentButtonsFragment.kt:109— MethodTooLong — setupComposeViews runs 195 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 95 over it, 1.95× 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: PirRunStateHandler.handleState pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/common/PirRunStateHandler.kt:76— MethodTooLong — handleState runs 184 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 84 over it, 1.84× 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: DuckChatContextualWebViewFragment.onViewCreated duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/contextual/DuckChatContextualWebViewFragment.kt:258— MethodTooLong — onViewCreated runs 166 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 66 over it, 1.66× 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: PixelInterceptorPixelsRequiringDataCleaning.names app/src/main/java/com/duckduckgo/app/global/api/PixelParamRemovalInterceptor.kt:94— MethodTooLong — names runs 147 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 47 over it, 1.47× 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: RemoteMessageComponentViewHolder.bind android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/component/ComponentViewHolder.kt:373— MethodTooLong — bind runs 146 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 46 over it, 1.46× 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: DaxBubbleCta.showCta app/src/main/java/com/duckduckgo/app/cta/ui/Cta.kt:1030— MethodTooLong — showCta runs 146 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 46 over it, 1.46× 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: NativeInputLayoutCoordinator.configureContentOffset app/src/main/java/com/duckduckgo/app/browser/nativeinput/NativeInputLayoutCoordinator.kt:172— MethodTooLong — configureContentOffset runs 143 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 43 over it, 1.43× 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: ExecuteBrokerStepActionEventHandler.invoke pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/common/actions/ExecuteBrokerStepActionEventHandler.kt:78— MethodTooLong — invoke runs 141 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 41 over it, 1.41× 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: AddressBarTrackersAnimator.startAnimation app/src/main/java/com/duckduckgo/app/browser/omnibar/animations/addressbar/AddressBarTrackersAnimator.kt:67— MethodTooLong — startAnimation runs 140 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 40 over it, 1.40× 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: BrowserWebViewClient.shouldOverride app/src/main/java/com/duckduckgo/app/browser/BrowserWebViewClient.kt:299— MethodTooLong — shouldOverride runs 138 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 38 over it, 1.38× 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: RealDuckChatJSHelper.processJsCallbackMessage duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/helper/DuckChatJSHelper.kt:156— MethodTooLong — processJsCallbackMessage runs 135 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 35 over it, 1.35× 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: DragLinearLayout.onDrag new-tab-page/new-tab-page-impl/src/main/java/com/duckduckgo/newtabpage/impl/settings/DragLinearLayout.kt:190— MethodTooLong — onDrag runs 124 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 24 over it, 1.24× 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: VpnDatabase.vpnTrackerDao app-tracking-protection/vpn-store/src/main/java/com/duckduckgo/mobile/android/vpn/store/VpnDatabase.kt:55— MethodTooLong — vpnTrackerDao runs 116 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 16 over it, 1.16× 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: VpnDatabase.vpnHeartBeatDao app-tracking-protection/vpn-store/src/main/java/com/duckduckgo/mobile/android/vpn/store/VpnDatabase.kt:56— MethodTooLong — vpnHeartBeatDao runs 115 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 15 over it, 1.15× 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: BrowserTabViewModel.submitQuery app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt:1474— MethodTooLong — submitQuery runs 115 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 15 over it, 1.15× 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: ThemeKt.DuckDuckGoTheme android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/compose/theme/Theme.kt:76— MethodTooLong — DuckDuckGoTheme runs 114 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 14 over it, 1.14× 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: VpnDatabase.vpnAppTrackerBlockingDao app-tracking-protection/vpn-store/src/main/java/com/duckduckgo/mobile/android/vpn/store/VpnDatabase.kt:57— MethodTooLong — vpnAppTrackerBlockingDao runs 114 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 14 over it, 1.14× 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: ContextualDaxDialogCta.showOnboardingCta app/src/main/java/com/duckduckgo/app/cta/ui/Cta.kt:220— MethodTooLong — showOnboardingCta runs 114 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 14 over it, 1.14× 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: VpnDatabase.vpnServiceStateDao app-tracking-protection/vpn-store/src/main/java/com/duckduckgo/mobile/android/vpn/store/VpnDatabase.kt:58— MethodTooLong — vpnServiceStateDao runs 113 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 13 over it, 1.13× 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: VpnDatabase.vpnSystemAppsOverridesDao app-tracking-protection/vpn-store/src/main/java/com/duckduckgo/mobile/android/vpn/store/VpnDatabase.kt:59— MethodTooLong — vpnSystemAppsOverridesDao runs 112 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 12 over it, 1.12× 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: VpnDatabase.vpnFeatureRemoverDao app-tracking-protection/vpn-store/src/main/java/com/duckduckgo/mobile/android/vpn/store/VpnDatabase.kt:60— MethodTooLong — vpnFeatureRemoverDao runs 111 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 11 over it, 1.11× 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: BrowserActivity.processIntent app/src/main/java/com/duckduckgo/app/browser/BrowserActivity.kt:798— MethodTooLong — processIntent 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.
Duplicated block (8 lines × 2) ad-blocking/ad-blocking-impl/src/main/java/com/duckduckgo/adblocking/impl/duckplayer/DuckPlayerScriptsJsMessaging.kt:59— ad-blocking/ad-blocking-impl/src/main/java/com/duckduckgo/adblocking/impl/duckplayer/DuckPlayerScriptsJsMessaging.kt:59-66 | subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/messaging/SubscriptionMessagingInterface.kt:81-88 — before extracting anything, compare `ad-blocking/ad-blocking-impl/src/main/java/com/duckduckgo/adblocking/impl/duckplayer/DuckPlayerScriptsJsMessaging.kt` and `subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/messaging/SubscriptionMessagingInterface.kt` as WHOLE FILES: this scan already matched 4 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. 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 `ad-blocking/ad-blocking-impl/src/main/java/com/duckduckgo/adblocking/impl/duckplayer/DuckPlayerScriptsJsMessaging.kt:59` 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) app-database/src/main/java/com/duckduckgo/app/bookmarks/migration/AppDatabaseBookmarksMigrationCallback.kt:232— app-database/src/main/java/com/duckduckgo/app/bookmarks/migration/AppDatabaseBookmarksMigrationCallback.kt:232-239 | app-database/src/main/java/com/duckduckgo/app/bookmarks/migration/AppDatabaseBookmarksMigrationCallback.kt:243-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 `app-database/src/main/java/com/duckduckgo/app/bookmarks/migration/AppDatabaseBookmarksMigrationCallback.kt:232` 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 (8 lines × 2) app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/service/notification/AppTPAndNetPEnabledNotificationContentPlugin.kt:76— app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/service/notification/AppTPAndNetPEnabledNotificationContentPlugin.kt:76-83 | app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/service/notification/AppTpEnabledNotificationContentPlugin.kt:77-84 — 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 `app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/service/notification/AppTPAndNetPEnabledNotificationContentPlugin.kt:76` 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) app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/ui/tracker_activity/AppTPCompanyDetailsAdapter.kt:215— app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/ui/tracker_activity/AppTPCompanyDetailsAdapter.kt:215-222 | app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/ui/tracker_activity/TrackerBadgeAdapter.kt:109-116 — 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 (8 lines × 2) app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt:1397— app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt:1397-1404 | app/src/main/java/com/duckduckgo/app/systemsearch/SystemSearchViewModel.kt:390-397 — 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 `app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt:1397` 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) app/src/main/java/com/duckduckgo/app/browser/WebNavigationState.kt:138— app/src/main/java/com/duckduckgo/app/browser/WebNavigationState.kt:138-145 | app/src/main/java/com/duckduckgo/app/browser/WebNavigationState.kt:216-223 — 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 `app/src/main/java/com/duckduckgo/app/browser/WebNavigationState.kt:138` 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 (8 lines × 2) app/src/main/java/com/duckduckgo/app/browser/filechooser/capture/permission/RealExternalMediaSystemPermissionsHelper.kt:54— app/src/main/java/com/duckduckgo/app/browser/filechooser/capture/permission/RealExternalMediaSystemPermissionsHelper.kt:54-61 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/filechooser/capture/permission/RealExternalMediaSystemPermissionsHelper.kt:54-61 — before extracting anything, compare `app/src/main/java/com/duckduckgo/app/browser/filechooser/capture/permission/RealExternalMediaSystemPermissionsHelper.kt` and `duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/filechooser/capture/permission/RealExternalMediaSystemPermissionsHelper.kt` as WHOLE FILES: 92% 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. 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) app/src/main/java/com/duckduckgo/app/browser/newtab/NewTabPageView.kt:341— app/src/main/java/com/duckduckgo/app/browser/newtab/NewTabPageView.kt:341-348 | remote-messaging/remote-messaging-impl/src/main/java/com/duckduckgo/remote/messaging/impl/newtab/RemoteMessageView.kt:145-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. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/duckduckgo/app/browser/newtab/NewTabPageView.kt: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. Note first that the copies are not typed on the same thing: `DismissMessage` names `com.duckduckgo.app.browser.newtab.NewTabPageViewModel.Command.DismissMessage` in one and `com.duckduckgo.remote.messaging.impl.newtab.RemoteMessageViewModel.Command.DismissMessage` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, 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) autofill/autofill-internal/src/main/java/com/duckduckgo/autofill/internal/AutofillInternalSettingsActivity.kt:489— autofill/autofill-internal/src/main/java/com/duckduckgo/autofill/internal/AutofillInternalSettingsActivity.kt:489-496 | autofill/autofill-internal/src/main/java/com/duckduckgo/autofill/internal/AutofillInternalSettingsActivity.kt:499-506 — 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) duckchat/duckchat-internal/src/main/java/com/duckduckgo/duckchat/internal/store/DuckAiDebugServer.kt:183— duckchat/duckchat-internal/src/main/java/com/duckduckgo/duckchat/internal/store/DuckAiDebugServer.kt:183-190 | duckchat/duckchat-store/src/main/java/com/duckduckgo/duckchat/store/impl/handler/DuckAiNativeStorageJsMessageHandler.kt:453-460 — 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 `duckchat/duckchat-internal/src/main/java/com/duckduckgo/duckchat/internal/store/DuckAiDebugServer.kt:183` 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 (8 lines × 2) content-scope-scripts/content-scope-scripts-impl/src/main/java/com/duckduckgo/contentscopescripts/impl/features/apimanipulation/store/ApiManipulationStore.kt:42— content-scope-scripts/content-scope-scripts-impl/src/main/java/com/duckduckgo/contentscopescripts/impl/features/apimanipulation/store/ApiManipulationStore.kt:42-49 | content-scope-scripts/content-scope-scripts-impl/src/main/java/com/duckduckgo/contentscopescripts/impl/features/pagecontext/store/PageContextStore.kt:39-46 — 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 (8 lines × 2) android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/dialog/StackedAlertDialogBuilder.kt:382— android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/dialog/StackedAlertDialogBuilder.kt:382-389 | network-protection/network-protection-impl/src/main/java/com/duckduckgo/networkprotection/impl/management/VpnExcludeAppPromptDialogBuilder.kt:196-203 — 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) app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/apps/ui/ManuallyDisableAppProtectionDialog.kt:124— app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/apps/ui/ManuallyDisableAppProtectionDialog.kt:124-131 | network-protection/network-protection-impl/src/main/java/com/duckduckgo/networkprotection/impl/exclusion/ui/ManuallyDisableAppProtectionDialog.kt:121-128 — before extracting anything, compare `app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/apps/ui/ManuallyDisableAppProtectionDialog.kt` and `network-protection/network-protection-impl/src/main/java/com/duckduckgo/networkprotection/impl/exclusion/ui/ManuallyDisableAppProtectionDialog.kt` as WHOLE FILES: 87% 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.
Duplicated block (8 lines × 2) app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/apps/ui/TrackingProtectionExclusionListActivity.kt:246— app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/apps/ui/TrackingProtectionExclusionListActivity.kt:246-253 | app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/ui/tracker_activity/AppTPCompanyTrackersActivity.kt:233-240 — 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) autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/gpm/webflow/ImportGooglePasswordsWebFlowFragment.kt:164— autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/gpm/webflow/ImportGooglePasswordsWebFlowFragment.kt:164-171 | autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/takeout/webflow/ImportGoogleBookmarksWebFlowFragment.kt:160-167 — before extracting anything, compare `autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/gpm/webflow/ImportGooglePasswordsWebFlowFragment.kt` and `autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/takeout/webflow/ImportGoogleBookmarksWebFlowFragment.kt` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 86 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 (8 lines × 2) duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/nativeinput/suggestions/ChatHistoryShortcutAdapter.kt:34— duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/nativeinput/suggestions/ChatHistoryShortcutAdapter.kt:34-41 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/nativeinput/suggestions/SectionDividerAdapter.kt:28-35 — before extracting anything, compare `duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/nativeinput/suggestions/ChatHistoryShortcutAdapter.kt` and `duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/nativeinput/suggestions/SectionDividerAdapter.kt` as WHOLE FILES: 82% 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 (8 lines × 2) duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/nativeinput/views/ModelPickerView.kt:292— duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/nativeinput/views/ModelPickerView.kt:292-299 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/nativeinput/views/ReasoningModePickerView.kt:152-159 — 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) lint-rules/src/main/java/com/duckduckgo/lint/ui/DaxSecureTextFieldTrailingIconDetector.kt:67— lint-rules/src/main/java/com/duckduckgo/lint/ui/DaxSecureTextFieldTrailingIconDetector.kt:67-74 | lint-rules/src/main/java/com/duckduckgo/lint/ui/DaxTextFieldTrailingIconDetector.kt:67-74 — before extracting anything, compare `lint-rules/src/main/java/com/duckduckgo/lint/ui/DaxSecureTextFieldTrailingIconDetector.kt` and `lint-rules/src/main/java/com/duckduckgo/lint/ui/DaxTextFieldTrailingIconDetector.kt` as WHOLE FILES: 82% 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 3 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. 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 (8 lines × 2) pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/email/PirEmailConfirmation.kt:111— pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/email/PirEmailConfirmation.kt:111-118 | pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/scan/PirScan.kt:173-183 — 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 `pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/scan/PirScan.kt:173` 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 before the matched lines, `pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/scan/PirScan.kt:169` calls `completeScan` and `pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/email/PirEmailConfirmation.kt:107` 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) sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/SyncServiceRemote.kt:484— sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/SyncServiceRemote.kt:484-491 | sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/SyncServiceRemote.kt:508-515 — 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 `sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/SyncServiceRemote.kt:484` 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) android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/dialogs/DialogsFragment.kt:572— android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/dialogs/DialogsFragment.kt:572-583 | android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/dialogs/DialogsFragment.kt:621-632 — 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 `android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/dialogs/DialogsFragment.kt:572` 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, `android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/dialogs/DialogsFragment.kt:633` calls `setDestructiveButtons` and `android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/dialogs/DialogsFragment.kt:584` 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.
Duplicated block (12 lines × 2) android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/DaxDialog.kt:81— android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/DaxDialog.kt:81-92 | android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/LottieDaxDialog.kt:72-83 — 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) android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/TypeAnimationTextView.kt:80— android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/TypeAnimationTextView.kt:80-91 | app/src/main/java/com/duckduckgo/app/onboarding/ui/view/DaxTypeAnimationTextView.kt:99-110 — before extracting anything, compare `android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/TypeAnimationTextView.kt` and `app/src/main/java/com/duckduckgo/app/onboarding/ui/view/DaxTypeAnimationTextView.kt` as WHOLE FILES: 92% 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. 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) app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/ui/tracker_activity/AppTPCompanyTrackersActivity.kt:158— app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/ui/tracker_activity/AppTPCompanyTrackersActivity.kt:158-169 | sync/sync-internal/src/main/java/com/duckduckgo/sync/internal/ui/SyncInternalSettingsActivity.kt:215-226 — 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 (12 lines × 2) app/src/main/java/com/duckduckgo/app/browser/filechooser/capture/MediaCaptureResultHandler.kt:53— app/src/main/java/com/duckduckgo/app/browser/filechooser/capture/MediaCaptureResultHandler.kt:53-64 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/filechooser/capture/MediaCaptureResultHandler.kt:53-64 — before extracting anything, compare `app/src/main/java/com/duckduckgo/app/browser/filechooser/capture/MediaCaptureResultHandler.kt` and `duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/filechooser/capture/MediaCaptureResultHandler.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 44 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. 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) app/src/main/java/com/duckduckgo/app/global/view/SingleTabFireDialogViewModel.kt:171— app/src/main/java/com/duckduckgo/app/global/view/SingleTabFireDialogViewModel.kt:171-182 | app/src/main/java/com/duckduckgo/app/global/view/SingleTabFireDialogViewModel.kt:208-219 — 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 `app/src/main/java/com/duckduckgo/app/global/view/SingleTabFireDialogViewModel.kt:171` 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) autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/gpm/webflow/ImportGooglePasswordsWebFlowFragment.kt:191— autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/gpm/webflow/ImportGooglePasswordsWebFlowFragment.kt:191-202 | autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/takeout/webflow/ImportGoogleBookmarksWebFlowFragment.kt:187-198 — before extracting anything, compare `autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/gpm/webflow/ImportGooglePasswordsWebFlowFragment.kt` and `autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/takeout/webflow/ImportGoogleBookmarksWebFlowFragment.kt` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 86 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 `autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/gpm/webflow/ImportGooglePasswordsWebFlowFragment.kt:191` 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: `InjectCredentialsFromReauth` names `com.duckduckgo.autofill.impl.importing.gpm.webflow.ImportGooglePasswordsWebFlowViewModel.Command.InjectCredentialsFromReauth` in one and `com.duckduckgo.autofill.impl.importing.takeout.webflow.ImportGoogleBookmarksWebFlowViewModel.Command.InjectCredentialsFromReauth` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (12 lines × 2) autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/sync/CredentialsSync.kt:102— autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/sync/CredentialsSync.kt:102-113 | autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/sync/CredentialsSync.kt:128-139 — 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) browser/browser-ui/src/main/java/com/duckduckgo/browser/ui/browsermenu/BrowserMenuBottomSheet.kt:336— browser/browser-ui/src/main/java/com/duckduckgo/browser/ui/browsermenu/BrowserMenuBottomSheet.kt:336-347 | browser/browser-ui/src/main/java/com/duckduckgo/browser/ui/browsermenu/BrowserMenuBottomSheet.kt:427-438 — 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `viewState` to `BrowserMenuViewState.Browser` in one and `BrowserMenuViewState.CustomTabs` 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 (12 lines × 2) content-scope-scripts/content-scope-scripts-impl/src/main/java/com/duckduckgo/contentscopescripts/impl/messaging/ContentScopeScriptsWebMessagingPlugin.kt:92— content-scope-scripts/content-scope-scripts-impl/src/main/java/com/duckduckgo/contentscopescripts/impl/messaging/ContentScopeScriptsWebMessagingPlugin.kt:92-103 | content-scope-scripts/content-scope-scripts-impl/src/main/java/com/duckduckgo/contentscopescripts/impl/messaging/ContentScopeScriptsWebMessagingPlugin.kt:112-124 — 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 `content-scope-scripts/content-scope-scripts-impl/src/main/java/com/duckduckgo/contentscopescripts/impl/messaging/ContentScopeScriptsWebMessagingPlugin.kt:92` 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) duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/pixel/DuckAiNewChatMetricPixelsPlugin.kt:35— duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/pixel/DuckAiNewChatMetricPixelsPlugin.kt:35-46 | feature-toggles/feature-toggles-impl/src/main/java/com/duckduckgo/feature/toggles/impl/metrics/DuckAiPromptSentMetricPixelsPlugin.kt:35-46 — before extracting anything, compare `duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/pixel/DuckAiNewChatMetricPixelsPlugin.kt` and `feature-toggles/feature-toggles-impl/src/main/java/com/duckduckgo/feature/toggles/impl/metrics/DuckAiPromptSentMetricPixelsPlugin.kt` as WHOLE FILES: 86% 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. 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 `duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/pixel/DuckAiNewChatMetricPixelsPlugin.kt:35` 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) pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/onboarding/SubscriptionOnboardingPirStepActivity.kt:55— pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/onboarding/SubscriptionOnboardingPirStepActivity.kt:55-66 | subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/onboarding/features/SubscriptionOnboardingFeatureInfoActivity.kt:69-80 — 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. Note first that the copies are not typed on the same thing: `R` names `com.duckduckgo.pir.impl.R` in one and `com.duckduckgo.subscriptions.impl.R` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (12 lines × 2) autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/email/remoteconfig/EmailProtectionInContextFeatureRepository.kt:60— autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/email/remoteconfig/EmailProtectionInContextFeatureRepository.kt:60-71 | autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/reporting/remoteconfig/AutofillSiteBreakageReportingFeatureRepository.kt:59-70 — 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) autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/SecureStoreBackedAutofillStore.kt:429— autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/SecureStoreBackedAutofillStore.kt:429-440 | autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/service/AutofillProviderChooseViewModel.kt:99-110 — 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 (12 lines × 2) lint-rules/src/main/java/com/duckduckgo/lint/ui/DaxSecureTextFieldTrailingIconDetector.kt:54— lint-rules/src/main/java/com/duckduckgo/lint/ui/DaxSecureTextFieldTrailingIconDetector.kt:54-65 | lint-rules/src/main/java/com/duckduckgo/lint/ui/DaxTextFieldTrailingIconDetector.kt:54-65 — before extracting anything, compare `lint-rules/src/main/java/com/duckduckgo/lint/ui/DaxSecureTextFieldTrailingIconDetector.kt` and `lint-rules/src/main/java/com/duckduckgo/lint/ui/DaxTextFieldTrailingIconDetector.kt` as WHOLE FILES: 82% 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 3 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 (12 lines × 2) macos/macos-impl/src/main/java/com/duckduckgo/macos/impl/MacOsActivity.kt:63— macos/macos-impl/src/main/java/com/duckduckgo/macos/impl/MacOsActivity.kt:63-74 | windows/windows-impl/src/main/java/com/duckduckgo/windows/impl/ui/WindowsActivity.kt:64-75 — 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) sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/promotion/bookmarks/SyncBookmarksPromotion.kt:91— sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/promotion/bookmarks/SyncBookmarksPromotion.kt:91-102 | sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/promotion/passwords/SyncPasswordsPromotion.kt:94-105 — 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) app/src/main/java/com/duckduckgo/app/onboarding/orchestrator/NewUserOnboardingPlanProvider.kt:747— app/src/main/java/com/duckduckgo/app/onboarding/orchestrator/NewUserOnboardingPlanProvider.kt:747-760 | app/src/main/java/com/duckduckgo/app/onboarding/orchestrator/NewUserOnboardingPlanProvider.kt:773-784 — 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 `app/src/main/java/com/duckduckgo/app/onboarding/orchestrator/NewUserOnboardingPlanProvider.kt:747` 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) app/src/main/java/com/duckduckgo/app/browser/tabs/adapter/FragmentStateAdapter.java:511— app/src/main/java/com/duckduckgo/app/browser/tabs/adapter/FragmentStateAdapter.java:511-522 | app/src/main/java/com/duckduckgo/app/browser/tabs/adapter/FragmentStateAdapter.java:551-562 — 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) android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/compose/dialog/DaxRadioOptions.kt:112— android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/compose/dialog/DaxRadioOptions.kt:112-122 | android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/compose/dialog/DaxRadioOptions.kt:143-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 `android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/compose/dialog/DaxRadioOptions.kt:112` 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) app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/apps/ui/ExclusionListAdapter.kt:254— app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/apps/ui/ExclusionListAdapter.kt:254-264 | app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/apps/ui/TrackingProtectionAppsAdapter.kt:133-143 — before extracting anything, compare `app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/apps/ui/ExclusionListAdapter.kt` and `app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/apps/ui/TrackingProtectionAppsAdapter.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 65 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 `app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/apps/ui/ExclusionListAdapter.kt:254` 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) app/src/main/java/com/duckduckgo/app/browser/BrowserActivity.kt:951— app/src/main/java/com/duckduckgo/app/browser/BrowserActivity.kt:951-961 | app/src/main/java/com/duckduckgo/app/browser/customtabs/CustomTabActivity.kt:79-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 (11 lines × 2) app/src/main/java/com/duckduckgo/app/browser/BrowserTabFragment.kt:1415— app/src/main/java/com/duckduckgo/app/browser/BrowserTabFragment.kt:1415-1425 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/contextual/DuckChatContextualWebViewViewModel.kt:535-545 — 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 `app/src/main/java/com/duckduckgo/app/browser/BrowserTabFragment.kt:1415` 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 `null` to `true) if (modelId !=` in one and `true) if (resolvedModelId !=` 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) app/src/main/java/com/duckduckgo/app/browser/WebNavigationState.kt:120— app/src/main/java/com/duckduckgo/app/browser/WebNavigationState.kt:120-130 | app/src/main/java/com/duckduckgo/app/browser/WebNavigationState.kt:198-208 — 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 `app/src/main/java/com/duckduckgo/app/browser/WebNavigationState.kt:120` 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.
Duplicated block (11 lines × 2) autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/ui/credential/management/viewing/DuckAddressStatusChangeConfirmer.kt:55— autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/ui/credential/management/viewing/DuckAddressStatusChangeConfirmer.kt:55-65 | autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/ui/credential/management/viewing/DuckAddressStatusChangeConfirmer.kt:77-87 — 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 `autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/ui/credential/management/viewing/DuckAddressStatusChangeConfirmer.kt:55` 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) codegen/codegen-ksp/src/main/java/com/duckduckgo/codegen/ksp/ContributesActivePluginPointProcessor.kt:263— codegen/codegen-ksp/src/main/java/com/duckduckgo/codegen/ksp/ContributesActivePluginPointProcessor.kt:263-273 | codegen/codegen-ksp/src/main/java/com/duckduckgo/codegen/ksp/ContributesActivePluginPointProcessor.kt:531-541 — 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 (11 lines × 2) data-store/data-store-impl/src/main/java/com/duckduckgo/data/store/impl/SharedPreferencesProviderImpl.kt:224— data-store/data-store-impl/src/main/java/com/duckduckgo/data/store/impl/SharedPreferencesProviderImpl.kt:224-234 | data-store/data-store-impl/src/main/java/com/duckduckgo/data/store/impl/SharedPreferencesProviderImpl.kt: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 `data-store/data-store-impl/src/main/java/com/duckduckgo/data/store/impl/SharedPreferencesProviderImpl.kt:224` 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) duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/clearing/RealDuckChatDeleter.kt:134— duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/clearing/RealDuckChatDeleter.kt:134-144 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/nativeinput/suggestions/reader/ChatSuggestionsReader.kt:110-120 — 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 (11 lines × 2) pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/scan/PirScan.kt:213— pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/scan/PirScan.kt:213-223 | pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/scan/PirScan.kt:335-345 — 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) remote-messaging/remote-messaging-impl/src/main/java/com/duckduckgo/remote/messaging/impl/modal/cardslist/CardsListRemoteMessageView.kt:229— remote-messaging/remote-messaging-impl/src/main/java/com/duckduckgo/remote/messaging/impl/modal/cardslist/CardsListRemoteMessageView.kt:229-239 | remote-messaging/remote-messaging-impl/src/main/java/com/duckduckgo/remote/messaging/impl/newtab/RemoteMessageView.kt:199-209 — 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 (11 lines × 2) saved-sites/saved-sites-impl/src/main/java/com/duckduckgo/savedsites/impl/FavoritesDelegate.kt:134— saved-sites/saved-sites-impl/src/main/java/com/duckduckgo/savedsites/impl/FavoritesDelegate.kt:134-144 | saved-sites/saved-sites-impl/src/main/java/com/duckduckgo/savedsites/impl/sync/RealSyncSavedSitesRepository.kt:83-93 — 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 `saved-sites/saved-sites-impl/src/main/java/com/duckduckgo/savedsites/impl/FavoritesDelegate.kt:134` 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) pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/onboarding/PirFeatureInfoListItemView.kt:50— pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/onboarding/PirFeatureInfoListItemView.kt:50-60 | subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/onboarding/features/FeatureInfoListItemView.kt:50-60 — 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 (11 lines × 2) app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/apps/ui/ManuallyDisableAppProtectionDialog.kt:95— app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/apps/ui/ManuallyDisableAppProtectionDialog.kt:95-105 | network-protection/network-protection-impl/src/main/java/com/duckduckgo/networkprotection/impl/exclusion/ui/ManuallyDisableAppProtectionDialog.kt:94-104 — before extracting anything, compare `app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/apps/ui/ManuallyDisableAppProtectionDialog.kt` and `network-protection/network-protection-impl/src/main/java/com/duckduckgo/networkprotection/impl/exclusion/ui/ManuallyDisableAppProtectionDialog.kt` as WHOLE FILES: 87% 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 `app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/apps/ui/ManuallyDisableAppProtectionDialog.kt:95` 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, `app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/apps/ui/ManuallyDisableAppProtectionDialog.kt:108` calls `IllegalArgumentException` and `network-protection/network-protection-impl/src/main/java/com/duckduckgo/networkprotection/impl/exclusion/ui/ManuallyDisableAppProtectionDialog.kt:107` 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 (11 lines × 2) app/src/main/java/com/duckduckgo/app/browser/filechooser/capture/postprocess/MediaCaptureDelayedDeleter.kt:37— app/src/main/java/com/duckduckgo/app/browser/filechooser/capture/postprocess/MediaCaptureDelayedDeleter.kt:37-47 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/filechooser/capture/postprocess/MediaCaptureDelayedDeleter.kt:37-47 — before extracting anything, compare `app/src/main/java/com/duckduckgo/app/browser/filechooser/capture/postprocess/MediaCaptureDelayedDeleter.kt` and `duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/filechooser/capture/postprocess/MediaCaptureDelayedDeleter.kt` as WHOLE FILES: 87% 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. 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 (11 lines × 2) desktop-app-promotion/desktop-app-promotion-impl/src/main/java/com/duckduckgo/desktopapppromotion/impl/DesktopAppPromotionActivity.kt:103— desktop-app-promotion/desktop-app-promotion-impl/src/main/java/com/duckduckgo/desktopapppromotion/impl/DesktopAppPromotionActivity.kt:103-113 | remote-messaging/remote-messaging-impl/src/main/java/com/duckduckgo/remote/messaging/impl/modal/ModalSurfaceActivity.kt:78-88 — 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 (11 lines × 2) duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/clearing/DuckChatDeleterJsMessaging.kt:92— duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/clearing/DuckChatDeleterJsMessaging.kt:92-102 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/nativeinput/suggestions/reader/ChatSuggestionsJsMessaging.kt:88-98 — before extracting anything, compare `duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/clearing/DuckChatDeleterJsMessaging.kt` and `duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/nativeinput/suggestions/reader/ChatSuggestionsJsMessaging.kt` as WHOLE FILES: this scan already matched 4 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.
Duplicated block (11 lines × 2) sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/ui/devices/EditDeviceActivity.kt:115— sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/ui/devices/EditDeviceActivity.kt:115-125 | sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/ui/recoverycode/RecoveryCodeActivity.kt:99-109 — 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 (11 lines × 2) android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/dialogs/DialogsFragment.kt:691— android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/dialogs/DialogsFragment.kt:691-701 | android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/dialogs/DialogsFragment.kt:745-757 — 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 `android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/dialogs/DialogsFragment.kt:691` 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) ad-click/ad-click-impl/src/main/java/com/duckduckgo/adclick/impl/metrics/AdClickAttributedMetric.kt:162— ad-click/ad-click-impl/src/main/java/com/duckduckgo/adclick/impl/metrics/AdClickAttributedMetric.kt:162-170 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/metric/DuckAiAttributedMetric.kt:155-163 — before extracting anything, compare `ad-click/ad-click-impl/src/main/java/com/duckduckgo/adclick/impl/metrics/AdClickAttributedMetric.kt` and `duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/metric/DuckAiAttributedMetric.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 59 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. 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) app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/pixels/DeviceShieldPixels.kt:998— app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/pixels/DeviceShieldPixels.kt:998-1006 | app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/pixels/DeviceShieldPixels.kt:1037-1045 — 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 `app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/pixels/DeviceShieldPixels.kt:998` 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) app/src/main/java/com/duckduckgo/app/browser/defaultbrowsing/prompts/ui/DefaultBrowserBottomSheetDialog.kt:89— app/src/main/java/com/duckduckgo/app/browser/defaultbrowsing/prompts/ui/DefaultBrowserBottomSheetDialog.kt:89-97 | app/src/main/java/com/duckduckgo/app/cta/ui/PrivacyProSkippedOnboardingBottomSheetDialog.kt:91-99 — 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 `app/src/main/java/com/duckduckgo/app/browser/defaultbrowsing/prompts/ui/DefaultBrowserBottomSheetDialog.kt:89` 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) app/src/main/java/com/duckduckgo/app/trackerdetection/TrackerDetectorImpl.kt:82— app/src/main/java/com/duckduckgo/app/trackerdetection/TrackerDetectorImpl.kt:82-90 | app/src/main/java/com/duckduckgo/app/trackerdetection/TrackerDetectorImpl.kt:107-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 `app/src/main/java/com/duckduckgo/app/trackerdetection/TrackerDetectorImpl.kt:82` 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 (9 lines × 2) network-protection/network-protection-impl/src/main/java/com/duckduckgo/networkprotection/impl/notification/NetPDisabledNotificationBuilder.kt:94— network-protection/network-protection-impl/src/main/java/com/duckduckgo/networkprotection/impl/notification/NetPDisabledNotificationBuilder.kt:94-102 | network-protection/network-protection-impl/src/main/java/com/duckduckgo/networkprotection/impl/notification/NetPDisabledNotificationBuilder.kt:153-161 — 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 `network-protection/network-protection-impl/src/main/java/com/duckduckgo/networkprotection/impl/notification/NetPDisabledNotificationBuilder.kt:94` 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 (9 lines × 2) pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/wideevents/PirInitialScanCompletionWideEvent.kt:125— pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/wideevents/PirInitialScanCompletionWideEvent.kt:125-133 | pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/wideevents/PirScanWideEvent.kt:395-403 — 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, `pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/wideevents/PirScanWideEvent.kt:405` calls `toString` and `pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/wideevents/PirInitialScanCompletionWideEvent.kt:134` 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 (9 lines × 2) ad-blocking/ad-blocking-impl/src/main/java/com/duckduckgo/adblocking/impl/duckplayer/DuckPlayerScriptsJsMessaging.kt:85— ad-blocking/ad-blocking-impl/src/main/java/com/duckduckgo/adblocking/impl/duckplayer/DuckPlayerScriptsJsMessaging.kt:85-93 | subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/messaging/SubscriptionMessagingInterface.kt:107-115 — before extracting anything, compare `ad-blocking/ad-blocking-impl/src/main/java/com/duckduckgo/adblocking/impl/duckplayer/DuckPlayerScriptsJsMessaging.kt` and `subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/messaging/SubscriptionMessagingInterface.kt` as WHOLE FILES: this scan already matched 4 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. 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 (9 lines × 2) android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/listitem/DaxListItem.kt:233— android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/listitem/DaxListItem.kt:233-241 | network-protection/network-protection-impl/src/main/java/com/duckduckgo/networkprotection/impl/management/VpnToggle.kt:67-75 — 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) app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/apps/ui/ExclusionListAdapter.kt:288— app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/apps/ui/ExclusionListAdapter.kt:288-296 | app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/apps/ui/TrackingProtectionAppsAdapter.kt:167-175 — before extracting anything, compare `app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/apps/ui/ExclusionListAdapter.kt` and `app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/apps/ui/TrackingProtectionAppsAdapter.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 65 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 `app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/apps/ui/ExclusionListAdapter.kt:288` 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 (9 lines × 2) app/src/main/java/com/duckduckgo/app/browser/filechooser/capture/permission/RealExternalMediaSystemPermissionsHelper.kt:72— app/src/main/java/com/duckduckgo/app/browser/filechooser/capture/permission/RealExternalMediaSystemPermissionsHelper.kt:72-80 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/filechooser/capture/permission/RealExternalMediaSystemPermissionsHelper.kt:72-80 — before extracting anything, compare `app/src/main/java/com/duckduckgo/app/browser/filechooser/capture/permission/RealExternalMediaSystemPermissionsHelper.kt` and `duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/filechooser/capture/permission/RealExternalMediaSystemPermissionsHelper.kt` as WHOLE FILES: 92% 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.
Duplicated block (9 lines × 2) app/src/main/java/com/duckduckgo/app/browser/webview/WebViewActivity.kt:127— app/src/main/java/com/duckduckgo/app/browser/webview/WebViewActivity.kt:127-135 | subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/ui/SubscriptionsWebViewActivity.kt:780-788 — 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) app/src/main/java/com/duckduckgo/app/systemsearch/SystemSearchViewModel.kt:525— app/src/main/java/com/duckduckgo/app/systemsearch/SystemSearchViewModel.kt:525-533 | saved-sites/saved-sites-impl/src/main/java/com/duckduckgo/savedsites/impl/newtab/FavouritesNewTabSectionViewModel.kt:219-227 — 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) autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/gpm/webflow/ImportGooglePasswordsWebFlowFragment.kt:443— autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/gpm/webflow/ImportGooglePasswordsWebFlowFragment.kt:443-451 | autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/takeout/webflow/ImportGoogleBookmarksWebFlowFragment.kt:522-530 — before extracting anything, compare `autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/gpm/webflow/ImportGooglePasswordsWebFlowFragment.kt` and `autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/takeout/webflow/ImportGoogleBookmarksWebFlowFragment.kt` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 86 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 `autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/gpm/webflow/ImportGooglePasswordsWebFlowFragment.kt:443` 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 (9 lines × 2) autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/ui/credential/management/AutofillClipboardInteractor.kt:53— autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/ui/credential/management/AutofillClipboardInteractor.kt:53-61 | autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/ui/credential/passwordgeneration/AutofillUseGeneratedPasswordDialogFragment.kt:142-150 — 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 (9 lines × 2) lint-rules/src/main/java/com/duckduckgo/lint/ui/DaxSecureTextFieldTrailingIconDetector.kt:76— lint-rules/src/main/java/com/duckduckgo/lint/ui/DaxSecureTextFieldTrailingIconDetector.kt:76-84 | lint-rules/src/main/java/com/duckduckgo/lint/ui/DaxTextFieldTrailingIconDetector.kt:76-84 — before extracting anything, compare `lint-rules/src/main/java/com/duckduckgo/lint/ui/DaxSecureTextFieldTrailingIconDetector.kt` and `lint-rules/src/main/java/com/duckduckgo/lint/ui/DaxTextFieldTrailingIconDetector.kt` as WHOLE FILES: 82% 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 3 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 (9 lines × 2) pir/pir-internal/src/main/java/com/duckduckgo/pir/internal/settings/PirDevOptOutActivity.kt:71— pir/pir-internal/src/main/java/com/duckduckgo/pir/internal/settings/PirDevOptOutActivity.kt:71-79 | pir/pir-internal/src/main/java/com/duckduckgo/pir/internal/settings/PirDevScanActivity.kt:105-113 — 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) duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/messaging/DuckChatContentScopeJsMessageHandler.kt:40— duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/messaging/DuckChatContentScopeJsMessageHandler.kt:40-50 | subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/messaging/SubscriptionsContentScopeJsMessageHandler.kt:37-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 `duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/messaging/DuckChatContentScopeJsMessageHandler.kt:40` 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 (9 lines × 2) autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/store/keys/SecureStorageKeyStore.kt:262— autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/store/keys/SecureStorageKeyStore.kt:262-270 | autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/store/keys/SecureStorageKeyStore.kt:288-296 — 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 `autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/store/keys/SecureStorageKeyStore.kt:262` 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) macrobenchmark/src/main/java/com/duckduckgo/macrobenchmark/PageLoadFixtures.kt:115— macrobenchmark/src/main/java/com/duckduckgo/macrobenchmark/PageLoadFixtures.kt:115-123 | macrobenchmark/src/main/java/com/duckduckgo/macrobenchmark/PageLoadFixtures.kt:191-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.
Duplicated block (7 lines × 2) ad-blocking/ad-blocking-impl/src/main/java/com/duckduckgo/adblocking/impl/duckplayer/messaging/DuckPlayerContentScopeJsMessageHandler.kt:33— ad-blocking/ad-blocking-impl/src/main/java/com/duckduckgo/adblocking/impl/duckplayer/messaging/DuckPlayerContentScopeJsMessageHandler.kt:33-39 | subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/messaging/SubscriptionsContentScopeJsMessageHandler.kt:35-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 `ad-blocking/ad-blocking-impl/src/main/java/com/duckduckgo/adblocking/impl/duckplayer/messaging/DuckPlayerContentScopeJsMessageHandler.kt:33` 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) app/src/main/java/com/duckduckgo/app/accessibility/AccessibilityActivity.kt:117— app/src/main/java/com/duckduckgo/app/accessibility/AccessibilityActivity.kt:117-123 | app/src/main/java/com/duckduckgo/app/appearance/AppearanceActivity.kt:332-338 — 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 `app/src/main/java/com/duckduckgo/app/accessibility/AccessibilityActivity.kt:117` 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) app/src/main/java/com/duckduckgo/app/onboardingquicksetup/ui/BrandDesignAddressBarPositionPicker.kt:147— app/src/main/java/com/duckduckgo/app/onboardingquicksetup/ui/BrandDesignAddressBarPositionPicker.kt:147-153 | app/src/main/java/com/duckduckgo/app/onboardingquicksetup/ui/BrandDesignInputScreenPicker.kt:211-217 — 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 `app/src/main/java/com/duckduckgo/app/onboardingquicksetup/ui/BrandDesignAddressBarPositionPicker.kt:147` 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 `back` to `ImageView` in one and `View` 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 (7 lines × 2) app/src/main/java/com/duckduckgo/app/settings/GetDesktopBrowserCompleteSetupSettings.kt:131— app/src/main/java/com/duckduckgo/app/settings/GetDesktopBrowserCompleteSetupSettings.kt:131-138 | autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/settings/ImportGooglePasswordMainAppSettings.kt:120-126 — 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 `app/src/main/java/com/duckduckgo/app/settings/GetDesktopBrowserCompleteSetupSettings.kt:131` 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: `R` names `com.duckduckgo.app.browser.R` in one and `com.duckduckgo.autofill.impl.R` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (7 lines × 2) duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/settings/DuckChatSettingsActivity.kt:462— duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/settings/DuckChatSettingsActivity.kt:462-468 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/settings/DuckChatSettingsActivity.kt:503-509 — 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 `duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/settings/DuckChatSettingsActivity.kt:462` 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 (7 lines × 2) privacy-dashboard/privacy-dashboard-impl/src/main/java/com/duckduckgo/privacy/dashboard/impl/ui/PrivacyDashboardHybridViewModel.kt:444— privacy-dashboard/privacy-dashboard-impl/src/main/java/com/duckduckgo/privacy/dashboard/impl/ui/PrivacyDashboardHybridViewModel.kt:444-450 | privacy-dashboard/privacy-dashboard-impl/src/main/java/com/duckduckgo/privacy/dashboard/impl/ui/PrivacyDashboardHybridViewModel.kt:544-550 — 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 `privacy-dashboard/privacy-dashboard-impl/src/main/java/com/duckduckgo/privacy/dashboard/impl/ui/PrivacyDashboardHybridViewModel.kt:444` 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 (7 lines × 2) sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/ui/pairing/process/ProcessSyncCodeActivity.kt:139— sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/ui/pairing/process/ProcessSyncCodeActivity.kt:139-145 | sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/ui/pairing/show/DisplayQrCodeActivity.kt:145-151 — before extracting anything, compare `sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/ui/pairing/process/ProcessSyncCodeActivity.kt` and `sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/ui/pairing/show/DisplayQrCodeActivity.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 45 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 `sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/ui/pairing/process/ProcessSyncCodeActivity.kt:139` 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: `DialogType` names `com.duckduckgo.sync.impl.ui.pairing.process.ProcessSyncCodeViewModel.DialogType` in one and `com.duckduckgo.sync.impl.ui.pairing.show.DisplayQrCodeViewModel.DialogType` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (7 lines × 2) ad-blocking/ad-blocking-impl/src/main/java/com/duckduckgo/adblocking/impl/ContingencyMessageBottomSheetFragment.kt:43— ad-blocking/ad-blocking-impl/src/main/java/com/duckduckgo/adblocking/impl/ContingencyMessageBottomSheetFragment.kt:43-49 | sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/ui/dashboard/TurnOffSyncBottomSheetDialog.kt:65-71 — 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 (7 lines × 2) app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/apps/TrackingProtectionAppsRepository.kt:142— app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/apps/TrackingProtectionAppsRepository.kt:142-148 | app-tracking-protection/vpn-internal/src/main/java/com/duckduckgo/vpn/internal/feature/VpnInternalSettingsActivity.kt:187-193 — 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 (7 lines × 2) app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt:5679— app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt:5679-5685 | autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/blob/WebViewBlobDownloader.kt:105-111 — 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 `app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt:5679` 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 `locationHref` to `String? = null` in one and `String?` 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 (7 lines × 2) app/src/main/java/com/duckduckgo/app/browser/filechooser/FileChooserIntentBuilder.kt:31— app/src/main/java/com/duckduckgo/app/browser/filechooser/FileChooserIntentBuilder.kt:31-37 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/filechooser/FileChooserIntentBuilder.kt:30-36 — before extracting anything, compare `app/src/main/java/com/duckduckgo/app/browser/filechooser/FileChooserIntentBuilder.kt` and `duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/filechooser/FileChooserIntentBuilder.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 36 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 `app/src/main/java/com/duckduckgo/app/browser/filechooser/FileChooserIntentBuilder.kt:31` 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 (7 lines × 2) autoconsent/autoconsent-impl/src/main/java/com/duckduckgo/autoconsent/impl/prompt/CookiePopupOptInActivity.kt:100— autoconsent/autoconsent-impl/src/main/java/com/duckduckgo/autoconsent/impl/prompt/CookiePopupOptInActivity.kt:100-106 | dax-prompts/dax-prompts-impl/src/main/java/com/duckduckgo/daxprompts/impl/ui/DaxPromptBrowserComparisonActivity.kt:133-139 — 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. Note first that the copies are not typed on the same thing: `R` names `com.duckduckgo.autoconsent.impl.R` in one and `com.duckduckgo.daxprompts.impl.R` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (7 lines × 2) autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/gpm/webflow/ImportGooglePasswordsWebFlowFragment.kt:453— autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/gpm/webflow/ImportGooglePasswordsWebFlowFragment.kt:453-459 | autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/takeout/webflow/ImportGoogleBookmarksWebFlowFragment.kt:532-538 — before extracting anything, compare `autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/gpm/webflow/ImportGooglePasswordsWebFlowFragment.kt` and `autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/takeout/webflow/ImportGoogleBookmarksWebFlowFragment.kt` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 86 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 (7 lines × 2) lint-rules/src/main/java/com/duckduckgo/lint/ui/DaxDividerColorUsageDetector.kt:104— lint-rules/src/main/java/com/duckduckgo/lint/ui/DaxDividerColorUsageDetector.kt:104-110 | lint-rules/src/main/java/com/duckduckgo/lint/ui/DaxListItemColorUsageDetector.kt: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.
Duplicated block (7 lines × 2) lint-rules/src/main/java/com/duckduckgo/lint/ui/DaxListItemColorUsageDetector.kt:102— lint-rules/src/main/java/com/duckduckgo/lint/ui/DaxListItemColorUsageDetector.kt:102-108 | lint-rules/src/main/java/com/duckduckgo/lint/ui/DaxTextColorUsageDetector.kt:155-161 — 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) subscriptions/subscriptions-internal/src/main/java/com/duckduckgo/subscriptions/internal/settings/SwitchSubscriptionProductView.kt:135— subscriptions/subscriptions-internal/src/main/java/com/duckduckgo/subscriptions/internal/settings/SwitchSubscriptionProductView.kt:135-141 | subscriptions/subscriptions-internal/src/main/java/com/duckduckgo/subscriptions/internal/settings/SwitchSubscriptionView.kt:135-141 — before extracting anything, compare `subscriptions/subscriptions-internal/src/main/java/com/duckduckgo/subscriptions/internal/settings/SwitchSubscriptionProductView.kt` and `subscriptions/subscriptions-internal/src/main/java/com/duckduckgo/subscriptions/internal/settings/SwitchSubscriptionView.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 233 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) attributed-metrics/attributed-metrics-internal/src/main/java/com/duckduckgo/app/attributed/metrics/internal/ui/AttributedMetricsDevSettingsActivity.kt:149— attributed-metrics/attributed-metrics-internal/src/main/java/com/duckduckgo/app/attributed/metrics/internal/ui/AttributedMetricsDevSettingsActivity.kt:149-155 | attributed-metrics/attributed-metrics-internal/src/main/java/com/duckduckgo/app/attributed/metrics/internal/ui/AttributedMetricsDevSettingsActivity.kt:159-165 — 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) build-benchmarks/run-benchmark.py:181— build-benchmarks/run-benchmark.py:181-187 | build-benchmarks/run-benchmark.py:190-196 — 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 (10 lines × 2) ad-click/ad-click-impl/src/main/java/com/duckduckgo/adclick/impl/metrics/AdClickAttributedMetric.kt:108— ad-click/ad-click-impl/src/main/java/com/duckduckgo/adclick/impl/metrics/AdClickAttributedMetric.kt:108-117 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/metric/DuckAiAttributedMetric.kt:84-93 — before extracting anything, compare `ad-click/ad-click-impl/src/main/java/com/duckduckgo/adclick/impl/metrics/AdClickAttributedMetric.kt` and `duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/metric/DuckAiAttributedMetric.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 59 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. 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 (10 lines × 2) android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/dialogs/DialogsFragment.kt:840— android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/dialogs/DialogsFragment.kt:840-849 | android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/dialogs/DialogsFragment.kt:897-906 — 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 `android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/dialogs/DialogsFragment.kt:840` 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 lines × 2) app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt:5302— app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt:5302-5311 | app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt:5324-5333 — 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 `app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt:5302` 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, `app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt:5322` calls `suspend` and `app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt:5300` 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) app/src/main/java/com/duckduckgo/app/browser/webview/WebViewActivity.kt:83— app/src/main/java/com/duckduckgo/app/browser/webview/WebViewActivity.kt:83-92 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/contextual/DuckChatContextualWebViewFragment.kt:280-289 — 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 `app/src/main/java/com/duckduckgo/app/browser/webview/WebViewActivity.kt:83` 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) app/src/main/java/com/duckduckgo/widget/SearchAndFavoritesWidget.kt:293— app/src/main/java/com/duckduckgo/widget/SearchAndFavoritesWidget.kt:293-302 | app/src/main/java/com/duckduckgo/widget/SearchAndFavoritesWidget.kt:313-322 — 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 `app/src/main/java/com/duckduckgo/widget/SearchAndFavoritesWidget.kt:293` 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 (10 lines × 2) autofill/autofill-internal/src/main/java/com/duckduckgo/autofill/internal/AutofillInternalSettingsActivity.kt:703— autofill/autofill-internal/src/main/java/com/duckduckgo/autofill/internal/AutofillInternalSettingsActivity.kt:703-712 | saved-sites/saved-sites-internal/src/main/java/com/duckduckgo/savedsites/internal/SavedSitesInternalSettingsActivity.kt:208-217 — 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 (10 lines × 2) downloads/downloads-impl/src/main/java/com/duckduckgo/downloads/impl/RealDownloadsFileActions.kt:114— downloads/downloads-impl/src/main/java/com/duckduckgo/downloads/impl/RealDownloadsFileActions.kt:114-123 | sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/ShareAction.kt:54-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 `downloads/downloads-impl/src/main/java/com/duckduckgo/downloads/impl/RealDownloadsFileActions.kt:114` 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 (10 lines × 2) malicious-site-protection/malicious-site-protection-impl/src/main/kotlin/com/duckduckgo/malicioussiteprotection/impl/MaliciousSiteProtectionFiltersUpdateWorker.kt:136— malicious-site-protection/malicious-site-protection-impl/src/main/kotlin/com/duckduckgo/malicioussiteprotection/impl/MaliciousSiteProtectionFiltersUpdateWorker.kt:136-145 | malicious-site-protection/malicious-site-protection-impl/src/main/kotlin/com/duckduckgo/malicioussiteprotection/impl/MaliciousSiteProtectionHashPrefixesUpdateWorker.kt:135-144 — before extracting anything, compare `malicious-site-protection/malicious-site-protection-impl/src/main/kotlin/com/duckduckgo/malicioussiteprotection/impl/MaliciousSiteProtectionFiltersUpdateWorker.kt` and `malicious-site-protection/malicious-site-protection-impl/src/main/kotlin/com/duckduckgo/malicioussiteprotection/impl/MaliciousSiteProtectionHashPrefixesUpdateWorker.kt` as WHOLE FILES: 87% 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. 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 `malicious-site-protection/malicious-site-protection-impl/src/main/kotlin/com/duckduckgo/malicioussiteprotection/impl/MaliciousSiteProtectionFiltersUpdateWorker.kt:136` 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) pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/common/actions/BrokerActionFailedEventHandler.kt:133— pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/common/actions/BrokerActionFailedEventHandler.kt:133-142 | pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/common/actions/JsActionSuccessEventHandler.kt:255-264 — 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 `pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/common/actions/BrokerActionFailedEventHandler.kt:133` 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) subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/messaging/ItrMessagingInterface.kt:69— subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/messaging/ItrMessagingInterface.kt:69-78 | subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/messaging/SubscriptionMessagingInterface.kt:89-98 — 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 `subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/messaging/ItrMessagingInterface.kt:69` 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 lines × 2) ad-click/ad-click-impl/src/main/java/com/duckduckgo/adclick/impl/metrics/AdClickAttributedMetric.kt:150— ad-click/ad-click-impl/src/main/java/com/duckduckgo/adclick/impl/metrics/AdClickAttributedMetric.kt:150-159 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/metric/DuckAiAttributedMetric.kt:143-152 — before extracting anything, compare `ad-click/ad-click-impl/src/main/java/com/duckduckgo/adclick/impl/metrics/AdClickAttributedMetric.kt` and `duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/metric/DuckAiAttributedMetric.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 59 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. 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) android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/DaxDialog.kt:64— android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/DaxDialog.kt:64-73 | android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/LottieDaxDialog.kt:52-61 — 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.
Duplicated block (10 lines × 2) app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/apps/ui/ExclusionListAdapter.kt:298— app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/apps/ui/ExclusionListAdapter.kt:298-307 | app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/apps/ui/TrackingProtectionAppsAdapter.kt:177-186 — before extracting anything, compare `app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/apps/ui/ExclusionListAdapter.kt` and `app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/apps/ui/TrackingProtectionAppsAdapter.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 65 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 (10 lines × 2) app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/ui/newtab/AppTrackingProtectionNewTabSettingsViewModel.kt:49— app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/ui/newtab/AppTrackingProtectionNewTabSettingsViewModel.kt:49-58 | saved-sites/saved-sites-impl/src/main/java/com/duckduckgo/savedsites/impl/newtab/FavouritesNewTabSettingsViewModel.kt:50-59 — before extracting anything, compare `app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/ui/newtab/AppTrackingProtectionNewTabSettingsViewModel.kt` and `saved-sites/saved-sites-impl/src/main/java/com/duckduckgo/savedsites/impl/newtab/FavouritesNewTabSettingsViewModel.kt` as WHOLE FILES: 86% 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. 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 (10 lines × 2) ad-click/ad-click-impl/src/main/java/com/duckduckgo/adclick/impl/metrics/AdClickAttributedMetric.kt:90— ad-click/ad-click-impl/src/main/java/com/duckduckgo/adclick/impl/metrics/AdClickAttributedMetric.kt:90-99 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/metric/DuckAiAttributedMetric.kt:101-110 — before extracting anything, compare `ad-click/ad-click-impl/src/main/java/com/duckduckgo/adclick/impl/metrics/AdClickAttributedMetric.kt` and `duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/metric/DuckAiAttributedMetric.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 59 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 `ad-click/ad-click-impl/src/main/java/com/duckduckgo/adclick/impl/metrics/AdClickAttributedMetric.kt: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. 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) app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/feature/AppTpRemoteFeatures.kt:347— app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/feature/AppTpRemoteFeatures.kt:347-356 | app/src/main/java/com/duckduckgo/app/trackerdetection/blocklist/BlockList.kt:194-203 — 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 `app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/feature/AppTpRemoteFeatures.kt:347` 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.
Low cohesion: Builder (LCOM4 9) app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/ui/util/TextDrawable.kt:104— Builder'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: AutofillJsonResponseWriter (LCOM4 7) autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/jsbridge/response/AutofillResponseWriter.kt:39— AutofillJsonResponseWriter's methods fall into 7 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 7 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: Builder (LCOM4 7) android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/dialog/PromoBottomSheetDialog.kt:88— Builder's methods fall into 7 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 7 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: RealVpnNetwork (LCOM4 6) vpn-network/vpn-network-impl/src/main/java/com/duckduckgo/vpn/network/impl/RealVpnNetwork.kt:49— RealVpnNetwork's methods fall into 6 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 6 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: DownloadsViewModel (LCOM4 5) downloads/downloads-impl/src/main/java/com/duckduckgo/downloads/impl/DownloadsViewModel.kt:54— DownloadsViewModel's methods fall into 5 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 5 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: DuckDuckGoWebView (LCOM4 5) app/src/main/java/com/duckduckgo/app/browser/DuckDuckGoWebView.kt:68— DuckDuckGoWebView's methods fall into 5 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 5 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: TrackerBlockingVpnService (LCOM4 5) app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/service/TrackerBlockingVpnService.kt:93— TrackerBlockingVpnService's methods fall into 5 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 5 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: Builder (LCOM4 5) android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/dialog/ActionBottomSheetDialog.kt:91— Builder's methods fall into 5 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 5 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: RealSyncJweCrypto (LCOM4 4) sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/crypto/SyncJweCrypto.kt:110— RealSyncJweCrypto's methods fall into 4 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 4 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: CredentialListSorterByTitleAndDomain (LCOM4 4) autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/ui/credential/management/sorting/CredentialListSorterByTitleAndDomain.kt:34— CredentialListSorterByTitleAndDomain's methods fall into 4 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 4 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: OnboardingPreferenceCatalogImpl (LCOM4 4) app/src/main/java/com/duckduckgo/app/onboarding/OnboardingPreferenceCatalog.kt:58— OnboardingPreferenceCatalogImpl's methods fall into 4 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 4 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: TdsJson (LCOM4 4) app/src/main/java/com/duckduckgo/app/trackerdetection/api/TdsJson.kt:22— TdsJson's methods fall into 4 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 4 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: FakeAppTrackerRepository (LCOM4 4) app-tracking-protection/vpn-store-test/src/main/java/com/duckduckgo/mobile/android/vpn/trackers/FakeAppTrackerRepository.kt:22— FakeAppTrackerRepository's methods fall into 4 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 4 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: NgVpnNetworkStack (LCOM4 4) app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/integration/NgVpnNetworkStack.kt:61— NgVpnNetworkStack's methods fall into 4 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 4 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: DaxListItem (LCOM4 4) android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/listitem/DaxListItem.kt:43— DaxListItem's methods fall into 4 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 4 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: RadioListItem (LCOM4 4) android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/listitem/RadioListItem.kt:32— RadioListItem's methods fall into 4 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 4 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.
Duplicated block (6 lines × 2) ad-blocking/ad-blocking-impl/src/main/java/com/duckduckgo/adblocking/impl/duckplayer/RealDuckPlayer.kt:471— ad-blocking/ad-blocking-impl/src/main/java/com/duckduckgo/adblocking/impl/duckplayer/RealDuckPlayer.kt:471-476 | ad-blocking/ad-blocking-impl/src/main/java/com/duckduckgo/adblocking/impl/duckplayer/RealDuckPlayer.kt:498-503 — 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 `ad-blocking/ad-blocking-impl/src/main/java/com/duckduckgo/adblocking/impl/duckplayer/RealDuckPlayer.kt:471` 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 (6 lines × 2) app/src/main/java/com/duckduckgo/app/browser/WebViewRequestInterceptor.kt:154— app/src/main/java/com/duckduckgo/app/browser/WebViewRequestInterceptor.kt:154-159 | app/src/main/java/com/duckduckgo/app/browser/WebViewRequestInterceptor.kt:188-193 — 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 `app/src/main/java/com/duckduckgo/app/browser/WebViewRequestInterceptor.kt:154` 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 (6 lines × 2) app/src/main/java/com/duckduckgo/app/browser/filechooser/capture/launcher/UploadFromExternalMediaAppLauncher.kt:152— app/src/main/java/com/duckduckgo/app/browser/filechooser/capture/launcher/UploadFromExternalMediaAppLauncher.kt:152-157 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/filechooser/capture/launcher/UploadFromExternalMediaAppLauncher.kt:151-156 — before extracting anything, compare `app/src/main/java/com/duckduckgo/app/browser/filechooser/capture/launcher/UploadFromExternalMediaAppLauncher.kt` and `duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/filechooser/capture/launcher/UploadFromExternalMediaAppLauncher.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 73 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 `app/src/main/java/com/duckduckgo/app/browser/filechooser/capture/launcher/UploadFromExternalMediaAppLauncher.kt:152` 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: `MediaCaptureResult` names `com.duckduckgo.app.browser.filechooser.capture.launcher.UploadFromExternalMediaAppLauncher.MediaCaptureResult` in one and `com.duckduckgo.duckchat.impl.ui.filechooser.capture.launcher.UploadFromExternalMediaAppLauncher.MediaCaptureResult` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, 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) lint-rules/src/main/java/com/duckduckgo/lint/DenyListedApiDetector.kt:280— lint-rules/src/main/java/com/duckduckgo/lint/DenyListedApiDetector.kt:280-285 | lint-rules/src/main/java/com/duckduckgo/lint/DenyListedApiDetector.kt:293-298 — 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 `lint-rules/src/main/java/com/duckduckgo/lint/DenyListedApiDetector.kt:280` 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) pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/onboarding/PirPlatformIconsView.kt:62— pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/onboarding/PirPlatformIconsView.kt:62-67 | subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/onboarding/features/PlatformIconsView.kt:62-67 — 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 `pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/onboarding/PirPlatformIconsView.kt:62` 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) saved-sites/saved-sites-impl/src/main/java/com/duckduckgo/savedsites/impl/bookmarks/BookmarkScreenViewHolders.kt:91— saved-sites/saved-sites-impl/src/main/java/com/duckduckgo/savedsites/impl/bookmarks/BookmarkScreenViewHolders.kt:91-96 | saved-sites/saved-sites-impl/src/main/java/com/duckduckgo/savedsites/impl/bookmarks/BookmarkScreenViewHolders.kt:166-171 — 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 `saved-sites/saved-sites-impl/src/main/java/com/duckduckgo/savedsites/impl/bookmarks/BookmarkScreenViewHolders.kt:91` 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) ad-click/ad-click-impl/src/main/java/com/duckduckgo/adclick/impl/metrics/AdClickAttributedMetric.kt:123— ad-click/ad-click-impl/src/main/java/com/duckduckgo/adclick/impl/metrics/AdClickAttributedMetric.kt:123-128 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/metric/DuckAiAttributedMetric.kt:116-121 — before extracting anything, compare `ad-click/ad-click-impl/src/main/java/com/duckduckgo/adclick/impl/metrics/AdClickAttributedMetric.kt` and `duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/metric/DuckAiAttributedMetric.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 59 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 (6 lines × 2) app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt:2468— app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt:2468-2473 | saved-sites/saved-sites-impl/src/main/java/com/duckduckgo/savedsites/impl/newtab/FavouritesNewTabSectionViewModel.kt:180-185 — 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) autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/ui/credential/management/sorting/CredentialListSorterByTitleAndDomain.kt:132— autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/ui/credential/management/sorting/CredentialListSorterByTitleAndDomain.kt:132-137 | saved-sites/saved-sites-impl/src/main/java/com/duckduckgo/savedsites/impl/bookmarks/BookmarksNameSortingComparator.kt:59-64 — 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 `autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/ui/credential/management/sorting/CredentialListSorterByTitleAndDomain.kt:132` 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 (6 lines × 2) content-scope-scripts/content-scope-scripts-impl/src/main/java/com/duckduckgo/contentscopescripts/impl/messaging/ContentScopeScriptsJsMessaging.kt:398— content-scope-scripts/content-scope-scripts-impl/src/main/java/com/duckduckgo/contentscopescripts/impl/messaging/ContentScopeScriptsJsMessaging.kt:398-403 | subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/messaging/SubscriptionMessagingInterface.kt:134-139 — 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 `content-scope-scripts/content-scope-scripts-impl/src/main/java/com/duckduckgo/contentscopescripts/impl/messaging/ContentScopeScriptsJsMessaging.kt:398` 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 (6 lines × 2) duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/clearing/DuckChatDeleterJsMessaging.kt:58— duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/clearing/DuckChatDeleterJsMessaging.kt:58-63 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/nativeinput/suggestions/reader/ChatSuggestionsJsMessaging.kt:54-59 — before extracting anything, compare `duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/clearing/DuckChatDeleterJsMessaging.kt` and `duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/nativeinput/suggestions/reader/ChatSuggestionsJsMessaging.kt` as WHOLE FILES: this scan already matched 4 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.
Duplicated block (6 lines × 2) lint-rules/src/main/java/com/duckduckgo/lint/ui/DaxListItemColorUsageDetector.kt:110— lint-rules/src/main/java/com/duckduckgo/lint/ui/DaxListItemColorUsageDetector.kt:110-115 | lint-rules/src/main/java/com/duckduckgo/lint/ui/DaxTextColorUsageDetector.kt:163-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. 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) android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/component/ComponentViewHolder.kt:680— android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/component/ComponentViewHolder.kt:680-685 | android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/component/templates/TemplatesPane.kt:132-143 — 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 `android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/component/ComponentViewHolder.kt:680` 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 (6 lines × 2) pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/pixels/PirEngagementReporter.kt:96— pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/pixels/PirEngagementReporter.kt:96-101 | pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/pixels/PirInteractionReporter.kt:126-131 — 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) scripts/release/create-asana-internal-release.py:99— scripts/release/create-asana-internal-release.py:99-104 | scripts/release/create-asana-public-release.py:19-24 — before extracting anything, compare `scripts/release/create-asana-internal-release.py` and `scripts/release/create-asana-public-release.py` 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.
Duplicated block (14 lines × 2) android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/dialogs/DialogsFragment.kt:675— android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/dialogs/DialogsFragment.kt:675-688 | android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/dialogs/DialogsFragment.kt:729-742 — 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 `android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/dialogs/DialogsFragment.kt:675` 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 (14 lines × 2) app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/health/CPUUsageReaderImpl.kt:60— app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/health/CPUUsageReaderImpl.kt:60-73 | pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/callbacks/CPUUsageReader.kt:46-59 — 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 `app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/health/CPUUsageReaderImpl.kt:60` 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 (14 lines × 2) app/src/main/java/com/duckduckgo/app/browser/BrowserActivity.kt:576— app/src/main/java/com/duckduckgo/app/browser/BrowserActivity.kt:576-589 | app/src/main/java/com/duckduckgo/app/browser/BrowserActivity.kt:604-617 — 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 `app/src/main/java/com/duckduckgo/app/browser/BrowserActivity.kt:576` 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) app/src/main/java/com/duckduckgo/app/browser/favicon/FaviconPersister.kt:190— app/src/main/java/com/duckduckgo/app/browser/favicon/FaviconPersister.kt:190-203 | app/src/main/java/com/duckduckgo/app/browser/favicon/FaviconPersister.kt:220-233 — 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) app/src/main/java/com/duckduckgo/app/browser/filechooser/FileChooserIntentBuilder.kt:55— app/src/main/java/com/duckduckgo/app/browser/filechooser/FileChooserIntentBuilder.kt:55-68 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/filechooser/FileChooserIntentBuilder.kt:54-67 — before extracting anything, compare `app/src/main/java/com/duckduckgo/app/browser/filechooser/FileChooserIntentBuilder.kt` and `duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/filechooser/FileChooserIntentBuilder.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 36 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. 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 (14 lines × 2) app/src/main/java/com/duckduckgo/app/browser/newtab/NewTabPageView.kt:360— app/src/main/java/com/duckduckgo/app/browser/newtab/NewTabPageView.kt:360-373 | remote-messaging/remote-messaging-impl/src/main/java/com/duckduckgo/remote/messaging/impl/newtab/RemoteMessageView.kt:213-226 — 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) app/src/main/java/com/duckduckgo/app/browser/omnibar/BottomAppBarBehavior.kt:184— app/src/main/java/com/duckduckgo/app/browser/omnibar/BottomAppBarBehavior.kt:184-197 | app/src/main/java/com/duckduckgo/app/browser/omnibar/TopAppBarBehavior.kt:116-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. 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) app/src/main/java/com/duckduckgo/app/browser/webshare/WebShareChooser.kt:36— app/src/main/java/com/duckduckgo/app/browser/webshare/WebShareChooser.kt:36-49 | app/src/main/java/com/duckduckgo/app/browser/webshare/WebViewCompatWebShareChooser.kt:36-49 — 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 `app/src/main/java/com/duckduckgo/app/browser/webshare/WebShareChooser.kt: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. 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 (14 lines × 2) autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/InBrowserImportPromo.kt:84— autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/InBrowserImportPromo.kt:84-97 | autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/InSettingsPasswordImportPromoRules.kt:55-68 — 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 `autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/InBrowserImportPromo.kt:84` 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 (14 lines × 2) autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/gpm/webflow/ImportGooglePasswordsWebFlowFragment.kt:317— autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/gpm/webflow/ImportGooglePasswordsWebFlowFragment.kt:317-330 | autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/takeout/webflow/ImportGoogleBookmarksWebFlowFragment.kt:286-299 — before extracting anything, compare `autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/gpm/webflow/ImportGooglePasswordsWebFlowFragment.kt` and `autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/takeout/webflow/ImportGoogleBookmarksWebFlowFragment.kt` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 86 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 `autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/gpm/webflow/ImportGooglePasswordsWebFlowFragment.kt:317` 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 (14 lines × 2) autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/ui/credential/management/viewing/AutofillManagementCredentialsMode.kt:190— autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/ui/credential/management/viewing/AutofillManagementCredentialsMode.kt:190-203 | autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/ui/credential/management/viewing/AutofillManagementListMode.kt:580-593 — 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 `autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/ui/credential/management/viewing/AutofillManagementCredentialsMode.kt: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 (14 lines × 2) dax-prompts/dax-prompts-impl/src/main/java/com/duckduckgo/daxprompts/impl/ReEngagementPromptEvaluator.kt:76— dax-prompts/dax-prompts-impl/src/main/java/com/duckduckgo/daxprompts/impl/ReEngagementPromptEvaluator.kt:76-89 | dax-prompts/dax-prompts-impl/src/main/java/com/duckduckgo/daxprompts/impl/WinBackPromptEvaluator.kt:74-87 — 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 `dax-prompts/dax-prompts-impl/src/main/java/com/duckduckgo/daxprompts/impl/ReEngagementPromptEvaluator.kt:76` 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) sync/sync-internal/src/main/java/com/duckduckgo/sync/internal/ui/SyncInternalSettingsViewModel.kt:332— sync/sync-internal/src/main/java/com/duckduckgo/sync/internal/ui/SyncInternalSettingsViewModel.kt:332-345 | sync/sync-internal/src/main/java/com/duckduckgo/sync/internal/ui/SyncInternalSettingsViewModel.kt:348-361 — 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 (14 lines × 2) feature-toggles/feature-toggles-impl/src/main/java/com/duckduckgo/feature/toggles/impl/metrics/SearchMetricPixelsPlugin.kt:44— feature-toggles/feature-toggles-impl/src/main/java/com/duckduckgo/feature/toggles/impl/metrics/SearchMetricPixelsPlugin.kt:44-57 | feature-toggles/feature-toggles-impl/src/main/java/com/duckduckgo/feature/toggles/impl/metrics/SearchMetricPixelsPlugin.kt:64-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 `feature-toggles/feature-toggles-impl/src/main/java/com/duckduckgo/feature/toggles/impl/metrics/SearchMetricPixelsPlugin.kt:44` 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 (15 lines × 2) android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/dialogs/DialogsFragment.kt:529— android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/dialogs/DialogsFragment.kt:529-543 | android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/dialogs/DialogsFragment.kt:579-593 — 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 `android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/dialogs/DialogsFragment.kt:529` 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 (15 lines × 2) android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/compose/sheets/DaxActionBottomSheetDialog.kt:144— android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/compose/sheets/DaxActionBottomSheetDialog.kt:144-158 | android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/compose/sheets/DaxActionBottomSheetDialog.kt:200-214 — 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 `android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/compose/sheets/DaxActionBottomSheetDialog.kt:144` 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 (15 lines × 2) anrs/anrs-impl/src/main/java/com/duckduckgo/app/anr/ExceptionModels.kt:121— anrs/anrs-impl/src/main/java/com/duckduckgo/app/anr/ExceptionModels.kt:121-135 | pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/brokers/BrokerJsonUpdater.kt:174-188 — 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 `anrs/anrs-impl/src/main/java/com/duckduckgo/app/anr/ExceptionModels.kt:121` 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 (15 lines × 2) anrs/anrs-internal/src/main/java/com/duckduckgo/app/anr/internal/feature/CrashAnrDevActivity.kt:45— anrs/anrs-internal/src/main/java/com/duckduckgo/app/anr/internal/feature/CrashAnrDevActivity.kt:45-59 | duckchat/duckchat-internal/src/main/java/com/duckduckgo/duckchat/internal/DuckAiDevActivity.kt:41-55 — 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 `anrs/anrs-internal/src/main/java/com/duckduckgo/app/anr/internal/feature/CrashAnrDevActivity.kt: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.
Duplicated block (15 lines × 2) app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/blocklist/AppTPBlockListInterceptorApiPlugin.kt:81— app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/blocklist/AppTPBlockListInterceptorApiPlugin.kt:81-95 | app/src/main/java/com/duckduckgo/app/trackerdetection/blocklist/BlockListInterceptorApiPlugin.kt:69-83 — 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. Note first that the copies are not typed on the same thing: `CONTROL` names `com.duckduckgo.app.trackerdetection.blocklist.BlockList.Cohorts.CONTROL` in one and `com.duckduckgo.mobile.android.vpn.feature.AppTpRemoteFeatures.Cohorts.CONTROL` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (15 lines × 2) app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt:3041— app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt:3041-3055 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/contextual/DuckChatContextualWebViewFragment.kt:842-856 — 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 (15 lines × 2) app/src/main/java/com/duckduckgo/app/browser/filechooser/FileChooserIntentBuilder.kt:79— app/src/main/java/com/duckduckgo/app/browser/filechooser/FileChooserIntentBuilder.kt:79-93 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/filechooser/FileChooserIntentBuilder.kt:78-92 — before extracting anything, compare `app/src/main/java/com/duckduckgo/app/browser/filechooser/FileChooserIntentBuilder.kt` and `duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/filechooser/FileChooserIntentBuilder.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 36 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. 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 (15 lines × 2) app/src/main/java/com/duckduckgo/app/browser/filechooser/capture/MediaCaptureResultHandler.kt:36— app/src/main/java/com/duckduckgo/app/browser/filechooser/capture/MediaCaptureResultHandler.kt:36-50 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/filechooser/capture/MediaCaptureResultHandler.kt:36-50 — before extracting anything, compare `app/src/main/java/com/duckduckgo/app/browser/filechooser/capture/MediaCaptureResultHandler.kt` and `duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/filechooser/capture/MediaCaptureResultHandler.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 44 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. 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 (15 lines × 2) autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/sync/CredentialsSyncDataObserver.kt:59— autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/sync/CredentialsSyncDataObserver.kt:59-73 | sync/sync-settings-impl/src/main/java/com/duckduckgo/sync/settings/impl/SettingsSyncDataObserver.kt:59-73 — before extracting anything, compare `autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/sync/CredentialsSyncDataObserver.kt` and `sync/sync-settings-impl/src/main/java/com/duckduckgo/sync/settings/impl/SettingsSyncDataObserver.kt` as WHOLE FILES: 91% 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. 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. 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 (15 lines × 2) sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/RealSyncCrypto.kt:52— sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/RealSyncCrypto.kt:52-66 | sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/RealSyncCrypto.kt:86-100 — 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 (15 lines × 2) android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/dialog/BackKeyListener.kt:28— android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/dialog/BackKeyListener.kt:28-42 | app/src/main/java/com/duckduckgo/app/global/dialog/BackKeyListener.kt:28-42 — before extracting anything, compare `android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/dialog/BackKeyListener.kt` and `app/src/main/java/com/duckduckgo/app/global/dialog/BackKeyListener.kt` as WHOLE FILES: 91% 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. 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 `android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/dialog/BackKeyListener.kt:28` 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) scripts/release/create-asana-internal-release.py:108— scripts/release/create-asana-internal-release.py:108-122 | scripts/release/create-asana-public-release.py:30-44 — before extracting anything, compare `scripts/release/create-asana-internal-release.py` and `scripts/release/create-asana-public-release.py` 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. 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, `scripts/release/create-asana-public-release.py:27` calls `add_argument` and `scripts/release/create-asana-internal-release.py:106` 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 (5 lines × 2) app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt:2135— app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt:2135-2139 | app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt:2161-2165 — 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 `app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt:2135` 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) ad-click/ad-click-impl/src/main/java/com/duckduckgo/adclick/impl/DuckDuckGoAdClickManager.kt:130— ad-click/ad-click-impl/src/main/java/com/duckduckgo/adclick/impl/DuckDuckGoAdClickManager.kt:130-134 | privacy-dashboard/privacy-dashboard-impl/src/main/java/com/duckduckgo/privacy/dashboard/impl/ui/RequestDataViewStateMapper.kt:122-126 — 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 (5 lines × 2) android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/DaxDialog.kt:109— android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/DaxDialog.kt:109-113 | android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/LottieDaxDialog.kt:97-101 — 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) app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/apps/ui/ManageRecentAppsProtectionActivity.kt:290— app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/apps/ui/ManageRecentAppsProtectionActivity.kt:290-294 | app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/apps/ui/TrackingProtectionExclusionListActivity.kt:355-359 — 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) app/src/main/java/com/duckduckgo/app/accessibility/AccessibilityActivity.kt:93— app/src/main/java/com/duckduckgo/app/accessibility/AccessibilityActivity.kt:93-97 | app/src/main/java/com/duckduckgo/app/appearance/AppearanceActivity.kt:137-141 — 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 (5 lines × 2) autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/gpm/webflow/ImportGooglePasswordsWebFlowActivity.kt:60— autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/gpm/webflow/ImportGooglePasswordsWebFlowActivity.kt:60-64 | autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/takeout/webflow/ImportGoogleBookmarksWebFlowActivity.kt:78-82 — 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 (5 lines × 2) duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/nativeinput/views/ModelPickerView.kt:462— duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/nativeinput/views/ModelPickerView.kt:462-466 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/nativeinput/views/ReasoningModePickerView.kt:220-224 — 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) duckchat/duckchat-internal/src/main/java/com/duckduckgo/duckchat/internal/DuckAiUrlSettingsActivity.kt:72— duckchat/duckchat-internal/src/main/java/com/duckduckgo/duckchat/internal/DuckAiUrlSettingsActivity.kt:72-76 | duckchat/duckchat-internal/src/main/java/com/duckduckgo/duckchat/internal/DuckAiUsageWarningsDevActivity.kt:69-73 — 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) network-protection/network-protection-impl/src/main/java/com/duckduckgo/networkprotection/impl/settings/NetPVpnSettingsActivity.kt:88— network-protection/network-protection-impl/src/main/java/com/duckduckgo/networkprotection/impl/settings/NetPVpnSettingsActivity.kt:88-92 | network-protection/network-protection-impl/src/main/java/com/duckduckgo/networkprotection/impl/settings/custom_dns/VpnCustomDnsActivity.kt:147-151 — 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 (5 lines × 2) app/src/main/java/com/duckduckgo/app/survey/ui/SurveyViewModel.kt:81— app/src/main/java/com/duckduckgo/app/survey/ui/SurveyViewModel.kt:81-85 | autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/ui/credential/management/survey/AutofillSurvey.kt:85-89 — 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 `app/src/main/java/com/duckduckgo/app/survey/ui/SurveyViewModel.kt:81` 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 (5 lines × 2) duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/clearing/DelegatingDuckChatDeleter.kt:47— duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/clearing/DelegatingDuckChatDeleter.kt:47-51 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/clearing/DelegatingDuckChatDeleter.kt:59-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. Read the line range as the matched WINDOW rather than a finished unit: at `duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/clearing/DelegatingDuckChatDeleter.kt: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 (13 lines × 2) app/src/main/java/com/duckduckgo/app/browser/BrowserTabFragment.kt:5111— app/src/main/java/com/duckduckgo/app/browser/BrowserTabFragment.kt:5111-5123 | app/src/main/java/com/duckduckgo/app/tabs/ui/TabSwitcherActivity.kt:1136-1148 — 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 (13 lines × 2) app/src/main/java/com/duckduckgo/app/tabs/ui/TabSwitcherAdapter.kt:442— app/src/main/java/com/duckduckgo/app/tabs/ui/TabSwitcherAdapter.kt:442-454 | app/src/main/java/com/duckduckgo/app/tabs/ui/TabSwitcherAdapter.kt:474-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 `app/src/main/java/com/duckduckgo/app/tabs/ui/TabSwitcherAdapter.kt:442` 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 `viewHolder` to `TabSwitcherViewHolder.GridTabViewHolder` in one and `TabSwitcherViewHolder.ListTabViewHolder` 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, `app/src/main/java/com/duckduckgo/app/tabs/ui/TabSwitcherAdapter.kt:472` calls `formatUrl`, `isNullOrEmpty` and `app/src/main/java/com/duckduckgo/app/tabs/ui/TabSwitcherAdapter.kt:441` 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) autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/service/AutofillSimpleCredentialsListFragment.kt:154— autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/service/AutofillSimpleCredentialsListFragment.kt:154-166 | autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/ui/credential/management/viewing/AutofillManagementListMode.kt:266-278 — 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 `autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/service/AutofillSimpleCredentialsListFragment.kt:154` 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, `autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/service/AutofillSimpleCredentialsListFragment.kt:153` calls `fire` and `autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/ui/credential/management/viewing/AutofillManagementListMode.kt:265` 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.
Duplicated block (13 lines × 2) content-scope-scripts/content-scope-scripts-impl/src/main/java/com/duckduckgo/contentscopescripts/impl/messaging/ContentScopeScriptsJsMessaging.kt:270— content-scope-scripts/content-scope-scripts-impl/src/main/java/com/duckduckgo/contentscopescripts/impl/messaging/ContentScopeScriptsJsMessaging.kt:270-282 | content-scope-scripts/content-scope-scripts-impl/src/main/java/com/duckduckgo/contentscopescripts/impl/messaging/ContentScopeScriptsJsMessaging.kt:317-329 — 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 `content-scope-scripts/content-scope-scripts-impl/src/main/java/com/duckduckgo/contentscopescripts/impl/messaging/ContentScopeScriptsJsMessaging.kt:270` 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) duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/nativeinput/footer/highusage/HighUsageModelFooterPlugin.kt:144— duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/nativeinput/footer/highusage/HighUsageModelFooterPlugin.kt:144-156 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/nativeinput/footer/usagelimits/UsageLimitFooterPlugin.kt:168-180 — 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 `duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/nativeinput/footer/highusage/HighUsageModelFooterPlugin.kt:144` 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) lint-rules/src/main/java/com/duckduckgo/lint/strings/MissingInstructionDetector.kt:44— lint-rules/src/main/java/com/duckduckgo/lint/strings/MissingInstructionDetector.kt:44-56 | lint-rules/src/main/java/com/duckduckgo/lint/strings/PlaceholderDetector.kt:43-55 — 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 (13 lines × 2) sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/RealSyncCodeDispatcher.kt:99— sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/RealSyncCodeDispatcher.kt:99-111 | sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/RealSyncCodeDispatcher.kt:253-265 — 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 `sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/RealSyncCodeDispatcher.kt:99` 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) pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/scheduling/PirJobsRunner.kt:296— pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/scheduling/PirJobsRunner.kt:296-308 | pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/scheduling/PirJobsRunner.kt:315-327 — 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 `pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/scheduling/PirJobsRunner.kt:296` 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.
Duplicated block (13 lines × 2) scripts/release/create-asana-internal-release.py:127— scripts/release/create-asana-internal-release.py:127-139 | scripts/release/create-asana-public-release.py:47-59 — before extracting anything, compare `scripts/release/create-asana-internal-release.py` and `scripts/release/create-asana-public-release.py` 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. 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.
Change coupling: SyncActivity.kt ↔ SyncActivityViewModel.kt sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/ui/SyncActivity.kt:1— `sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/ui/SyncActivity.kt` and `sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/ui/dashboard/SyncActivityViewModel.kt` change together 86% of the time (19 of the 22 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — 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) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 19 shared commits counted here, the most recent 3 are `b83ea327` Clean up sync code before integrating pixels (#9386) (at that commit the file was still `sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/ui/SyncActivityViewModel.kt`); `aa99c94a` Handle sync recovery basic scenario (#9356) (at that commit the file was still `sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/ui/SyncActivityViewModel.kt`); `1a10a937` Handle delete account action in simplified sync (#9276) (at that commit the file was still `sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/ui/SyncActivityViewModel.kt`) — run `git show` on any of them.
Change coupling: DuckAiFeatureState.kt ↔ DuckChatFeature.kt duckchat/duckchat-api/src/main/java/com/duckduckgo/duckchat/api/DuckAiFeatureState.kt:1— `duckchat/duckchat-api/src/main/java/com/duckduckgo/duckchat/api/DuckAiFeatureState.kt` and `duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/feature/DuckChatFeature.kt` change together 71% of the time (10 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — 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) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `c7bbecd8` Remove aiChat.showNewAddressBarPickerScreen feature flag (#9809); `38465158` Delete four orphaned input-screen feature flags (#9453); `544d6ad0` Remove the obsolete standalone Duck.ai screen and its rollout flag (#… — run `git show` on any of them.
Change coupling: BrowserTabFragment.kt ↔ WebViewClientListener.kt app/src/main/java/com/duckduckgo/app/browser/BrowserTabFragment.kt:1— `app/src/main/java/com/duckduckgo/app/browser/BrowserTabFragment.kt` and `app/src/main/java/com/duckduckgo/app/browser/WebViewClientListener.kt` change together 59% of the time (32 of the 54 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — 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 32 shared commits counted here, the most recent 3 are `af4b6348` Implements page-load timeout policy (#9940); `22921623` Fix WSJ Custom Tab redirect loop (#8520); `7f67a802` Duck.ai on custom tabs UI (#8897) — run `git show` on any of them.
Change coupling: CtaViewModel.kt ↔ OnboardingStoreImpl.kt app/src/main/java/com/duckduckgo/app/cta/ui/CtaViewModel.kt:1— `app/src/main/java/com/duckduckgo/app/cta/ui/CtaViewModel.kt` and `app/src/main/java/com/duckduckgo/app/onboarding/store/OnboardingStoreImpl.kt` change together 58% of the time (11 of the 19 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — 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) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither 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 `ad5530cb` [Segmented Onboarding] Experiment setup and metrics (#9711); `04dc2255` Don't show the widget prompt to the users enrolled in the experiment …; `af9b2c22` Add referral 'onboarding' param parser and custom AI onboarding plan … — run `git show` on any of them.
Change coupling: PirPixelInterceptor.kt ↔ PirJobsRunner.kt pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/pixels/PirPixelInterceptor.kt:1— `pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/pixels/PirPixelInterceptor.kt` and `pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/scheduling/PirJobsRunner.kt` change together 54% of the time (7 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — 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) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `5a41409e` PIR: Add graceful handling of WebView renderer crash (#9323); `4b18d7de` PIR: Add wide event for time to scan jobs completion (#8487); `52ff681f` PIR: Add wide events to scans (#8475) — run `git show` on any of them.
Change coupling: Omnibar.kt ↔ TopAppBarBehavior.kt app/src/main/java/com/duckduckgo/app/browser/omnibar/Omnibar.kt:1— `app/src/main/java/com/duckduckgo/app/browser/omnibar/Omnibar.kt` and `app/src/main/java/com/duckduckgo/app/browser/omnibar/TopAppBarBehavior.kt` 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 — 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 5 shared commits counted here, the most recent 3 are `b2a3c288` Lock UI on receiving a CSS message to lock (#7776); `f33abf20` Split Omnibar: Bottom navigation (#7032); `6a7e7902` remove minibar (#5865) — run `git show` on any of them.
Change coupling: BottomAppBarBehavior.kt ↔ TopAppBarBehavior.kt app/src/main/java/com/duckduckgo/app/browser/omnibar/BottomAppBarBehavior.kt:1— `app/src/main/java/com/duckduckgo/app/browser/omnibar/BottomAppBarBehavior.kt` and `app/src/main/java/com/duckduckgo/app/browser/omnibar/TopAppBarBehavior.kt` 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 — 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 5 shared commits counted here, the most recent 3 are `b2a3c288` Lock UI on receiving a CSS message to lock (#7776); `6031c07f` Bug: Snackbars shown at the top (#6237); `2a5dddd4` Fix: Hide the bottom toolbar in full screen mode (#5228) — run `git show` on any of them.
Change coupling: PirRunStateHandler.kt ↔ PirDatabase.kt pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/common/PirRunStateHandler.kt:1— `pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/common/PirRunStateHandler.kt` and `pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/store/PirDatabase.kt` 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 — 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) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither 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 `a47d6c9c` PIR: Forward extras on extracted profiles (#9353); `d04b8c7c` PIR: Handle jobs after profile edit (#6914); `fa4247b4` PIR: Add android pixels and event logs for decoupled email (#6926) — run `git show` on any of them.
Duplicated block (16 lines × 2) app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt:1429— app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt:1429-1444 | app/src/main/java/com/duckduckgo/app/systemsearch/SystemSearchViewModel.kt:420-435 — 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 `app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt:1429` 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, `app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt:1427` calls `configureAutoComplete` and `app/src/main/java/com/duckduckgo/app/systemsearch/SystemSearchViewModel.kt:419` 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.
Duplicated block (16 lines × 2) app/src/main/java/com/duckduckgo/app/browser/filechooser/capture/launcher/UploadFromExternalMediaAppLauncher.kt:129— app/src/main/java/com/duckduckgo/app/browser/filechooser/capture/launcher/UploadFromExternalMediaAppLauncher.kt:129-144 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/filechooser/capture/launcher/UploadFromExternalMediaAppLauncher.kt:128-143 — before extracting anything, compare `app/src/main/java/com/duckduckgo/app/browser/filechooser/capture/launcher/UploadFromExternalMediaAppLauncher.kt` and `duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/filechooser/capture/launcher/UploadFromExternalMediaAppLauncher.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 73 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. 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 (16 lines × 2) app/src/main/java/com/duckduckgo/app/browser/filechooser/capture/launcher/UploadFromExternalMediaAppLauncher.kt:182— app/src/main/java/com/duckduckgo/app/browser/filechooser/capture/launcher/UploadFromExternalMediaAppLauncher.kt:182-197 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/filechooser/capture/launcher/UploadFromExternalMediaAppLauncher.kt:181-196 — before extracting anything, compare `app/src/main/java/com/duckduckgo/app/browser/filechooser/capture/launcher/UploadFromExternalMediaAppLauncher.kt` and `duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/filechooser/capture/launcher/UploadFromExternalMediaAppLauncher.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 73 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. 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. Note first that the copies are not typed on the same thing: `R` names `com.duckduckgo.app.browser.R` in one and `com.duckduckgo.duckchat.impl.R` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (16 lines × 2) app/src/main/java/com/duckduckgo/app/browser/filechooser/capture/postprocess/MediaCaptureImageMover.kt:40— app/src/main/java/com/duckduckgo/app/browser/filechooser/capture/postprocess/MediaCaptureImageMover.kt:40-55 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/filechooser/capture/postprocess/MediaCaptureImageMover.kt:40-55 — before extracting anything, compare `app/src/main/java/com/duckduckgo/app/browser/filechooser/capture/postprocess/MediaCaptureImageMover.kt` and `duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/filechooser/capture/postprocess/MediaCaptureImageMover.kt` as WHOLE FILES: 88% 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. 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. 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 (16 lines × 2) malicious-site-protection/malicious-site-protection-impl/src/main/kotlin/com/duckduckgo/malicioussiteprotection/impl/MaliciousSiteProtectionFiltersUpdateWorker.kt:62— malicious-site-protection/malicious-site-protection-impl/src/main/kotlin/com/duckduckgo/malicioussiteprotection/impl/MaliciousSiteProtectionFiltersUpdateWorker.kt:62-77 | malicious-site-protection/malicious-site-protection-impl/src/main/kotlin/com/duckduckgo/malicioussiteprotection/impl/MaliciousSiteProtectionHashPrefixesUpdateWorker.kt:62-77 — before extracting anything, compare `malicious-site-protection/malicious-site-protection-impl/src/main/kotlin/com/duckduckgo/malicioussiteprotection/impl/MaliciousSiteProtectionFiltersUpdateWorker.kt` and `malicious-site-protection/malicious-site-protection-impl/src/main/kotlin/com/duckduckgo/malicioussiteprotection/impl/MaliciousSiteProtectionHashPrefixesUpdateWorker.kt` as WHOLE FILES: 87% 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. 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 `malicious-site-protection/malicious-site-protection-impl/src/main/kotlin/com/duckduckgo/malicioussiteprotection/impl/MaliciousSiteProtectionFiltersUpdateWorker.kt:62` 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 (16 lines × 2) sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/promotion/bookmarks/SyncBookmarksPromotion.kt:134— sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/promotion/bookmarks/SyncBookmarksPromotion.kt:134-149 | sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/promotion/passwords/SyncPasswordsPromotion.kt:137-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. Read the line range as the matched WINDOW rather than a finished unit: at `sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/promotion/bookmarks/SyncBookmarksPromotion.kt: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 (16 lines × 2) app/src/main/java/com/duckduckgo/app/email/ui/EmailProtectionUnsupportedActivity.kt:41— app/src/main/java/com/duckduckgo/app/email/ui/EmailProtectionUnsupportedActivity.kt:41-56 | sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/ui/DeviceUnsupportedActivity.kt:41-61 — 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 `sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/ui/DeviceUnsupportedActivity.kt:41` 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 (16 lines × 2) autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/takeout/processor/TakeoutBookmarkImporter.kt:56— autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/takeout/processor/TakeoutBookmarkImporter.kt:56-71 | saved-sites/saved-sites-impl/src/main/java/com/duckduckgo/savedsites/impl/importing/TakeoutBookmarkImporter.kt:56-71 — before extracting anything, compare `autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/takeout/processor/TakeoutBookmarkImporter.kt` and `saved-sites/saved-sites-impl/src/main/java/com/duckduckgo/savedsites/impl/importing/TakeoutBookmarkImporter.kt` as WHOLE FILES: 98% 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. 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 (18 lines × 2) app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/apps/ui/ExclusionListAdapter.kt:266— app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/apps/ui/ExclusionListAdapter.kt:266-283 | app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/apps/ui/TrackingProtectionAppsAdapter.kt:145-162 — before extracting anything, compare `app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/apps/ui/ExclusionListAdapter.kt` and `app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/apps/ui/TrackingProtectionAppsAdapter.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 65 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 `app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/apps/ui/ExclusionListAdapter.kt:266` 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 `listener` to `ExclusionListListener` in one and `AppProtectionListener` 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 (18 lines × 2) app/src/main/java/com/duckduckgo/app/browser/filechooser/capture/launcher/UploadFromExternalMediaAppLauncher.kt:200— app/src/main/java/com/duckduckgo/app/browser/filechooser/capture/launcher/UploadFromExternalMediaAppLauncher.kt:200-217 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/filechooser/capture/launcher/UploadFromExternalMediaAppLauncher.kt:199-216 — before extracting anything, compare `app/src/main/java/com/duckduckgo/app/browser/filechooser/capture/launcher/UploadFromExternalMediaAppLauncher.kt` and `duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/filechooser/capture/launcher/UploadFromExternalMediaAppLauncher.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 73 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. 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. Note first that the copies are not typed on the same thing: `R` names `com.duckduckgo.app.browser.R` in one and `com.duckduckgo.duckchat.impl.R` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (18 lines × 2) app/src/main/java/com/duckduckgo/app/browser/threatprotection/ThreatProtectionSettingsActivity.kt:195— app/src/main/java/com/duckduckgo/app/browser/threatprotection/ThreatProtectionSettingsActivity.kt:195-212 | app/src/main/java/com/duckduckgo/app/browser/webview/MaliciousSiteBlockedWarningLayout.kt:144-161 — 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 `app/src/main/java/com/duckduckgo/app/browser/threatprotection/ThreatProtectionSettingsActivity.kt:195` 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 (18 lines × 2) app/src/main/java/com/duckduckgo/app/di/TabRepositoryModule.kt:87— app/src/main/java/com/duckduckgo/app/di/TabRepositoryModule.kt:87-104 | app/src/main/java/com/duckduckgo/app/di/TabRepositoryModule.kt:126-143 — 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 `app/src/main/java/com/duckduckgo/app/di/TabRepositoryModule.kt:87` 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 (18 lines × 2) remote-messaging/remote-messaging-impl/src/main/java/com/duckduckgo/remote/messaging/impl/RemoteMessagingConfigMatcher.kt:133— remote-messaging/remote-messaging-impl/src/main/java/com/duckduckgo/remote/messaging/impl/RemoteMessagingConfigMatcher.kt:133-150 | remote-messaging/remote-messaging-impl/src/main/java/com/duckduckgo/remote/messaging/impl/RemoteMessagingConfigMatcher.kt:159-176 — 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 `remote-messaging/remote-messaging-impl/src/main/java/com/duckduckgo/remote/messaging/impl/RemoteMessagingConfigMatcher.kt:133` 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.
Duplicated block (18 lines × 2) sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/ui/setup/PreviousSessionReadyViewModel.kt:103— sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/ui/setup/PreviousSessionReadyViewModel.kt:103-120 | sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/ui/setup/SyncThisDeviceViewModel.kt:149-166 — 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 `sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/ui/setup/PreviousSessionReadyViewModel.kt:103` 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 (17 lines × 2) ad-blocking/ad-blocking-impl/src/main/java/com/duckduckgo/adblocking/impl/duckplayer/ui/DuckPlayerPrimeBottomSheet.kt:56— ad-blocking/ad-blocking-impl/src/main/java/com/duckduckgo/adblocking/impl/duckplayer/ui/DuckPlayerPrimeBottomSheet.kt:56-72 | ad-blocking/ad-blocking-impl/src/main/java/com/duckduckgo/adblocking/impl/duckplayer/ui/DuckPlayerPrimeDialogFragment.kt:45-61 — 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, `ad-blocking/ad-blocking-impl/src/main/java/com/duckduckgo/adblocking/impl/duckplayer/ui/DuckPlayerPrimeBottomSheet.kt:73` calls `applyBottomSystemBarInsetPadding` and `ad-blocking/ad-blocking-impl/src/main/java/com/duckduckgo/adblocking/impl/duckplayer/ui/DuckPlayerPrimeDialogFragment.kt:62` 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 (17 lines × 2) app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/apps/ui/ExclusionListAdapter.kt:236— app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/apps/ui/ExclusionListAdapter.kt:236-252 | app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/apps/ui/TrackingProtectionAppsAdapter.kt:115-131 — before extracting anything, compare `app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/apps/ui/ExclusionListAdapter.kt` and `app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/apps/ui/TrackingProtectionAppsAdapter.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 65 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 `app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/apps/ui/ExclusionListAdapter.kt:236` 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 (17 lines × 2) app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/apps/ui/ManageRecentAppsProtectionActivity.kt:92— app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/apps/ui/ManageRecentAppsProtectionActivity.kt:92-108 | app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/apps/ui/TrackingProtectionExclusionListActivity.kt:105-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 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, `app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/apps/ui/TrackingProtectionExclusionListActivity.kt:123` calls `applyAppsFilter`, `getAppsFilterOrDefault`, `didShowExclusionListActivity` and `app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/apps/ui/ManageRecentAppsProtectionActivity.kt:110` 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 (17 lines × 2) app/src/main/java/com/duckduckgo/app/browser/filechooser/capture/launcher/UploadFromExternalMediaAppLauncher.kt:163— app/src/main/java/com/duckduckgo/app/browser/filechooser/capture/launcher/UploadFromExternalMediaAppLauncher.kt:163-179 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/filechooser/capture/launcher/UploadFromExternalMediaAppLauncher.kt:162-178 — before extracting anything, compare `app/src/main/java/com/duckduckgo/app/browser/filechooser/capture/launcher/UploadFromExternalMediaAppLauncher.kt` and `duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/filechooser/capture/launcher/UploadFromExternalMediaAppLauncher.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 73 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. 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. Note first that the copies are not typed on the same thing: `MediaCaptureResult` names `com.duckduckgo.app.browser.filechooser.capture.launcher.UploadFromExternalMediaAppLauncher.MediaCaptureResult` in one and `com.duckduckgo.duckchat.impl.ui.filechooser.capture.launcher.UploadFromExternalMediaAppLauncher.MediaCaptureResult` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (17 lines × 2) new-tab-page/new-tab-page-impl/src/main/java/com/duckduckgo/newtabpage/impl/settings/DragLinearLayout.kt:237— new-tab-page/new-tab-page-impl/src/main/java/com/duckduckgo/newtabpage/impl/settings/DragLinearLayout.kt:237-253 | new-tab-page/new-tab-page-impl/src/main/java/com/duckduckgo/newtabpage/impl/settings/DragLinearLayout.kt:316-332 — 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 `new-tab-page/new-tab-page-impl/src/main/java/com/duckduckgo/newtabpage/impl/settings/DragLinearLayout.kt:237` 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 (17 lines × 2) app/src/main/java/com/duckduckgo/app/browser/filechooser/capture/MediaCaptureResultHandler.kt:69— app/src/main/java/com/duckduckgo/app/browser/filechooser/capture/MediaCaptureResultHandler.kt:69-85 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/filechooser/capture/MediaCaptureResultHandler.kt:69-85 — before extracting anything, compare `app/src/main/java/com/duckduckgo/app/browser/filechooser/capture/MediaCaptureResultHandler.kt` and `duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/filechooser/capture/MediaCaptureResultHandler.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 44 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 `app/src/main/java/com/duckduckgo/app/browser/filechooser/capture/MediaCaptureResultHandler.kt:69` 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 (6 lines × 3) sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/engine/SyncGzipInterceptor.kt:51— sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/engine/SyncGzipInterceptor.kt:51-56 | sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/engine/SyncInvalidTokenInterceptor.kt:45-50 | sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/engine/SyncServerUnavailableInterceptor.kt:40-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 all 3 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.
Duplicated block (6 lines × 3) ad-blocking/ad-blocking-impl/src/main/java/com/duckduckgo/adblocking/impl/duckplayer/DuckPlayerScriptsJsMessaging.kt:78— ad-blocking/ad-blocking-impl/src/main/java/com/duckduckgo/adblocking/impl/duckplayer/DuckPlayerScriptsJsMessaging.kt:78-83 | pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/dashboard/messaging/PirDashboardWebMessagingInterface.kt:68-73 | subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/messaging/SubscriptionMessagingInterface.kt:100-105 — before extracting anything, compare `ad-blocking/ad-blocking-impl/src/main/java/com/duckduckgo/adblocking/impl/duckplayer/DuckPlayerScriptsJsMessaging.kt` and `subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/messaging/SubscriptionMessagingInterface.kt` as WHOLE FILES: this scan already matched 4 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. 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 `pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/dashboard/messaging/PirDashboardWebMessagingInterface.kt:68` 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 (6 lines × 3) app/src/main/java/com/duckduckgo/app/fire/wideevents/DataClearingWideEvent.kt:194— app/src/main/java/com/duckduckgo/app/fire/wideevents/DataClearingWideEvent.kt:194-199 | autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/wideevents/CredentialImportWideEvent.kt:211-216 | sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/wideevents/SyncSetupWideEvent.kt:73-81 — 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. 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 × 3) autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/service/AutofillProviderChooseViewModel.kt:92— autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/service/AutofillProviderChooseViewModel.kt:92-97 | autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/service/AutofillProviderCredentialsListViewModel.kt:90-95 | autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/ui/credential/selecting/ResultHandlerCredentialSelection.kt:134-139 — 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 (6 lines × 3) autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/sync/CredentialsSyncNotificationBuilder.kt:64— autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/sync/CredentialsSyncNotificationBuilder.kt:64-69 | saved-sites/saved-sites-impl/src/main/java/com/duckduckgo/savedsites/impl/sync/SavedSitesSyncNotificationBuilder.kt:64-69 | sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/engine/SyncNotificationBuilder.kt:81-86 — before extracting anything, compare `autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/sync/CredentialsSyncNotificationBuilder.kt` and `saved-sites/saved-sites-impl/src/main/java/com/duckduckgo/savedsites/impl/sync/SavedSitesSyncNotificationBuilder.kt` as WHOLE FILES: 82% 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. 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 (6 lines × 3) duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/rmf/RMFDaysSinceDuckAiUsedMatchingAttribute.kt:106— duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/rmf/RMFDaysSinceDuckAiUsedMatchingAttribute.kt:106-111 | remote-messaging/remote-messaging-impl/src/main/java/com/duckduckgo/remote/messaging/impl/models/MatchingAttributes.kt:356-361 | subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/rmf/RMFSubscriptionDaysSinceSubscribedMatchingAttribute.kt:106-111 — 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.
FixmeComment app/src/androidTest/java/com/duckduckgo/app/referencetests/HttpsReferenceTest.kt:72— // FIXME reference tests forced to have visibility in things we should not have visibility like httpsupgrade-impl and impl classes :shrug: — 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.
FixmeComment app/src/main/java/com/duckduckgo/app/di/JsonModule.kt:35— // FIXME we should not access HttpsFalsePositivesJsonAdapter directly here because it's in impl module — 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.
FixmeComment app/src/main/java/com/duckduckgo/app/settings/SettingsViewModel.kt:266— // FIXME — 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.
FixmeComment duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/clearing/DuckChatDataClearingPlugin.kt:85— // FIXME: This duplicates the background-aware timestamp logic from DuckAiChatDeletionListenerImpl. — 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.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×4
Members sharing a duplicated core (4 members, 50+ identical tokens) android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/TextExtensions.kt:76— android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/TextExtensions.kt:76-113 | android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/dialog/RadioListAlertDialogBuilder.kt:113-152 | android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/dialog/TextAlertDialogBuilder.kt:87-126 | app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/breakage/ReportBreakageAppListActivity.kt:152-187 — 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) app/src/main/java/com/duckduckgo/app/browser/BrowserTabFragment.kt:5047— app/src/main/java/com/duckduckgo/app/browser/BrowserTabFragment.kt:5047-5066 | app/src/main/java/com/duckduckgo/app/systemsearch/SystemSearchActivity.kt:654-674 | saved-sites/saved-sites-impl/src/main/java/com/duckduckgo/savedsites/impl/bookmarks/BookmarksActivity.kt:679-702 | saved-sites/saved-sites-impl/src/main/java/com/duckduckgo/savedsites/impl/newtab/FavouritesNewTabSectionView.kt:430-450 — 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) duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/messaging/DuckChatStandaloneJsMessageHandlers.kt:72— duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/messaging/DuckChatStandaloneJsMessageHandlers.kt:72-104 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/messaging/DuckChatStandaloneJsMessageHandlers.kt:113-138 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/messaging/DuckChatStandaloneJsMessageHandlers.kt:147-177 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/messaging/DuckChatStandaloneJsMessageHandlers.kt:186-206 — 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) duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/nativeinput/views/AttachmentView.kt:320— duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/nativeinput/views/AttachmentView.kt:320-394 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/nativeinput/views/ModelPickerView.kt:335-351 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/nativeinput/views/OptionsView.kt:229-251 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/nativeinput/views/ReasoningModePickerView.kt:167-196 — 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.
Duplicated block (18–19 lines × 2) app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/ui/onboarding/VpnOnboardingActivity.kt:254— app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/ui/onboarding/VpnOnboardingActivity.kt:254-272 | app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/ui/tracker_activity/DeviceShieldTrackerActivity.kt:391-408 — before extracting anything, compare `app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/ui/onboarding/VpnOnboardingActivity.kt` and `app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/ui/tracker_activity/DeviceShieldTrackerActivity.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 46 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 `app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/ui/tracker_activity/DeviceShieldTrackerActivity.kt:391` 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, `app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/ui/tracker_activity/DeviceShieldTrackerActivity.kt:390` calls `quietlyToggleAppTpSwitch` and `app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/ui/onboarding/VpnOnboardingActivity.kt:253` 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 (18–19 lines × 2) app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/ui/onboarding/VpnOnboardingActivity.kt:275— app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/ui/onboarding/VpnOnboardingActivity.kt:275-293 | app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/ui/tracker_activity/DeviceShieldTrackerActivity.kt:411-428 — before extracting anything, compare `app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/ui/onboarding/VpnOnboardingActivity.kt` and `app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/ui/tracker_activity/DeviceShieldTrackerActivity.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 46 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. 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 (18–19 lines × 2) autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/gpm/webflow/ImportGooglePasswordsWebFlowFragment.kt:216— autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/gpm/webflow/ImportGooglePasswordsWebFlowFragment.kt:216-234 | autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/takeout/webflow/ImportGoogleBookmarksWebFlowFragment.kt:216-233 — before extracting anything, compare `autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/gpm/webflow/ImportGooglePasswordsWebFlowFragment.kt` and `autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/takeout/webflow/ImportGoogleBookmarksWebFlowFragment.kt` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 86 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. 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 (18–19 lines × 2) codegen/codegen-ksp/src/main/java/com/duckduckgo/codegen/ksp/ContributesServiceApiProcessor.kt:195— codegen/codegen-ksp/src/main/java/com/duckduckgo/codegen/ksp/ContributesServiceApiProcessor.kt:195-213 | codegen/codegen-ksp/src/main/java/com/duckduckgo/codegen/ksp/ContributesWorkerProcessor.kt:211-228 — 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 lines × 2) remote-messaging/remote-messaging-impl/src/main/java/com/duckduckgo/remote/messaging/impl/modal/cardslist/CardsListRemoteMessageView.kt:249— remote-messaging/remote-messaging-impl/src/main/java/com/duckduckgo/remote/messaging/impl/modal/cardslist/CardsListRemoteMessageView.kt:249-267 | remote-messaging/remote-messaging-impl/src/main/java/com/duckduckgo/remote/messaging/impl/newtab/RemoteMessageView.kt:241-259 — 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 (19 lines × 2) sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/ui/pairing/process/ProcessSyncCodeActivity.kt:166— sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/ui/pairing/process/ProcessSyncCodeActivity.kt:166-184 | sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/ui/pairing/show/DisplayQrCodeActivity.kt:170-188 — before extracting anything, compare `sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/ui/pairing/process/ProcessSyncCodeActivity.kt` and `sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/ui/pairing/show/DisplayQrCodeActivity.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 45 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. 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 lines × 2) sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/ui/pairing/process/ProcessSyncCodeActivity.kt:190— sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/ui/pairing/process/ProcessSyncCodeActivity.kt:190-208 | sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/ui/pairing/show/DisplayQrCodeActivity.kt:191-209 — before extracting anything, compare `sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/ui/pairing/process/ProcessSyncCodeActivity.kt` and `sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/ui/pairing/show/DisplayQrCodeActivity.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 45 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. 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 lines × 2) android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/TypeAnimationTextView.kt:59— android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/TypeAnimationTextView.kt:59-77 | app/src/main/java/com/duckduckgo/app/onboarding/ui/view/DaxTypeAnimationTextView.kt:78-96 — before extracting anything, compare `android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/TypeAnimationTextView.kt` and `app/src/main/java/com/duckduckgo/app/onboarding/ui/view/DaxTypeAnimationTextView.kt` as WHOLE FILES: 92% 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 `android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/TypeAnimationTextView.kt:59` 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 × 3) android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/compose/sheets/DaxActionBottomSheetDialog.kt:141— android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/compose/sheets/DaxActionBottomSheetDialog.kt:141-152 | android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/compose/sheets/DaxActionBottomSheetDialog.kt:197-208 | android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/compose/sheets/DaxActionBottomSheetDialog.kt:235-246 — 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 `android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/compose/sheets/DaxActionBottomSheetDialog.kt:141` 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 lines × 3) app/src/main/java/com/duckduckgo/app/globalprivacycontrol/ui/GlobalPrivacyControlActivity.kt:67— app/src/main/java/com/duckduckgo/app/globalprivacycontrol/ui/GlobalPrivacyControlActivity.kt:67-78 | autoconsent/autoconsent-impl/src/main/java/com/duckduckgo/autoconsent/impl/ui/AutoconsentSettingsActivity.kt:99-112 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/subscription/DuckAiPaidSettingsActivity.kt:87-100 — before extracting anything, compare `autoconsent/autoconsent-impl/src/main/java/com/duckduckgo/autoconsent/impl/ui/AutoconsentSettingsActivity.kt` and `duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/subscription/DuckAiPaidSettingsActivity.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 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 (12 lines × 3) app/src/main/java/com/duckduckgo/app/onboardingquicksetup/ui/QuickSetupAddressBarPositionBottomSheet.kt:107— app/src/main/java/com/duckduckgo/app/onboardingquicksetup/ui/QuickSetupAddressBarPositionBottomSheet.kt:107-118 | app/src/main/java/com/duckduckgo/app/onboardingquicksetup/ui/QuickSetupSearchOptionsBottomSheet.kt:101-112 | app/src/main/java/com/duckduckgo/app/onboardingquicksetup/ui/RemoveWidgetInstructionsBottomSheet.kt:67-78 — 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. 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 × 3) feature-toggles/feature-toggles-impl/src/main/java/com/duckduckgo/feature/toggles/impl/metrics/SearchMetricPixelsPlugin.kt:44— feature-toggles/feature-toggles-impl/src/main/java/com/duckduckgo/feature/toggles/impl/metrics/SearchMetricPixelsPlugin.kt:44-55 | feature-toggles/feature-toggles-impl/src/main/java/com/duckduckgo/feature/toggles/impl/metrics/SearchMetricPixelsPlugin.kt:64-75 | feature-toggles/feature-toggles-impl/src/main/java/com/duckduckgo/feature/toggles/impl/metrics/SearchMetricPixelsPlugin.kt:84-95 — 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 `feature-toggles/feature-toggles-impl/src/main/java/com/duckduckgo/feature/toggles/impl/metrics/SearchMetricPixelsPlugin.kt:44` 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 × 3) android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/dialogs/DialogsFragment.kt:116— android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/dialogs/DialogsFragment.kt:116-126 | android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/dialogs/DialogsFragment.kt:284-294 | android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/dialogs/DialogsFragment.kt:403-413 — 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 `android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/dialogs/DialogsFragment.kt:116` 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, `android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/dialogs/DialogsFragment.kt:113` calls `setHeaderImageResource` and `android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/dialogs/DialogsFragment.kt:281` 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 (11 lines × 3) android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/dialogs/DialogsFragment.kt:819— android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/dialogs/DialogsFragment.kt:819-829 | android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/dialogs/DialogsFragment.kt:876-886 | android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/dialogs/DialogsFragment.kt:934-944 — 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 `android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/dialogs/DialogsFragment.kt:819` 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 × 3) app/src/main/java/com/duckduckgo/app/tabs/ui/TabSwitcherAdapter.kt:445— app/src/main/java/com/duckduckgo/app/tabs/ui/TabSwitcherAdapter.kt:445-457 | app/src/main/java/com/duckduckgo/app/tabs/ui/TabSwitcherAdapter.kt:477-489 | app/src/main/java/com/duckduckgo/app/tabs/ui/TabSwitcherAdapter.kt:504-514 — 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 `app/src/main/java/com/duckduckgo/app/tabs/ui/TabSwitcherAdapter.kt:445` 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 `viewHolder` to `TabSwitcherViewHolder.GridTabViewHolder` in one and `TabSwitcherViewHolder.ListTabViewHolder` 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 × 3) lint-rules/src/main/java/com/duckduckgo/lint/ui/DaxDividerColorUsageDetector.kt:112— lint-rules/src/main/java/com/duckduckgo/lint/ui/DaxDividerColorUsageDetector.kt:112-122 | lint-rules/src/main/java/com/duckduckgo/lint/ui/DaxListItemColorUsageDetector.kt:149-159 | lint-rules/src/main/java/com/duckduckgo/lint/ui/DaxTextColorUsageDetector.kt:227-237 — 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 (10 lines × 3) app/src/main/java/com/duckduckgo/app/browser/uilock/UiLockContentScopeJsMessageHandler.kt:33— app/src/main/java/com/duckduckgo/app/browser/uilock/UiLockContentScopeJsMessageHandler.kt:33-42 | breakage-reporting/breakage-reporting-impl/src/main/java/com/duckduckgo/breakagereporting/impl/BreakageContentScopeJsMessageHandler.kt:31-40 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/contextual/PageContextContentScopeJSMessageHandler.kt:30-39 — before extracting anything, compare `breakage-reporting/breakage-reporting-impl/src/main/java/com/duckduckgo/breakagereporting/impl/BreakageContentScopeJsMessageHandler.kt` and `duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/contextual/PageContextContentScopeJSMessageHandler.kt` 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. 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 `app/src/main/java/com/duckduckgo/app/browser/uilock/UiLockContentScopeJsMessageHandler.kt:33` 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) duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/clearing/DuckChatDeleterJsMessaging.kt:70— duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/clearing/DuckChatDeleterJsMessaging.kt:70-79 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/nativeinput/suggestions/reader/ChatSuggestionsJsMessaging.kt:66-75 | pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/scripts/PirMessagingInterface.kt:82-91 — before extracting anything, compare `duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/clearing/DuckChatDeleterJsMessaging.kt` and `duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/nativeinput/suggestions/reader/ChatSuggestionsJsMessaging.kt` as WHOLE FILES: this scan already matched 4 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 `duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/clearing/DuckChatDeleterJsMessaging.kt:70` 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 lines × 3) duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/messaging/DuckChatStandaloneJsMessageHandlers.kt:93— duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/messaging/DuckChatStandaloneJsMessageHandlers.kt:93-102 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/messaging/DuckChatStandaloneJsMessageHandlers.kt:127-136 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/messaging/DuckChatStandaloneJsMessageHandlers.kt:166-175 — 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 `duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/messaging/DuckChatStandaloneJsMessageHandlers.kt:93` 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 (10 lines × 3) app/src/internal/java/com/duckduckgo/app/audit/AuditSettingsActivity.kt:60— app/src/internal/java/com/duckduckgo/app/audit/AuditSettingsActivity.kt:60-69 | app/src/internal/java/com/duckduckgo/app/dev/settings/DevSettingsActivity.kt:81-90 | app/src/internal/java/com/duckduckgo/app/dev/settings/onboarding/OnboardingDevSettingsActivity.kt:59-68 — 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 (9–10 lines × 2) app/src/main/java/com/duckduckgo/app/cta/ui/Cta.kt:322— app/src/main/java/com/duckduckgo/app/cta/ui/Cta.kt:322-330 | app/src/main/java/com/duckduckgo/app/cta/ui/Cta.kt:1167-1176 — 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 `app/src/main/java/com/duckduckgo/app/cta/ui/Cta.kt:322` 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, `app/src/main/java/com/duckduckgo/app/cta/ui/Cta.kt:1165` calls `ofFloat`, `setDuration` and `app/src/main/java/com/duckduckgo/app/cta/ui/Cta.kt:321` 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 (9–10 lines × 2) feature-toggles/feature-toggles-impl/src/main/java/com/duckduckgo/feature/toggles/impl/metrics/AppUseMetricPixelsPlugin.kt:35— feature-toggles/feature-toggles-impl/src/main/java/com/duckduckgo/feature/toggles/impl/metrics/AppUseMetricPixelsPlugin.kt:35-44 | feature-toggles/feature-toggles-impl/src/main/java/com/duckduckgo/feature/toggles/impl/metrics/SearchMetricPixelsPlugin.kt:36-44 — before extracting anything, compare `feature-toggles/feature-toggles-impl/src/main/java/com/duckduckgo/feature/toggles/impl/metrics/AppUseMetricPixelsPlugin.kt` and `feature-toggles/feature-toggles-impl/src/main/java/com/duckduckgo/feature/toggles/impl/metrics/SearchMetricPixelsPlugin.kt` as WHOLE FILES: 84% 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. Read the line range as the matched WINDOW rather than a finished unit: at `feature-toggles/feature-toggles-impl/src/main/java/com/duckduckgo/feature/toggles/impl/metrics/AppUseMetricPixelsPlugin.kt:35` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `feature-toggles/feature-toggles-impl/src/main/java/com/duckduckgo/feature/toggles/impl/metrics/SearchMetricPixelsPlugin.kt:33` calls `listOf` and `feature-toggles/feature-toggles-impl/src/main/java/com/duckduckgo/feature/toggles/impl/metrics/AppUseMetricPixelsPlugin.kt:32` 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–10 lines × 2) pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/dashboard/messaging/handlers/PirWebInitialScanStatusMessageHandler.kt:138— pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/dashboard/messaging/handlers/PirWebInitialScanStatusMessageHandler.kt:138-147 | pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/dashboard/messaging/handlers/PirWebMaintenanceScanStatusMessageHandler.kt:137-145 — 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 `pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/dashboard/messaging/handlers/PirWebInitialScanStatusMessageHandler.kt:138` 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–10 lines × 2) sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/engine/SyncInvalidTokenInterceptor.kt:45— sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/engine/SyncInvalidTokenInterceptor.kt:45-54 | sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/engine/SyncServerUnavailableInterceptor.kt:40-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.
X2 · Cancellation propagation· Suspend function with a blocking request · ×4
Suspend function with a blocking request: download ad-blocking/ad-blocking-impl/src/main/java/com/duckduckgo/adblocking/impl/ScriptletDownloader.kt:39— `download` suspends, but makes its request with `newCall(…).execute()`, which blocks: its caller's cancellation cannot reach the request, so it runs to its end after whatever wanted it has given up — `withContext(Dispatchers.IO)` moves it off the caller's thread and does not change that. Make the request with a call that suspends: Ktor, OkHttp's `executeAsync()`, or a `suspendCancellableCoroutine` over `enqueue` that cancels the `Call` in `invokeOnCancellation`.
Suspend function with a blocking request: requestEmbed ad-blocking/ad-blocking-impl/src/main/java/com/duckduckgo/adblocking/impl/duckplayer/DuckPlayerFeatureRepository.kt:239— `requestEmbed` suspends, but makes its request with `newCall(…).execute()`, which blocks: its caller's cancellation cannot reach the request, so it runs to its end after whatever wanted it has given up — `withContext(Dispatchers.IO)` moves it off the caller's thread and does not change that. Make the request with a call that suspends: Ktor, OkHttp's `executeAsync()`, or a `suspendCancellableCoroutine` over `enqueue` that cancels the `Call` in `invokeOnCancellation`.
Suspend function with a blocking request: fetchTitle app/src/main/java/com/duckduckgo/app/tabs/model/PageTitleFetcher.kt:47— `fetchTitle` suspends, but makes its request with `newCall(…).execute()`, which blocks: its caller's cancellation cannot reach the request, so it runs to its end after whatever wanted it has given up — `withContext(Dispatchers.IO)` moves it off the caller's thread and does not change that. Make the request with a call that suspends: Ktor, OkHttp's `executeAsync()`, or a `suspendCancellableCoroutine` over `enqueue` that cancels the `Call` in `invokeOnCancellation`.
Suspend function with a blocking request: downloadZip autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/takeout/zip/TakeoutZipDownloader.kt:50— `downloadZip` suspends, but makes its request with `newCall(…).execute()`, which blocks: its caller's cancellation cannot reach the request, so it runs to its end after whatever wanted it has given up — `withContext(Dispatchers.IO)` moves it off the caller's thread and does not change that. Make the request with a call that suspends: Ktor, OkHttp's `executeAsync()`, or a `suspendCancellableCoroutine` over `enqueue` that cancels the `Call` in `invokeOnCancellation`.
SubscriptionFeedbackViewModel.asTitle (cyclomatic 27) subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/feedback/SubscriptionFeedbackViewModel.kt:400— SubscriptionFeedbackViewModel.asTitle has cyclomatic complexity 27 (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. This shape REPEATS in the file: 2 other methods here (SubscriptionFeedbackViewModel.asTitle, SubscriptionFeedbackViewModel.asTitle) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
SubscriptionFeedbackViewModel.asTitle (cyclomatic 27) subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/feedback/SubscriptionFeedbackViewModel.kt:410— SubscriptionFeedbackViewModel.asTitle has cyclomatic complexity 27 (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. This shape REPEATS in the file: 2 other methods here (SubscriptionFeedbackViewModel.asTitle, SubscriptionFeedbackViewModel.asTitle) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
SubscriptionFeedbackViewModel.asTitle (cyclomatic 27) subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/feedback/SubscriptionFeedbackViewModel.kt:418— SubscriptionFeedbackViewModel.asTitle has cyclomatic complexity 27 (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. This shape REPEATS in the file: 2 other methods here (SubscriptionFeedbackViewModel.asTitle, SubscriptionFeedbackViewModel.asTitle) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
Duplicated block (20 lines × 2) privacy-dashboard/privacy-dashboard-impl/src/main/java/com/duckduckgo/privacy/dashboard/impl/ui/PrivacyDashboardHybridViewModel.kt:421— privacy-dashboard/privacy-dashboard-impl/src/main/java/com/duckduckgo/privacy/dashboard/impl/ui/PrivacyDashboardHybridViewModel.kt:421-440 | privacy-dashboard/privacy-dashboard-impl/src/main/java/com/duckduckgo/privacy/dashboard/impl/ui/PrivacyDashboardHybridViewModel.kt:518-537 — 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 (20 lines × 2) cookies/cookies-store/src/main/java/com/duckduckgo/cookies/store/CookiesFeatureToggleStore.kt:40— cookies/cookies-store/src/main/java/com/duckduckgo/cookies/store/CookiesFeatureToggleStore.kt:40-59 | request-filterer/request-filterer-store/src/main/java/com/duckduckgo/request/filterer/store/RequestFiltererFeatureToggleStore.kt:40-59 — 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 (20 lines × 2) privacy-config/privacy-config-store/src/main/java/com/duckduckgo/privacy/config/store/PrivacyFeatureTogglesDataStore.kt:44— privacy-config/privacy-config-store/src/main/java/com/duckduckgo/privacy/config/store/PrivacyFeatureTogglesDataStore.kt:44-63 | user-agent/user-agent-store/src/main/java/com/duckduckgo/user/agent/store/UserAgentFeatureToggleStore.kt:42-61 — 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 `privacy-config/privacy-config-store/src/main/java/com/duckduckgo/privacy/config/store/PrivacyFeatureTogglesDataStore.kt:44` 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 (15–16 lines × 2) android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/dialogs/DialogsFragment.kt:199— android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/dialogs/DialogsFragment.kt:199-213 | android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/dialogs/DialogsFragment.kt:250-265 — 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 `android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/dialogs/DialogsFragment.kt:199` 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 (15–16 lines × 2) autoconsent/autoconsent-impl/src/main/java/com/duckduckgo/autoconsent/impl/ui/AutoconsentSettingsActivity.kt:181— autoconsent/autoconsent-impl/src/main/java/com/duckduckgo/autoconsent/impl/ui/AutoconsentSettingsActivity.kt:181-195 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/subscription/DuckAiPaidSettingsActivity.kt:171-186 — before extracting anything, compare `autoconsent/autoconsent-impl/src/main/java/com/duckduckgo/autoconsent/impl/ui/AutoconsentSettingsActivity.kt` and `duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/subscription/DuckAiPaidSettingsActivity.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 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 `duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/subscription/DuckAiPaidSettingsActivity.kt:171` 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 (15–16 lines × 2) pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/dashboard/messaging/handlers/PirWebInitialScanStatusMessageHandler.kt:148— pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/dashboard/messaging/handlers/PirWebInitialScanStatusMessageHandler.kt:148-163 | pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/dashboard/messaging/handlers/PirWebMaintenanceScanStatusMessageHandler.kt:147-161 — 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 `pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/dashboard/messaging/handlers/PirWebInitialScanStatusMessageHandler.kt:148` 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 (8–9 lines × 2) app/src/main/java/com/duckduckgo/app/tabs/ui/TabSwitcherAdapter.kt:431— app/src/main/java/com/duckduckgo/app/tabs/ui/TabSwitcherAdapter.kt:431-439 | app/src/main/java/com/duckduckgo/app/tabs/ui/TabSwitcherAdapter.kt:496-503 — 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 `app/src/main/java/com/duckduckgo/app/tabs/ui/TabSwitcherAdapter.kt:431` 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 `viewHolder` to `TabSwitcherViewHolder.GridTabViewHolder` in one and `TabSwitcherViewHolder.DuckAiTabGridViewHolder` 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–9 lines × 2) content-scope-scripts/content-scope-scripts-impl/src/main/java/com/duckduckgo/contentscopescripts/impl/RealContentScopeScripts.kt:474— content-scope-scripts/content-scope-scripts-impl/src/main/java/com/duckduckgo/contentscopescripts/impl/RealContentScopeScripts.kt:474-482 | content-scope-scripts/content-scope-scripts-impl/src/main/java/com/duckduckgo/contentscopescripts/impl/RealWebViewCompatContentScopeScripts.kt:231-238 — 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 `content-scope-scripts/content-scope-scripts-impl/src/main/java/com/duckduckgo/contentscopescripts/impl/RealWebViewCompatContentScopeScripts.kt:231` 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.
Duplicated block (8–9 lines × 2) pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/dashboard/messaging/PirDashboardWebMessagingInterface.kt:82— pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/dashboard/messaging/PirDashboardWebMessagingInterface.kt:82-90 | subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/messaging/ItrMessagingInterface.kt:62-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. Read the line range as the matched WINDOW rather than a finished unit: at `pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/dashboard/messaging/PirDashboardWebMessagingInterface.kt: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 (5 lines × 3) ad-blocking/ad-blocking-impl/src/main/java/com/duckduckgo/adblocking/impl/duckplayer/DuckPlayerScriptsJsMessaging.kt:112— ad-blocking/ad-blocking-impl/src/main/java/com/duckduckgo/adblocking/impl/duckplayer/DuckPlayerScriptsJsMessaging.kt:112-116 | pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/dashboard/messaging/PirDashboardWebMessagingInterface.kt:129-133 | subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/messaging/ItrMessagingInterface.kt:94-98 — 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. 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 × 3) app/src/main/java/com/duckduckgo/app/browser/certificates/remoteconfig/SSLCertificatesFeature.kt:90— app/src/main/java/com/duckduckgo/app/browser/certificates/remoteconfig/SSLCertificatesFeature.kt:90-94 | network-protection/network-protection-impl/src/main/java/com/duckduckgo/networkprotection/impl/VpnRemoteFeatures.kt:99-103 | subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/RealSubscriptions.kt:435-439 — 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 `network-protection/network-protection-impl/src/main/java/com/duckduckgo/networkprotection/impl/VpnRemoteFeatures.kt:99` 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 (5 lines × 3) app/src/main/java/com/duckduckgo/app/fire/fireproofwebsite/ui/FireproofWebsitesActivity.kt:75— app/src/main/java/com/duckduckgo/app/fire/fireproofwebsite/ui/FireproofWebsitesActivity.kt:75-79 | app/src/main/java/com/duckduckgo/app/privacy/ui/AllowListActivity.kt:75-79 | site-permissions/site-permissions-impl/src/main/java/com/duckduckgo/site/permissions/impl/ui/SitePermissionsActivity.kt:102-106 — 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 (9 lines × 4) app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/ui/newtab/AppTrackingProtectionNewTabSettingView.kt:73— app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/ui/newtab/AppTrackingProtectionNewTabSettingView.kt:73-81 | app/src/main/java/com/duckduckgo/app/browser/indonesiamessage/IndonesiaNewTabSectionView.kt:70-79 | new-tab-page/new-tab-page-impl/src/main/java/com/duckduckgo/newtabpage/impl/shortcuts/ShortcutsNewTabSettingView.kt:67-76 | saved-sites/saved-sites-impl/src/main/java/com/duckduckgo/savedsites/impl/newtab/FavouritesNewTabSettingView.kt:71-80 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `app/src/main/java/com/duckduckgo/app/browser/indonesiamessage/IndonesiaNewTabSectionView.kt:68` calls `ConflatedJob` and `app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/ui/newtab/AppTrackingProtectionNewTabSettingView.kt:71` 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 (9 lines × 4) app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/feature/AppTpRemoteFeatures.kt:317— app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/feature/AppTpRemoteFeatures.kt:317-325 | app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/feature/AppTpRemoteFeatures.kt:329-337 | app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/feature/AppTpRemoteFeatures.kt:341-349 | app/src/main/java/com/duckduckgo/app/trackerdetection/blocklist/BlockList.kt:188-196 — 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 `app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/feature/AppTpRemoteFeatures.kt:317` 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 × 4) duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/messaging/DuckChatStandaloneJsMessageHandlers.kt:96— duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/messaging/DuckChatStandaloneJsMessageHandlers.kt:96-104 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/messaging/DuckChatStandaloneJsMessageHandlers.kt:130-138 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/messaging/DuckChatStandaloneJsMessageHandlers.kt:169-177 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/messaging/DuckChatStandaloneJsMessageHandlers.kt:198-206 — 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 `duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/messaging/DuckChatStandaloneJsMessageHandlers.kt:96` 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 (8 lines × 3) app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/ui/onboarding/VpnOnboardingActivity.kt:231— app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/ui/onboarding/VpnOnboardingActivity.kt:231-238 | app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/ui/tracker_activity/DeviceShieldTrackerActivity.kt:512-519 | network-protection/network-protection-impl/src/main/java/com/duckduckgo/networkprotection/impl/management/NetworkProtectionManagementActivity.kt:456-463 — before extracting anything, compare `app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/ui/onboarding/VpnOnboardingActivity.kt` and `app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/ui/tracker_activity/DeviceShieldTrackerActivity.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 46 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. 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 (8 lines × 3) app/src/main/java/com/duckduckgo/app/settings/GetDesktopBrowserCompleteSetupSettings.kt:117— app/src/main/java/com/duckduckgo/app/settings/GetDesktopBrowserCompleteSetupSettings.kt:117-124 | autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/settings/ImportGooglePasswordMainAppSettings.kt:106-113 | sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/promotion/bookmarks/addeddialog/SetupSyncBookmarkAddedPromo.kt:95-102 — 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 (8 lines × 3) subscriptions/subscriptions-internal/src/main/java/com/duckduckgo/subscriptions/internal/settings/CancelPendingPlanChangeView.kt:68— subscriptions/subscriptions-internal/src/main/java/com/duckduckgo/subscriptions/internal/settings/CancelPendingPlanChangeView.kt:68-75 | subscriptions/subscriptions-internal/src/main/java/com/duckduckgo/subscriptions/internal/settings/SwitchSubscriptionProductView.kt:69-77 | subscriptions/subscriptions-internal/src/main/java/com/duckduckgo/subscriptions/internal/settings/SwitchSubscriptionView.kt:69-77 — before extracting anything, compare `subscriptions/subscriptions-internal/src/main/java/com/duckduckgo/subscriptions/internal/settings/SwitchSubscriptionProductView.kt` and `subscriptions/subscriptions-internal/src/main/java/com/duckduckgo/subscriptions/internal/settings/SwitchSubscriptionView.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 233 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 `subscriptions/subscriptions-internal/src/main/java/com/duckduckgo/subscriptions/internal/settings/CancelPendingPlanChangeView.kt:68` 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 × 3) network-protection/network-protection-impl/src/main/java/com/duckduckgo/networkprotection/impl/subscription/onboarding/experiment/SubscriptionOnboardingExperimentMetrics.kt:55— network-protection/network-protection-impl/src/main/java/com/duckduckgo/networkprotection/impl/subscription/onboarding/experiment/SubscriptionOnboardingExperimentMetrics.kt:55-63 | pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/onboarding/experiment/SubscriptionOnboardingExperimentMetrics.kt:55-63 | subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/onboarding/experiment/SubscriptionOnboardingExperimentMetrics.kt:59-67 — before extracting anything, compare `network-protection/network-protection-impl/src/main/java/com/duckduckgo/networkprotection/impl/subscription/onboarding/experiment/SubscriptionOnboardingExperimentMetrics.kt` and `pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/onboarding/experiment/SubscriptionOnboardingExperimentMetrics.kt` as WHOLE FILES: 82% 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. 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 `network-protection/network-protection-impl/src/main/java/com/duckduckgo/networkprotection/impl/subscription/onboarding/experiment/SubscriptionOnboardingExperimentMetrics.kt:55` 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 (9 lines × 3) saved-sites/saved-sites-impl/src/main/java/com/duckduckgo/savedsites/impl/SavedSitesRepository.kt:603— saved-sites/saved-sites-impl/src/main/java/com/duckduckgo/savedsites/impl/SavedSitesRepository.kt:603-611 | saved-sites/saved-sites-impl/src/main/java/com/duckduckgo/savedsites/impl/sync/RealSyncSavedSitesRepository.kt:447-455 | saved-sites/saved-sites-impl/src/main/java/com/duckduckgo/savedsites/impl/sync/SyncEntitiesExtension.kt:45-53 — 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. 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) attributed-metrics/attributed-metrics-impl/src/main/java/com/duckduckgo/app/attributed/metrics/retention/RetentionMonthAttributedMetric.kt:83— attributed-metrics/attributed-metrics-impl/src/main/java/com/duckduckgo/app/attributed/metrics/retention/RetentionMonthAttributedMetric.kt:83-92 | attributed-metrics/attributed-metrics-impl/src/main/java/com/duckduckgo/app/attributed/metrics/retention/RetentionWeekAttributedMetric.kt:80-88 | attributed-metrics/attributed-metrics-impl/src/main/java/com/duckduckgo/app/attributed/metrics/search/SearchDaysAttributedMetric.kt:89-98 — 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 `attributed-metrics/attributed-metrics-impl/src/main/java/com/duckduckgo/app/attributed/metrics/retention/RetentionMonthAttributedMetric.kt:83` 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.
Off the main sequence: :app-store — :app-store: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 6 project(s), so it's rigid to change.
Off the main sequence: :browser:browser-feature-toggles — :browser:browser-feature-toggles: abstractness 1.00, instability 1.00, distance 1.00 — zone of uselessness — abstract and unstable, so it's likely unused.
Off the main sequence: :content-scope-privacy-features:content-scope-privacy-features-impl — :content-scope-privacy-features:content-scope-privacy-features-impl: abstractness 1.00, instability 1.00, distance 1.00 — zone of uselessness — abstract and unstable, so it's likely unused.
Duplicated block (37 lines × 2) android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/compose/sheets/DaxActionBottomSheetDialog.kt:154— android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/compose/sheets/DaxActionBottomSheetDialog.kt:154-190 | android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/compose/sheets/DaxActionBottomSheetDialog.kt:248-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. Read the line range as the matched WINDOW rather than a finished unit: at `android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/compose/sheets/DaxActionBottomSheetDialog.kt:154` 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 (37 lines × 2) subscriptions/subscriptions-internal/src/main/java/com/duckduckgo/subscriptions/internal/settings/SwitchSubscriptionProductView.kt:208— subscriptions/subscriptions-internal/src/main/java/com/duckduckgo/subscriptions/internal/settings/SwitchSubscriptionProductView.kt:208-244 | subscriptions/subscriptions-internal/src/main/java/com/duckduckgo/subscriptions/internal/settings/SwitchSubscriptionView.kt:208-244 — before extracting anything, compare `subscriptions/subscriptions-internal/src/main/java/com/duckduckgo/subscriptions/internal/settings/SwitchSubscriptionProductView.kt` and `subscriptions/subscriptions-internal/src/main/java/com/duckduckgo/subscriptions/internal/settings/SwitchSubscriptionView.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 233 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 `subscriptions/subscriptions-internal/src/main/java/com/duckduckgo/subscriptions/internal/settings/SwitchSubscriptionProductView.kt:208` 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 (29 lines × 2) subscriptions/subscriptions-internal/src/main/java/com/duckduckgo/subscriptions/internal/settings/SwitchSubscriptionProductView.kt:72— subscriptions/subscriptions-internal/src/main/java/com/duckduckgo/subscriptions/internal/settings/SwitchSubscriptionProductView.kt:72-100 | subscriptions/subscriptions-internal/src/main/java/com/duckduckgo/subscriptions/internal/settings/SwitchSubscriptionView.kt:72-100 — before extracting anything, compare `subscriptions/subscriptions-internal/src/main/java/com/duckduckgo/subscriptions/internal/settings/SwitchSubscriptionProductView.kt` and `subscriptions/subscriptions-internal/src/main/java/com/duckduckgo/subscriptions/internal/settings/SwitchSubscriptionView.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 233 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 `subscriptions/subscriptions-internal/src/main/java/com/duckduckgo/subscriptions/internal/settings/SwitchSubscriptionProductView.kt: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.
Duplicated block (29 lines × 2) subscriptions/subscriptions-internal/src/main/java/com/duckduckgo/subscriptions/internal/settings/SwitchSubscriptionProductView.kt:297— subscriptions/subscriptions-internal/src/main/java/com/duckduckgo/subscriptions/internal/settings/SwitchSubscriptionProductView.kt:297-325 | subscriptions/subscriptions-internal/src/main/java/com/duckduckgo/subscriptions/internal/settings/SwitchSubscriptionView.kt:297-325 — before extracting anything, compare `subscriptions/subscriptions-internal/src/main/java/com/duckduckgo/subscriptions/internal/settings/SwitchSubscriptionProductView.kt` and `subscriptions/subscriptions-internal/src/main/java/com/duckduckgo/subscriptions/internal/settings/SwitchSubscriptionView.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 233 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.
Duplicated block (20–21 lines × 2) android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/shape/DaxBubbleLeftEdgeTreatment.kt:52— android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/shape/DaxBubbleLeftEdgeTreatment.kt:52-72 | android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/shape/DaxBubbleTopEdgeTreatment.kt:48-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 `android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/shape/DaxBubbleLeftEdgeTreatment.kt:52` 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 (20–21 lines × 2) app/src/main/java/com/duckduckgo/app/browser/BrowserTabFragment.kt:5441— app/src/main/java/com/duckduckgo/app/browser/BrowserTabFragment.kt:5441-5460 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/contextual/DuckChatContextualWebViewFragment.kt:812-832 — 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 `app/src/main/java/com/duckduckgo/app/browser/BrowserTabFragment.kt:5441` 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 (15 lines × 3) autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/sync/CredentialsSyncPausedView.kt:71— autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/sync/CredentialsSyncPausedView.kt:71-85 | saved-sites/saved-sites-impl/src/main/java/com/duckduckgo/savedsites/impl/sync/SavedSiteInvalidItemsView.kt:73-87 | saved-sites/saved-sites-impl/src/main/java/com/duckduckgo/savedsites/impl/sync/SavedSiteSyncPausedView.kt:71-85 — 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. 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 (15 lines × 3) duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/nativeinput/views/AttachmentView.kt:331— duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/nativeinput/views/AttachmentView.kt:331-345 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/nativeinput/views/OptionsView.kt:233-247 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/nativeinput/views/ReasoningModePickerView.kt:178-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 all 3 call sites, so a change lands once.
Duplicated block (13–14 lines × 2) android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/shape/DaxBubbleLeftEdgeTreatment.kt:76— android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/shape/DaxBubbleLeftEdgeTreatment.kt:76-89 | android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/shape/DaxBubbleTopEdgeTreatment.kt:59-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. Read the line range as the matched WINDOW rather than a finished unit: at `android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/shape/DaxBubbleLeftEdgeTreatment.kt:76` 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–14 lines × 2) app/src/main/java/com/duckduckgo/app/systemsearch/SystemSearchActivity.kt:655— app/src/main/java/com/duckduckgo/app/systemsearch/SystemSearchActivity.kt:655-667 | saved-sites/saved-sites-impl/src/main/java/com/duckduckgo/savedsites/impl/bookmarks/BookmarksActivity.kt:681-694 — 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 `app/src/main/java/com/duckduckgo/app/systemsearch/SystemSearchActivity.kt:655` 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: `R` names `com.duckduckgo.app.browser.R` in one and `com.duckduckgo.saved.sites.impl.R` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (12–13 lines × 2) subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/SubscriptionsManager.kt:600— subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/SubscriptionsManager.kt:600-611 | subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/SubscriptionsManager.kt:861-873 — 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 `subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/SubscriptionsManager.kt:600` 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–13 lines × 2) subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/repository/AuthRepository.kt:238— subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/repository/AuthRepository.kt:238-249 | subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/repository/AuthRepository.kt:368-380 — 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 `subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/repository/AuthRepository.kt:238` 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 × 4) duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/nativeinput/views/AttachmentView.kt:332— duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/nativeinput/views/AttachmentView.kt:332-343 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/nativeinput/views/ModelPickerView.kt:337-348 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/nativeinput/views/OptionsView.kt:234-245 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/nativeinput/views/ReasoningModePickerView.kt:179-190 — 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 `duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/nativeinput/views/AttachmentView.kt:332` 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 × 4) sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/ui/pairing/process/ProcessSyncCodeContract.kt:40— sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/ui/pairing/process/ProcessSyncCodeContract.kt:40-51 | sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/ui/pairing/read/ReadSyncCodeContract.kt:38-49 | sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/ui/pairing/recover/RecoverSyncedDataContract.kt:41-52 | sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/ui/pairing/show/DisplayQrCodeContract.kt:38-49 — before extracting anything, compare `sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/ui/pairing/process/ProcessSyncCodeContract.kt` and `sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/ui/pairing/recover/RecoverSyncedDataContract.kt` 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. 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 `sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/ui/pairing/process/ProcessSyncCodeContract.kt:40` 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: `Output` names `com.duckduckgo.sync.impl.ui.pairing.process.ProcessSyncCodeContract.Output` in one and `com.duckduckgo.sync.impl.ui.pairing.read.ReadSyncCodeContract.Output` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (11–12 lines × 2) app/src/main/java/com/duckduckgo/app/browser/favicon/DuckDuckGoFaviconManager.kt:121— app/src/main/java/com/duckduckgo/app/browser/favicon/DuckDuckGoFaviconManager.kt:121-132 | app/src/main/java/com/duckduckgo/app/browser/favicon/DuckDuckGoFaviconManager.kt:147-157 — 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 `app/src/main/java/com/duckduckgo/app/browser/favicon/DuckDuckGoFaviconManager.kt:121` 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–12 lines × 2) pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/common/actions/BrokerActionFailedEventHandler.kt:135— pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/common/actions/BrokerActionFailedEventHandler.kt:135-146 | pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/common/actions/CaptchaInfoReceivedEventHandler.kt:59-69 — 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 `pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/common/actions/BrokerActionFailedEventHandler.kt: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. 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 × 5) app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/ui/onboarding/VpnOnboardingActivity.kt:121— app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/ui/onboarding/VpnOnboardingActivity.kt:121-126 | autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/service/AutofillProviderChooseActivity.kt:116-121 | autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/service/AutofillProviderFillSuggestionActivity.kt:81-86 | dax-prompts/dax-prompts-impl/src/main/java/com/duckduckgo/daxprompts/impl/ui/DaxPromptBrowserComparisonActivity.kt:154-159 | pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/dashboard/PirDashboardWebViewActivity.kt:195-200 — before extracting anything, compare `autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/service/AutofillProviderChooseActivity.kt` and `autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/service/AutofillProviderFillSuggestionActivity.kt` as WHOLE FILES: 84% 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 (6 lines × 5) app/src/main/java/com/duckduckgo/app/browser/defaultbrowsing/DefaultBrowserChangedSurveyNotification.kt:93— app/src/main/java/com/duckduckgo/app/browser/defaultbrowsing/DefaultBrowserChangedSurveyNotification.kt:93-98 | app/src/main/java/com/duckduckgo/app/notification/model/ClearDataNotification.kt:107-114 | app/src/main/java/com/duckduckgo/app/notification/model/PrivacyProtectionNotification.kt:116-123 | app/src/main/java/com/duckduckgo/app/survey/notification/SurveyAvailableNotification.kt:101-108 | subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/notification/VpnReminderNotification.kt:129-136 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 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 5 times. 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 × 5) app/src/main/java/com/duckduckgo/app/settings/SettingsNewTabShortcutPlugin.kt:62— app/src/main/java/com/duckduckgo/app/settings/SettingsNewTabShortcutPlugin.kt:62-68 | autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/newtab/AutofillNewTabShortcut.kt:63-69 | downloads/downloads-impl/src/main/java/com/duckduckgo/downloads/impl/DownloadsNewTabShortcutPlugin.kt:61-67 | new-tab-page/new-tab-page-impl/src/main/java/com/duckduckgo/newtabpage/impl/shortcuts/NewTabShortcuts.kt:65-71 | saved-sites/saved-sites-impl/src/main/java/com/duckduckgo/savedsites/impl/newtab/BookmarksShortcut.kt:67-73 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 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 5 times.
Duplicated block (7 lines × 5) lint-rules/src/main/java/com/duckduckgo/lint/ui/NoMaterial3CheckboxUsageDetector.kt:42— lint-rules/src/main/java/com/duckduckgo/lint/ui/NoMaterial3CheckboxUsageDetector.kt:42-48 | lint-rules/src/main/java/com/duckduckgo/lint/ui/NoMaterial3CircularProgressIndicatorUsageDetector.kt:42-48 | lint-rules/src/main/java/com/duckduckgo/lint/ui/NoMaterial3RadioButtonUsageDetector.kt:42-48 | lint-rules/src/main/java/com/duckduckgo/lint/ui/NoMaterial3ScaffoldUsageDetector.kt:42-48 | lint-rules/src/main/java/com/duckduckgo/lint/ui/NoMaterial3SwitchUsageDetector.kt:42-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 all 5 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `lint-rules/src/main/java/com/duckduckgo/lint/ui/NoMaterial3CheckboxUsageDetector.kt: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. 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.
DM10 · One transaction, one aggregate· One operation mutates 2 aggregates · ×2
One operation mutates 2 aggregates: RealSavedSitesRepository.insertFolderBranch saved-sites/saved-sites-impl/src/main/java/com/duckduckgo/savedsites/impl/SavedSitesRepository.kt:158— `RealSavedSitesRepository.insertFolderBranch` saves `BookmarkFolder`, `Bookmark` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event.
One operation mutates 2 aggregates: RealSavedSitesRepository.deleteFolderBranch saved-sites/saved-sites-impl/src/main/java/com/duckduckgo/savedsites/impl/SavedSitesRepository.kt:209— `RealSavedSitesRepository.deleteFolderBranch` saves `BookmarkFolder`, `Bookmark` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event.
Outbound HTTP without resilience app/src/main/java/com/duckduckgo/app/di/NetworkModule.kt:119— `Retrofit.Builder(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience app/src/main/java/com/duckduckgo/app/di/NetworkModule.kt:135— `Retrofit.Builder(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
X17 · Uncapped recursion over a caller-supplied document· Recursive walk over a caller-supplied document has no depth cap · ×2
Recursive walk over a caller-supplied document has no depth cap lint-rules/src/main/java/com/duckduckgo/lint/strings/PlaceholderDetector.kt:75— `visitDocument` is public, takes a document from its caller (line 42) and hands it to `visitNode`, which calls itself at line 75 with a piece of `node` — the function is not `tailrec`, so every call is a real frame — and nowhere in `visitNode` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. On the JVM's default 1 MB thread stack a recursive walk throws `StackOverflowError` from about 500–2,000 levels on a cold first call and 6,000–17,000 once warmed up (OpenJDK 21 and 25; Android's threads are smaller). kotlinx.serialization's `parseToJsonElement` accepts nested arrays to any depth and Android's built-in `org.json` sets no limit, while Jackson 2.15+ stops at 1,000 — on a cold JVM past the point the walk fails; Gson 2.12+ and Moshi stop at 255. `StackOverflowError` is an `Error`, not an `Exception`: a `catch (e: Exception)` around the call does not stop it, and on Android an uncaught one ends the process. Thread a depth argument through `visitNode` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack or a `DeepRecursiveFunction`.
Recursive walk over a caller-supplied document has no depth cap lint-rules/src/main/java/com/duckduckgo/lint/strings/MissingInstructionDetector.kt:96— `visitDocument` is public, takes a document from its caller (line 42) and hands it to `visitNode`, which calls itself at line 96 with a piece of `node` — the function is not `tailrec`, so every call is a real frame — and nowhere in `visitNode` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. On the JVM's default 1 MB thread stack a recursive walk throws `StackOverflowError` from about 500–2,000 levels on a cold first call and 6,000–17,000 once warmed up (OpenJDK 21 and 25; Android's threads are smaller). kotlinx.serialization's `parseToJsonElement` accepts nested arrays to any depth and Android's built-in `org.json` sets no limit, while Jackson 2.15+ stops at 1,000 — on a cold JVM past the point the walk fails; Gson 2.12+ and Moshi stop at 255. `StackOverflowError` is an `Error`, not an `Exception`: a `catch (e: Exception)` around the call does not stop it, and on Android an uncaught one ends the process. Thread a depth argument through `visitNode` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack or a `DeepRecursiveFunction`.
Swallowed exception (empty catch) android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/ViewExtension.kt:92— 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) network-protection/network-protection-impl/src/main/java/com/wireguard/config/InetAddresses.kt:26— 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.
BrowserTabFragment.processCommand (cyclomatic 156) app/src/main/java/com/duckduckgo/app/browser/BrowserTabFragment.kt:2685— BrowserTabFragment.processCommand has cyclomatic complexity 156 (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.
DuckAiNativeStorageJsMessageHandler.getJsMessageHandler (cyclomatic 61) duckchat/duckchat-store/src/main/java/com/duckduckgo/duckchat/store/impl/handler/DuckAiNativeStorageJsMessageHandler.kt:51— DuckAiNativeStorageJsMessageHandler.getJsMessageHandler has cyclomatic complexity 61 (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.
InternalNanoServer.serve (cyclomatic 45) duckchat/duckchat-internal/src/main/java/com/duckduckgo/duckchat/internal/store/DuckAiDebugServer.kt:108— InternalNanoServer.serve has cyclomatic complexity 45 (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.
RealDuckChatJSHelper.processJsCallbackMessage (cyclomatic 44) duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/helper/DuckChatJSHelper.kt:156— RealDuckChatJSHelper.processJsCallbackMessage has cyclomatic complexity 44 (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.
BrowserWebViewClient.shouldOverride (cyclomatic 44) app/src/main/java/com/duckduckgo/app/browser/BrowserWebViewClient.kt:299— BrowserWebViewClient.shouldOverride has cyclomatic complexity 44 (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.
RealDuckChatPixels.sendReportMetricPixel (cyclomatic 41) duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/pixel/DuckChatPixels.kt:445— RealDuckChatPixels.sendReportMetricPixel has cyclomatic complexity 41 (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.
DuckPlayerJSHelper.processJsCallbackMessage (cyclomatic 37) app/src/main/java/com/duckduckgo/app/browser/duckplayer/DuckPlayerJSHelper.kt:180— DuckPlayerJSHelper.processJsCallbackMessage has cyclomatic complexity 37 (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.
BrowserTabViewModel.submitQuery (cyclomatic 34) app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt:1474— BrowserTabViewModel.submitQuery 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.
BrowserActivity.processIntent (cyclomatic 28) app/src/main/java/com/duckduckgo/app/browser/BrowserActivity.kt:798— BrowserActivity.processIntent 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.
SyncActivity.processCommand (cyclomatic 26) sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/ui/dashboard/SyncActivity.kt:388— SyncActivity.processCommand has cyclomatic complexity 26 (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.
ExecuteBrokerStepActionEventHandler.invoke (cyclomatic 26) pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/common/actions/ExecuteBrokerStepActionEventHandler.kt:78— ExecuteBrokerStepActionEventHandler.invoke 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.
BrowserTabViewModel.processJsCallbackMessage (cyclomatic 26) app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt:5119— BrowserTabViewModel.processJsCallbackMessage 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.
UsageWarningPixelsKt.pixelName (cyclomatic 25) duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/nativeinput/footer/usagewarnings/UsageWarningPixels.kt:82— UsageWarningPixelsKt.pixelName has cyclomatic complexity 25 (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.
RealPirJobsRunner.runEligibleJobs (cyclomatic 24) pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/scheduling/PirJobsRunner.kt:104— RealPirJobsRunner.runEligibleJobs has cyclomatic complexity 24 (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.
RealSecureStorageKeyStore.getKey (cyclomatic 24) autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/store/keys/SecureStorageKeyStore.kt:383— RealSecureStorageKeyStore.getKey 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.
RealOnboardingPixelSender.fire (cyclomatic 24) app/src/main/java/com/duckduckgo/app/onboarding/ui/page/OnboardingPixelSender.kt:173— RealOnboardingPixelSender.fire 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.
SitePermissionsDialogActivityLauncher.showSystemPermissionsDeniedDialog (cyclomatic 23) site-permissions/site-permissions-impl/src/main/java/com/duckduckgo/site/permissions/impl/SitePermissionsDialogActivityLauncher.kt:823— SitePermissionsDialogActivityLauncher.showSystemPermissionsDeniedDialog has cyclomatic complexity 23 (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.
ContributesRemoteFeatureProcessor.validateRemoteFeatureInterface (cyclomatic 22) codegen/codegen-ksp/src/main/java/com/duckduckgo/codegen/ksp/ContributesRemoteFeatureProcessor.kt:137— ContributesRemoteFeatureProcessor.validateRemoteFeatureInterface 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.
SpecialUrlDetectorImpl.determineType (cyclomatic 22) app/src/main/java/com/duckduckgo/app/browser/SpecialUrlDetector.kt:56— SpecialUrlDetectorImpl.determineType 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.
SyncInternalSettingsViewModel.withBlockStoreChecklistText (cyclomatic 21) sync/sync-internal/src/main/java/com/duckduckgo/sync/internal/ui/SyncInternalSettingsViewModel.kt:1050— SyncInternalSettingsViewModel.withBlockStoreChecklistText has cyclomatic complexity 21 (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.
CtaViewModel.getBrowserCta (cyclomatic 21) app/src/main/java/com/duckduckgo/app/cta/ui/CtaViewModel.kt:469— CtaViewModel.getBrowserCta 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.
SubscriptionSettingsActivity.renderView (cyclomatic 20) subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/ui/SubscriptionSettingsActivity.kt:190— SubscriptionSettingsActivity.renderView 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.
RealDuckChat.cacheUserSettings (cyclomatic 20) duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/RealDuckChat.kt:1044— RealDuckChat.cacheUserSettings 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.
DaxBubbleCta.showCta (cyclomatic 20) app/src/main/java/com/duckduckgo/app/cta/ui/Cta.kt:1030— DaxBubbleCta.showCta 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.
StickyHeadersLinearLayoutManager.updateStickyHeader (cyclomatic 20) android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/recyclerviewext/StickyHeadersLinearLayoutManager.kt:326— StickyHeadersLinearLayoutManager.updateStickyHeader 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.
RealSegmentCalculation.getSegments (cyclomatic 19) statistics/statistics-impl/src/main/java/com/duckduckgo/app/statistics/user_segments/SegmentCalculation.kt:212— RealSegmentCalculation.getSegments 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.
BrowserActivity.setupFireDialogListener (cyclomatic 19) app/src/main/java/com/duckduckgo/app/browser/BrowserActivity.kt:492— BrowserActivity.setupFireDialogListener 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.
WebViewRequestInterceptor.shouldIntercept (cyclomatic 19) app/src/main/java/com/duckduckgo/app/browser/WebViewRequestInterceptor.kt:143— WebViewRequestInterceptor.shouldIntercept has cyclomatic complexity 19 (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.
RealNativeInputManager.showNativeInput (cyclomatic 19) app/src/main/java/com/duckduckgo/app/browser/nativeinput/NativeInputManager.kt:564— RealNativeInputManager.showNativeInput has cyclomatic complexity 19 (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.
DragLinearLayout.onDrag (cyclomatic 18) new-tab-page/new-tab-page-impl/src/main/java/com/duckduckgo/newtabpage/impl/settings/DragLinearLayout.kt:190— DragLinearLayout.onDrag 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.
DragLinearLayout.onTouchEvent (cyclomatic 18) new-tab-page/new-tab-page-impl/src/main/java/com/duckduckgo/newtabpage/impl/settings/DragLinearLayout.kt:454— DragLinearLayout.onTouchEvent 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.
RealAutoCompleteScorer.score (cyclomatic 18) app/src/main/java/com/duckduckgo/app/autocomplete/api/AutoCompleteScorer.kt:36— RealAutoCompleteScorer.score 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.
pageload_benchmark.discover_artifacts (cyclomatic 18) perf-benchmarks/pageload_benchmark.py:200— pageload_benchmark.discover_artifacts 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.
update_pir_brokers.main (cyclomatic 18) scripts/pir-broker-update/update_pir_brokers.py:62— update_pir_brokers.main has cyclomatic complexity 18 (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.
ps_review_anomaly.analyze_anomalies (cyclomatic 18) scripts/ps-analysis/ps_review_anomaly.py:66— ps_review_anomaly.analyze_anomalies 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.
RealSyncCodeDispatcher.mapV2Transition (cyclomatic 17) sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/RealSyncCodeDispatcher.kt:306— RealSyncCodeDispatcher.mapV2Transition 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.
DragLinearLayout.onInterceptTouchEvent (cyclomatic 17) new-tab-page/new-tab-page-impl/src/main/java/com/duckduckgo/newtabpage/impl/settings/DragLinearLayout.kt:387— DragLinearLayout.onInterceptTouchEvent 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.
DenyListConfig.visitor (cyclomatic 17) lint-rules/src/main/java/com/duckduckgo/lint/DenyListedApiDetector.kt:176— DenyListConfig.visitor 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.
DuckChatContextualWebViewFragment.onViewCreated (cyclomatic 17) duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/contextual/DuckChatContextualWebViewFragment.kt:258— DuckChatContextualWebViewFragment.onViewCreated 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. This is NOT this file's highest cyclomatic complexity: DuckChatContextualWebViewFragment.observeViewModel (cyclomatic 18) 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.
UsageLimitFooterPlugin.createFooter (cyclomatic 17) duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/nativeinput/footer/usagelimits/UsageLimitFooterPlugin.kt:88— UsageLimitFooterPlugin.createFooter 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.
BrowserTabViewModel.triggerAutocomplete (cyclomatic 17) app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt:3075— BrowserTabViewModel.triggerAutocomplete 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.
BrowserTabViewModel.processContentScopeMessages (cyclomatic 17) app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt:5062— BrowserTabViewModel.processContentScopeMessages 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.
SingleTabFireDialogViewModel.mapToViewState (cyclomatic 17) app/src/main/java/com/duckduckgo/app/global/view/SingleTabFireDialogViewModel.kt:381— SingleTabFireDialogViewModel.mapToViewState has cyclomatic complexity 17 (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.
TabSwitcherAdapter.getItemViewType (cyclomatic 17) app/src/main/java/com/duckduckgo/app/tabs/ui/TabSwitcherAdapter.kt:169— TabSwitcherAdapter.getItemViewType 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.
SwitchSubscriptionProductView.getAvailablePlans (cyclomatic 16) subscriptions/subscriptions-internal/src/main/java/com/duckduckgo/subscriptions/internal/settings/SwitchSubscriptionProductView.kt:194— SwitchSubscriptionProductView.getAvailablePlans 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.
SwitchSubscriptionView.getAvailablePlans (cyclomatic 16) subscriptions/subscriptions-internal/src/main/java/com/duckduckgo/subscriptions/internal/settings/SwitchSubscriptionView.kt:194— SwitchSubscriptionView.getAvailablePlans 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.
SubscriptionWebViewViewModel.featureSelected (cyclomatic 16) subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/ui/SubscriptionWebViewViewModel.kt:301— SubscriptionWebViewViewModel.featureSelected 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.
RealNativeInputAnimator.animateNavBarVisibility (cyclomatic 16) app/src/main/java/com/duckduckgo/app/browser/nativeinput/NativeInputAnimator.kt:195— RealNativeInputAnimator.animateNavBarVisibility 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.
QueryUrlConverter.convertQueryToUrl (cyclomatic 16) app/src/main/java/com/duckduckgo/app/browser/omnibar/QueryUrlConverter.kt:65— QueryUrlConverter.convertQueryToUrl 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.
BrandDesignAddressBarPositionPicker.drawableRes (cyclomatic 16) app/src/main/java/com/duckduckgo/app/onboardingquicksetup/ui/BrandDesignAddressBarPositionPicker.kt:120— BrandDesignAddressBarPositionPicker.drawableRes 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.
FragmentMaxLifecycleEnforcer.updateFragmentMaxLifecycle (cyclomatic 16) app/src/main/java/com/duckduckgo/app/browser/tabs/adapter/FragmentStateAdapter.java:791— FragmentMaxLifecycleEnforcer.updateFragmentMaxLifecycle has cyclomatic complexity 16 (threshold 15). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
DuckAiNativeStorageJsMessageHandler.getJsMessageHandler (cognitive 96) duckchat/duckchat-store/src/main/java/com/duckduckgo/duckchat/store/impl/handler/DuckAiNativeStorageJsMessageHandler.kt:51— DuckAiNativeStorageJsMessageHandler.getJsMessageHandler has cognitive complexity 96 (threshold 15). Drivers by points: error handling 20 (49 pts), if/else 25 (44 pts), match/switch 2 (3 pts) (nesting depth added 49). 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.
BrowserActivity.processIntent (cognitive 58) app/src/main/java/com/duckduckgo/app/browser/BrowserActivity.kt:798— BrowserActivity.processIntent has cognitive complexity 58 (threshold 15). Drivers by points: if/else 31 (56 pts), boolean chains 2 (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.
DuckPlayerJSHelper.processJsCallbackMessage (cognitive 55) app/src/main/java/com/duckduckgo/app/browser/duckplayer/DuckPlayerJSHelper.kt:180— DuckPlayerJSHelper.processJsCallbackMessage has cognitive complexity 55 (threshold 15). Drivers by points: if/else 20 (39 pts), match/switch 6 (12 pts), boolean chains 4 (nesting depth added 25). 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.
RealDuckChatJSHelper.processJsCallbackMessage (cognitive 49) duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/helper/DuckChatJSHelper.kt:156— RealDuckChatJSHelper.processJsCallbackMessage has cognitive complexity 49 (threshold 15). Drivers by points: if/else 20 (39 pts), match/switch 3 (6 pts), boolean chains 4 (nesting depth added 22). 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.
StickyHeadersLinearLayoutManager.updateStickyHeader (cognitive 47) android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/recyclerviewext/StickyHeadersLinearLayoutManager.kt:326— StickyHeadersLinearLayoutManager.updateStickyHeader has cognitive complexity 47 (threshold 15). Drivers by points: if/else 14 (39 pts), boolean chains 6, loops 1 (2 pts) (nesting depth added 26). 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.
RealSecureStorageKeyStore.getKey (cognitive 45) autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/store/keys/SecureStorageKeyStore.kt:383— RealSecureStorageKeyStore.getKey has cognitive complexity 45 (threshold 15). Drivers by points: if/else 21 (40 pts), boolean chains 3, match/switch 1 (2 pts) (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.
ExecuteBrokerStepActionEventHandler.invoke (cognitive 43) pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/common/actions/ExecuteBrokerStepActionEventHandler.kt:78— ExecuteBrokerStepActionEventHandler.invoke has cognitive complexity 43 (threshold 15). Drivers by points: if/else 17 (30 pts), boolean chains 9, match/switch 1 (4 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.
BrowserWebViewClient.shouldOverride (cognitive 43) app/src/main/java/com/duckduckgo/app/browser/BrowserWebViewClient.kt:299— BrowserWebViewClient.shouldOverride has cognitive complexity 43 (threshold 15). Drivers by points: if/else 17 (26 pts), boolean chains 12, match/switch 2 (4 pts), 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.
BrowserTabViewModel.submitQuery (cognitive 40) app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt:1474— BrowserTabViewModel.submitQuery has cognitive complexity 40 (threshold 15). Drivers by points: if/else 27 (34 pts), boolean chains 3, match/switch 3 (nesting depth added 7). 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.
BrowserTabFragment.processCommand (cognitive 39) app/src/main/java/com/duckduckgo/app/browser/BrowserTabFragment.kt:2685— BrowserTabFragment.processCommand has cognitive complexity 39 (threshold 15). Drivers by points: if/else 21 (36 pts), boolean chains 2, match/switch 1 (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.
DragLinearLayout.onDrag (cognitive 38) new-tab-page/new-tab-page-impl/src/main/java/com/duckduckgo/newtabpage/impl/settings/DragLinearLayout.kt:190— DragLinearLayout.onDrag has cognitive complexity 38 (threshold 15). Drivers by points: if/else 18 (32 pts), boolean chains 6 (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.
InternalNanoServer.serve (cognitive 36) duckchat/duckchat-internal/src/main/java/com/duckduckgo/duckchat/internal/store/DuckAiDebugServer.kt:108— InternalNanoServer.serve has cognitive complexity 36 (threshold 15). Drivers by points: boolean chains 19, if/else 10 (15 pts), error handling 1, match/switch 1 (nesting depth added 5). 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.
RealAutoCompleteScorer.score (cognitive 35) app/src/main/java/com/duckduckgo/app/autocomplete/api/AutoCompleteScorer.kt:36— RealAutoCompleteScorer.score has cognitive complexity 35 (threshold 15). Drivers by points: if/else 14 (29 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 17). 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.
SubscriptionSettingsActivity.renderView (cognitive 34) subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/ui/SubscriptionSettingsActivity.kt:190— SubscriptionSettingsActivity.renderView has cognitive complexity 34 (threshold 15). Drivers by points: if/else 14 (18 pts), match/switch 5 (14 pts), boolean chains 2 (nesting depth added 13). 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.
ps_review_anomaly.fetch_reviews_all_languages_countries (cognitive 34) scripts/ps-analysis/ps_review_anomaly.py:8— ps_review_anomaly.fetch_reviews_all_languages_countries has cognitive complexity 34 (threshold 15). Drivers by points: if/else 5 (19 pts), loops 3 (6 pts), boolean chains 4, error handling 1 (3 pts), ternaries 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.
PrivacyDashboardHybridViewModel.onPrivacyProtectionsClicked (cognitive 32) privacy-dashboard/privacy-dashboard-impl/src/main/java/com/duckduckgo/privacy/dashboard/impl/ui/PrivacyDashboardHybridViewModel.kt:306— PrivacyDashboardHybridViewModel.onPrivacyProtectionsClicked has cognitive complexity 32 (threshold 15). Drivers by points: if/else 15 (26 pts), match/switch 2 (6 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.
RealPirJobsRunner.runEligibleJobs (cognitive 32) pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/scheduling/PirJobsRunner.kt:104— RealPirJobsRunner.runEligibleJobs has cognitive complexity 32 (threshold 15). Drivers by points: if/else 16 (20 pts), error handling 6 (8 pts), boolean chains 4 (nesting depth added 6). 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.
ContributesRemoteFeatureProcessor.validateRemoteFeatureInterface (cognitive 32) codegen/codegen-ksp/src/main/java/com/duckduckgo/codegen/ksp/ContributesRemoteFeatureProcessor.kt:137— ContributesRemoteFeatureProcessor.validateRemoteFeatureInterface has cognitive complexity 32 (threshold 15). Drivers by points: if/else 17 (28 pts), boolean chains 3, loops 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.
pageload_benchmark.discover_artifacts (cognitive 30) perf-benchmarks/pageload_benchmark.py:200— pageload_benchmark.discover_artifacts has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (23 pts), loops 3 (4 pts), boolean chains 3 (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.
RealSegmentCalculation.getSegments (cognitive 28) statistics/statistics-impl/src/main/java/com/duckduckgo/app/statistics/user_segments/SegmentCalculation.kt:212— RealSegmentCalculation.getSegments has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 5, loops 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.
DaxBubbleCta.showCta (cognitive 28) app/src/main/java/com/duckduckgo/app/cta/ui/Cta.kt:1030— DaxBubbleCta.showCta has cognitive complexity 28 (threshold 15). Drivers by points: if/else 19 (24 pts), boolean chains 4 (nesting depth added 5). 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.
WireguardHandshakeMonitor.startHandShakeMonitoring (cognitive 26) network-protection/network-protection-impl/src/main/java/com/duckduckgo/networkprotection/impl/pixels/WireguardHandshakeMonitor.kt:93— WireguardHandshakeMonitor.startHandShakeMonitoring has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (21 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 14). 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.
BrowserTabViewModel.processJsCallbackMessage (cognitive 26) app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt:5119— BrowserTabViewModel.processJsCallbackMessage has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (19 pts), match/switch 3 (4 pts), boolean chains 3 (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.
OmnibarLayoutViewModel.onOmnibarFocusChanged (cognitive 26) app/src/main/java/com/duckduckgo/app/browser/omnibar/OmnibarLayoutViewModel.kt:421— OmnibarLayoutViewModel.onOmnibarFocusChanged has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 5 (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.
update_pir_brokers.main (cognitive 26) scripts/pir-broker-update/update_pir_brokers.py:62— update_pir_brokers.main has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (17 pts), loops 5 (8 pts), boolean chains 1 (nesting depth added 7). 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.
ps_review_anomaly.analyze_anomalies (cognitive 26) scripts/ps-analysis/ps_review_anomaly.py:66— ps_review_anomaly.analyze_anomalies has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 8 (14 pts), if/else 4 (7 pts), loops 4 (5 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.
FavouritesNewTabSectionView.render (cognitive 25) saved-sites/saved-sites-impl/src/main/java/com/duckduckgo/savedsites/impl/newtab/FavouritesNewTabSectionView.kt:346— FavouritesNewTabSectionView.render has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (25 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.
DragLinearLayout.onInterceptTouchEvent (cognitive 25) new-tab-page/new-tab-page-impl/src/main/java/com/duckduckgo/newtabpage/impl/settings/DragLinearLayout.kt:387— DragLinearLayout.onInterceptTouchEvent has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (24 pts), match/switch 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.
ConfigurableNewTabPageView.render (cognitive 25) new-tab-page/new-tab-page-impl/src/main/java/com/duckduckgo/newtabpage/impl/view/ConfigurableNewTabPageView.kt:95— ConfigurableNewTabPageView.render has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (24 pts), boolean chains 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.
QueryUrlConverter.convertQueryToUrl (cognitive 24) app/src/main/java/com/duckduckgo/app/browser/omnibar/QueryUrlConverter.kt:65— QueryUrlConverter.convertQueryToUrl has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 5, loops 1 (4 pts), 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.
CtaViewModel.getBrowserCta (cognitive 24) app/src/main/java/com/duckduckgo/app/cta/ui/CtaViewModel.kt:469— CtaViewModel.getBrowserCta has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 8 (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.
AutofillServiceViewNodeClassifier.classify (cognitive 23) autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/service/ViewNodeClassifier.kt:36— AutofillServiceViewNodeClassifier.classify has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 6 (nesting depth added 9). 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.
BrowserTabFragmentRenderer.renderBrowserViewState (cognitive 23) app/src/main/java/com/duckduckgo/app/browser/BrowserTabFragment.kt:6214— BrowserTabFragmentRenderer.renderBrowserViewState has cognitive complexity 23 (threshold 15). Drivers by points: if/else 15 (22 pts), 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.
WebViewLongPressHandler.handleLongPress (cognitive 23) app/src/main/java/com/duckduckgo/app/browser/WebViewLongPressHandler.kt:66— WebViewLongPressHandler.handleLongPress has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 1, match/switch 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.
RealNativeInputManager.showNativeInput (cognitive 23) app/src/main/java/com/duckduckgo/app/browser/nativeinput/NativeInputManager.kt:564— RealNativeInputManager.showNativeInput has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 6 (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.
ps_review_anomaly.main (cognitive 23) scripts/ps-analysis/ps_review_anomaly.py:143— ps_review_anomaly.main has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 3 (6 pts), ternaries 2 (4 pts), boolean chains 2 (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.
RealVoiceSearchActivityLauncher.registerResultsCallback (cognitive 22) voice-search/voice-search-impl/src/main/java/com/duckduckgo/voice/impl/VoiceSearchActivityLauncher.kt:68— RealVoiceSearchActivityLauncher.registerResultsCallback has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (15 pts), match/switch 2 (7 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.
DragLinearLayout.onTouchEvent (cognitive 22) new-tab-page/new-tab-page-impl/src/main/java/com/duckduckgo/newtabpage/impl/settings/DragLinearLayout.kt:454— DragLinearLayout.onTouchEvent has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 1, 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.
RealEventHubPixelManager.handleWebEvent (cognitive 22) event-hub/event-hub-impl/src/main/java/com/duckduckgo/eventhub/impl/pixels/EventHubPixelManager.kt:118— RealEventHubPixelManager.handleWebEvent has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 2 (3 pts), boolean chains 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.
RealDuckChat.cacheUserSettings (cognitive 22) duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/RealDuckChat.kt:1044— RealDuckChat.cacheUserSettings has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 16, if/else 5 (6 pts) (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.
BrowserTabViewModel.processContentScopeMessages (cognitive 22) app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt:5062— BrowserTabViewModel.processContentScopeMessages has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (11 pts), match/switch 4 (8 pts), boolean chains 3 (nesting depth added 11). 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.
RealOnboardingPixelSender.fire (cognitive 22) app/src/main/java/com/duckduckgo/app/onboarding/ui/page/OnboardingPixelSender.kt:173— RealOnboardingPixelSender.fire has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (21 pts), match/switch 1 (nesting depth added 7). 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.
clipboard_polyfill.navigator.clipboard.write (cognitive 22) app/src/main/res/raw/clipboard_polyfill.js:116— clipboard_polyfill.navigator.clipboard.write has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (14 pts), error handling 1 (4 pts), loops 2 (3 pts), boolean chains 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.
clipboard_polyfill_legacy.navigator.clipboard.write (cognitive 22) app/src/main/res/raw/clipboard_polyfill_legacy.js:52— clipboard_polyfill_legacy.navigator.clipboard.write has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (14 pts), error handling 1 (4 pts), loops 2 (3 pts), boolean chains 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.
RealClientBrandHintProvider.calculateBrandingChange (cognitive 21) user-agent/user-agent-impl/src/main/java/com/duckduckgo/user/agent/impl/ClientBrandHintProvider.kt:70— RealClientBrandHintProvider.calculateBrandingChange has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (21 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.
BrowserTabFragment.launchBottomSheetMenu (cognitive 21) app/src/main/java/com/duckduckgo/app/browser/BrowserTabFragment.kt:1940— BrowserTabFragment.launchBottomSheetMenu has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 5 (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.
WebViewRequestInterceptor.shouldIntercept (cognitive 21) app/src/main/java/com/duckduckgo/app/browser/WebViewRequestInterceptor.kt:143— WebViewRequestInterceptor.shouldIntercept has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 4 (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.
RealNativeInputAnimator.animateNavBarVisibility (cognitive 21) app/src/main/java/com/duckduckgo/app/browser/nativeinput/NativeInputAnimator.kt:195— RealNativeInputAnimator.animateNavBarVisibility has cognitive complexity 21 (threshold 15). Drivers by points: if/else 16 (18 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.
SingleTabFireDialogViewModel.onDeleteThisTabClicked (cognitive 21) app/src/main/java/com/duckduckgo/app/global/view/SingleTabFireDialogViewModel.kt:270— SingleTabFireDialogViewModel.onDeleteThisTabClicked has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15 (18 pts), error handling 1 (2 pts), 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.
UriExtensionKt.getEncodedQueryParameters (cognitive 20) common/common-utils/src/main/java/com/duckduckgo/common/utils/UriExtension.kt:205— UriExtensionKt.getEncodedQueryParameters has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 2, error handling 1, loops 1 (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.
RealSecureStorageKeyStore.updateKey (cognitive 20) autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/store/keys/SecureStorageKeyStore.kt:199— RealSecureStorageKeyStore.updateKey has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 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.
BrowserActivity.setupFireDialogListener (cognitive 20) app/src/main/java/com/duckduckgo/app/browser/BrowserActivity.kt:492— BrowserActivity.setupFireDialogListener has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (19 pts), 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.
OmnibarLayoutViewModel.onExternalOmnibarStateChanged (cognitive 20) app/src/main/java/com/duckduckgo/app/browser/omnibar/OmnibarLayoutViewModel.kt:888— OmnibarLayoutViewModel.onExternalOmnibarStateChanged has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 3, 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.
TabSwitcherItemDiffCallback.getChangePayload (cognitive 20) app/src/main/java/com/duckduckgo/app/browser/tabs/adapter/TabSwitcherItemDiffCallback.kt:56— TabSwitcherItemDiffCallback.getChangePayload has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 3, match/switch 1 (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.
ShowOnAppLaunchActivity.observeViewModel (cognitive 20) app/src/main/java/com/duckduckgo/app/generalsettings/showonapplaunch/ShowOnAppLaunchActivity.kt:116— ShowOnAppLaunchActivity.observeViewModel has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (17 pts), match/switch 2, boolean chains 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.
TdsClient.matchesTrackerEntry (cognitive 20) app/src/main/java/com/duckduckgo/app/trackerdetection/TdsClient.kt:89— TdsClient.matchesTrackerEntry has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (19 pts), 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.
DaxSecureTextFieldKt.DaxSecureTextField (cognitive 20) android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/compose/textfield/DaxSecureTextField.kt:136— DaxSecureTextFieldKt.DaxSecureTextField has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14, boolean chains 6. 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.
RealSubscriptionsManager.purchase (cognitive 19) subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/SubscriptionsManager.kt:1119— RealSubscriptionsManager.purchase has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (8 pts), error handling 3 (5 pts), boolean chains 3, match/switch 1 (3 pts) (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.
SitePermissionsDialogActivityLauncher.showSiteDrmPermissionsDialog (cognitive 19) site-permissions/site-permissions-impl/src/main/java/com/duckduckgo/site/permissions/impl/SitePermissionsDialogActivityLauncher.kt:387— SitePermissionsDialogActivityLauncher.showSiteDrmPermissionsDialog has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (19 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.
BrowserTabViewModel.triggerAutocomplete (cognitive 19) app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt:3075— BrowserTabViewModel.triggerAutocomplete has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 12, 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.
RealMaliciousSiteBlockerWebViewIntegration.shouldIntercept (cognitive 19) app/src/main/java/com/duckduckgo/app/browser/webview/MaliciousSiteBlockerWebViewIntegration.kt:147— RealMaliciousSiteBlockerWebViewIntegration.shouldIntercept has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (11 pts), match/switch 2 (5 pts), boolean chains 3 (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.
ContextualDaxDialogCta.showOnboardingCta (cognitive 19) app/src/main/java/com/duckduckgo/app/cta/ui/Cta.kt:220— ContextualDaxDialogCta.showOnboardingCta has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 2 (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.
SingleTabFireDialog.render (cognitive 19) app/src/main/java/com/duckduckgo/app/global/view/SingleTabFireDialog.kt:276— SingleTabFireDialog.render has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15 (18 pts), 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.
SingleTabFireDialogViewModel.mapToViewState (cognitive 19) app/src/main/java/com/duckduckgo/app/global/view/SingleTabFireDialogViewModel.kt:381— SingleTabFireDialogViewModel.mapToViewState has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 8, if/else 8, match/switch 2 (3 pts) (nesting depth added 1). 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.
FragmentMaxLifecycleEnforcer.updateFragmentMaxLifecycle (cognitive 19) app/src/main/java/com/duckduckgo/app/browser/tabs/adapter/FragmentStateAdapter.java:791— FragmentMaxLifecycleEnforcer.updateFragmentMaxLifecycle has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 3). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
RealUserAgentProvider.getUserAgent (cognitive 18) user-agent/user-agent-impl/src/main/java/com/duckduckgo/user/agent/impl/UserAgentProvider.kt:163— RealUserAgentProvider.getUserAgent has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 4, match/switch 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.
SyncInternalSettingsViewModel.withBlockStoreChecklistText (cognitive 18) sync/sync-internal/src/main/java/com/duckduckgo/sync/internal/ui/SyncInternalSettingsViewModel.kt:1050— SyncInternalSettingsViewModel.withBlockStoreChecklistText has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (12 pts), match/switch 5, boolean chains 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.
SavedSitesSyncDataProvider.getRequestEntriesFor (cognitive 18) saved-sites/saved-sites-impl/src/main/java/com/duckduckgo/savedsites/impl/sync/SavedSitesSyncDataProvider.kt:134— SavedSitesSyncDataProvider.getRequestEntriesFor has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), 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.
RemoteMessagingConfigMatcher.filterListItems (cognitive 18) remote-messaging/remote-messaging-impl/src/main/java/com/duckduckgo/remote/messaging/impl/RemoteMessagingConfigMatcher.kt:65— RemoteMessagingConfigMatcher.filterListItems has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 2, match/switch 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.
RealNetpEgressServersProvider.updateServerLocationsAndReturnPreferred (cognitive 18) network-protection/network-protection-impl/src/main/java/com/duckduckgo/networkprotection/impl/settings/geoswitching/NetpEgressServersProvider.kt:51— RealNetpEgressServersProvider.updateServerLocationsAndReturnPreferred has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (18 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.
SubscriptionOnboardingVpnFragment.animateBenefitsAndBlur (cognitive 18) network-protection/network-protection-impl/src/main/java/com/duckduckgo/networkprotection/impl/subscription/onboarding/SubscriptionOnboardingVpnFragment.kt:316— SubscriptionOnboardingVpnFragment.animateBenefitsAndBlur has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14 (18 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.
FeatureToggleInventoryActivity.buildFilteredItems (cognitive 18) feature-toggles/feature-toggles-internal/src/main/java/com/duckduckgo/examplefeature/internal/ui/FeatureToggleInventoryActivity.kt:157— FeatureToggleInventoryActivity.buildFilteredItems has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 4 (7 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.
ModelPickerView.applyCompactLevel (cognitive 18) duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/nativeinput/views/ModelPickerView.kt:225— ModelPickerView.applyCompactLevel has cognitive complexity 18 (threshold 15). Drivers by points: if/else 18. 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.
NativeInputModeWidget.applyOmnibarShape (cognitive 18) duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/nativeinput/views/NativeInputModeWidget.kt:1630— NativeInputModeWidget.applyOmnibarShape has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 4, match/switch 1 (2 pts) (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.
BrowserMenuBottomSheet.renderBrowserMenu (cognitive 18) browser/browser-ui/src/main/java/com/duckduckgo/browser/ui/browsermenu/BrowserMenuBottomSheet.kt:279— BrowserMenuBottomSheet.renderBrowserMenu has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16, boolean chains 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.
BrowserTabViewModel.progressChanged (cognitive 18) app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt:2633— BrowserTabViewModel.progressChanged has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 4 (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.
BrowserWebViewClient.onPageFinished (cognitive 18) app/src/main/java/com/duckduckgo/app/browser/BrowserWebViewClient.kt:795— BrowserWebViewClient.onPageFinished has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 4 (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.
AdditionalDefaultBrowserPromptsImpl.evaluate (cognitive 18) app/src/main/java/com/duckduckgo/app/browser/defaultbrowsing/prompts/AdditionalDefaultBrowserPromptsImpl.kt:200— AdditionalDefaultBrowserPromptsImpl.evaluate has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (15 pts), match/switch 1 (2 pts), boolean chains 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.
LottiePrivacyShieldAnimationHelper.setAnimationView (cognitive 18) app/src/main/java/com/duckduckgo/app/browser/omnibar/animations/addressbar/LottiePrivacyShieldAnimationHelper.kt:45— LottiePrivacyShieldAnimationHelper.setAnimationView has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 2, match/switch 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.
TrackerBlockingVpnService.createTunnelInterface (cognitive 18) app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/service/TrackerBlockingVpnService.kt:476— TrackerBlockingVpnService.createTunnelInterface has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 5 (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.
StickyHeadersLinearLayoutManager.getY (cognitive 18) android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/recyclerviewext/StickyHeadersLinearLayoutManager.kt:541— StickyHeadersLinearLayoutManager.getY has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (18 pts) (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. This shape REPEATS in the file: one other method here (StickyHeadersLinearLayoutManager.getX) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
StickyHeadersLinearLayoutManager.getX (cognitive 18) android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/recyclerviewext/StickyHeadersLinearLayoutManager.kt:575— StickyHeadersLinearLayoutManager.getX has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (18 pts) (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. This shape REPEATS in the file: one other method here (StickyHeadersLinearLayoutManager.getY) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
DuckChatContextualWebViewViewModel.onPageContextReceived (cognitive 17) duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/contextual/DuckChatContextualWebViewViewModel.kt:689— DuckChatContextualWebViewViewModel.onPageContextReceived has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 6, match/switch 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.
HighUsageModelFooterPlugin.createFooter (cognitive 17) duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/nativeinput/footer/highusage/HighUsageModelFooterPlugin.kt:68— HighUsageModelFooterPlugin.createFooter has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 5 (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.
UsageLimitFooterPlugin.createFooter (cognitive 17) duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/nativeinput/footer/usagelimits/UsageLimitFooterPlugin.kt:88— UsageLimitFooterPlugin.createFooter has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12, boolean chains 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.
ReportMessageHandlerPlugin.process (cognitive 17) autoconsent/autoconsent-impl/src/main/java/com/duckduckgo/autoconsent/impl/handlers/ReportMessageHandlerPlugin.kt:48— ReportMessageHandlerPlugin.process has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 4, 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.
BrowserTabViewModel.navigationStateChanged (cognitive 17) app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt:2107— BrowserTabViewModel.navigationStateChanged has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 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.
BrowserWebViewClient.shouldOverrideWebRequest (cognitive 17) app/src/main/java/com/duckduckgo/app/browser/BrowserWebViewClient.kt:526— BrowserWebViewClient.shouldOverrideWebRequest has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (16 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.
OmnibarLayout.renderPrivacyShield (cognitive 17) app/src/main/java/com/duckduckgo/app/browser/omnibar/OmnibarLayout.kt:1232— OmnibarLayout.renderPrivacyShield has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 4, match/switch 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.
NewUserOnboardingPlanProvider.inputScreenPreviewStep (cognitive 17) app/src/main/java/com/duckduckgo/app/onboarding/orchestrator/NewUserOnboardingPlanProvider.kt:1121— NewUserOnboardingPlanProvider.inputScreenPreviewStep has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (14 pts), match/switch 2, boolean chains 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.
HeaderPositionsAdapterDataObserver.onItemRangeMoved (cognitive 17) android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/recyclerviewext/StickyHeadersLinearLayoutManager.kt:752— HeaderPositionsAdapterDataObserver.onItemRangeMoved has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 4, loops 1 (2 pts) (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.
SubscriptionFeedbackViewModel.handleBackInFlow (cognitive 16) subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/feedback/SubscriptionFeedbackViewModel.kt:337— SubscriptionFeedbackViewModel.handleBackInFlow has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), match/switch 2 (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.
SubscriptionWebViewViewModel.getSubscriptionTierOptions (cognitive 16) subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/ui/SubscriptionWebViewViewModel.kt:575— SubscriptionWebViewViewModel.getSubscriptionTierOptions has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (7 pts), match/switch 2 (5 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.
RealSegmentCalculation.computeUserSegmentInternal (cognitive 16) statistics/statistics-impl/src/main/java/com/duckduckgo/app/statistics/user_segments/SegmentCalculation.kt:124— RealSegmentCalculation.computeUserSegmentInternal has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 2, loops 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.
RealSavedSitesParser.parseElement (cognitive 16) saved-sites/saved-sites-impl/src/main/java/com/duckduckgo/savedsites/impl/service/SavedSitesParser.kt:168— RealSavedSitesParser.parseElement has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 1 (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.
PirDataUpdateObserver.onCreate (cognitive 16) pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/brokers/PirDataUpdateObserver.kt:58— PirDataUpdateObserver.onCreate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), match/switch 2 (4 pts), boolean chains 2 (nesting depth added 6). 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.
DenyListConfig.visitor (cognitive 16) lint-rules/src/main/java/com/duckduckgo/lint/DenyListedApiDetector.kt:176— DenyListConfig.visitor has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, boolean chains 5, match/switch 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.
ColorAttributeInXmlDetector.visitAttribute (cognitive 16) lint-rules/src/main/java/com/duckduckgo/lint/ui/ColorAttributeInXmlDetector.kt:49— ColorAttributeInXmlDetector.visitAttribute has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 2, match/switch 1 (nesting depth added 6). 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.
InitMessageHandlerPlugin.filterUnusedStrings (cognitive 16) autoconsent/autoconsent-impl/src/main/java/com/duckduckgo/autoconsent/impl/handlers/InitMessageHandlerPlugin.kt:200— InitMessageHandlerPlugin.filterUnusedStrings has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 3 (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.
AutoCompleteApi.fireAutocompletePixel (cognitive 16) app/src/main/java/com/duckduckgo/app/autocomplete/api/AutoComplete.kt:257— AutoCompleteApi.fireAutocompletePixel has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 3, match/switch 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.
RealNativeInputManager.hideNativeInput (cognitive 16) app/src/main/java/com/duckduckgo/app/browser/nativeinput/NativeInputManager.kt:353— RealNativeInputManager.hideNativeInput has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 5 (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.
OmnibarLayout.configureCustomTabOmnibar (cognitive 16) app/src/main/java/com/duckduckgo/app/browser/omnibar/OmnibarLayout.kt:1306— OmnibarLayout.configureCustomTabOmnibar has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 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.
SystemSearchActivity.configureViewReferences (cognitive 16) app/src/main/java/com/duckduckgo/app/systemsearch/SystemSearchActivity.kt:179— SystemSearchActivity.configureViewReferences has cognitive complexity 16 (threshold 15). Drivers by points: if/else 16. 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.
SearchWidgetConfigurator.populateRemoteViews (cognitive 16) app/src/main/java/com/duckduckgo/widget/SearchWidgetConfigurator.kt:64— SearchWidgetConfigurator.populateRemoteViews has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, boolean chains 4. 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.
AlwaysOnAlertDialogFragment.configureViews (cognitive 16) app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/ui/alwayson/AlwaysOnAlertDialogFragment.kt:74— AlwaysOnAlertDialogFragment.configureViews has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14 (16 pts) (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.
Change coupling clique: AttachmentView.kt, ModelPickerView.kt, OptionsView.kt, ReasoningModePickerView.kt duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/nativeinput/views/AttachmentView.kt— 4 files — `duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/nativeinput/views/AttachmentView.kt`, `duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/nativeinput/views/ModelPickerView.kt`, `duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/nativeinput/views/OptionsView.kt`, `duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/nativeinput/views/ReasoningModePickerView.kt` — all change together with no explicit dependency: a fully-connected co-change clique, not 6 separate couplings. They share one concern (thin parallel siblings over a common abstraction), so extract the shared part into ONE unit and the whole clique's coupling clears at once — you do not need to break each pair individually.
Near-duplicate member pair (46 shared lines) app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/apps/ui/ExclusionListAdapter.kt:234— app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/apps/ui/ExclusionListAdapter.kt:234-283 | app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/apps/ui/TrackingProtectionAppsAdapter.kt:113-162 — These two members are variants of one another: 46 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (34 shared lines) scripts/release/create-asana-internal-release.py:99— scripts/release/create-asana-internal-release.py:99-152 | scripts/release/create-asana-public-release.py:19-94 — These two members are variants of one another: 34 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Duplicated block (50–54 lines × 2) app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/ui/newtab/AppTrackingProtectionStateView.kt:142— app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/ui/newtab/AppTrackingProtectionStateView.kt:142-195 | app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/ui/privacyreport/DeviceShieldFragment.kt:143-192 — 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 (45–49 lines × 2) app/src/main/java/com/duckduckgo/app/browser/remotemessage/RemoteMessageMapper.kt:52— app/src/main/java/com/duckduckgo/app/browser/remotemessage/RemoteMessageMapper.kt:52-96 | remote-messaging/remote-messaging-impl/src/main/java/com/duckduckgo/remote/messaging/impl/mappers/RemoteMessageMapper.kt:52-100 — before extracting anything, compare `app/src/main/java/com/duckduckgo/app/browser/remotemessage/RemoteMessageMapper.kt` and `remote-messaging/remote-messaging-impl/src/main/java/com/duckduckgo/remote/messaging/impl/mappers/RemoteMessageMapper.kt` as WHOLE FILES: 98% 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. 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 (49 lines × 2) subscriptions/subscriptions-internal/src/main/java/com/duckduckgo/subscriptions/internal/settings/SwitchSubscriptionProductView.kt:144— subscriptions/subscriptions-internal/src/main/java/com/duckduckgo/subscriptions/internal/settings/SwitchSubscriptionProductView.kt:144-192 | subscriptions/subscriptions-internal/src/main/java/com/duckduckgo/subscriptions/internal/settings/SwitchSubscriptionView.kt:144-192 — before extracting anything, compare `subscriptions/subscriptions-internal/src/main/java/com/duckduckgo/subscriptions/internal/settings/SwitchSubscriptionProductView.kt` and `subscriptions/subscriptions-internal/src/main/java/com/duckduckgo/subscriptions/internal/settings/SwitchSubscriptionView.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 233 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.
Duplicated block (41 lines × 2) subscriptions/subscriptions-internal/src/main/java/com/duckduckgo/subscriptions/internal/settings/SwitchSubscriptionProductView.kt:250— subscriptions/subscriptions-internal/src/main/java/com/duckduckgo/subscriptions/internal/settings/SwitchSubscriptionProductView.kt:250-290 | subscriptions/subscriptions-internal/src/main/java/com/duckduckgo/subscriptions/internal/settings/SwitchSubscriptionView.kt:250-290 — before extracting anything, compare `subscriptions/subscriptions-internal/src/main/java/com/duckduckgo/subscriptions/internal/settings/SwitchSubscriptionProductView.kt` and `subscriptions/subscriptions-internal/src/main/java/com/duckduckgo/subscriptions/internal/settings/SwitchSubscriptionView.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 233 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.
Duplicated block (35 lines × 3) app/src/main/java/com/duckduckgo/app/onboarding/ui/page/welcome/engine/EmbellishmentController.kt:330— app/src/main/java/com/duckduckgo/app/onboarding/ui/page/welcome/engine/EmbellishmentController.kt:330-364 | app/src/main/java/com/duckduckgo/app/onboarding/ui/page/welcome/engine/EmbellishmentController.kt:374-408 | app/src/main/java/com/duckduckgo/app/onboarding/ui/page/welcome/engine/EmbellishmentController.kt:418-452 — 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 `app/src/main/java/com/duckduckgo/app/onboarding/ui/page/welcome/engine/EmbellishmentController.kt:330` 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, `app/src/main/java/com/duckduckgo/app/onboarding/ui/page/welcome/engine/EmbellishmentController.kt:373` calls `sideWingBottomOverlapPx` and `app/src/main/java/com/duckduckgo/app/onboarding/ui/page/welcome/engine/EmbellishmentController.kt:329` 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.
Duplicated block (30 lines × 2) duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/clearing/RealDuckChatDeleter.kt:189— duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/clearing/RealDuckChatDeleter.kt:189-218 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/nativeinput/suggestions/reader/ChatSuggestionsReader.kt:165-194 — 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 `duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/clearing/RealDuckChatDeleter.kt:189` 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 (28 lines × 2) duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/messaging/sync/DecryptWithSyncMasterKeyHandler.kt:49— duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/messaging/sync/DecryptWithSyncMasterKeyHandler.kt:49-76 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/messaging/sync/EncryptWithSyncMasterKeyHandler.kt:49-76 — 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 `duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/messaging/sync/DecryptWithSyncMasterKeyHandler.kt:49` 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 (26 lines × 2) android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/dialog/StackedAlertDialogBuilder.kt:332— android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/dialog/StackedAlertDialogBuilder.kt:332-357 | network-protection/network-protection-impl/src/main/java/com/duckduckgo/networkprotection/impl/management/VpnExcludeAppPromptDialogBuilder.kt:157-182 — 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 `android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/dialog/StackedAlertDialogBuilder.kt:332` 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 `stackedButtonList` to `MutableList<StackedButtonSpec>` in one and `MutableList<CharSequence>` 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, `android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/dialog/StackedAlertDialogBuilder.kt:329` calls `getView` and `network-protection/network-protection-impl/src/main/java/com/duckduckgo/networkprotection/impl/management/VpnExcludeAppPromptDialogBuilder.kt:156` 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 (25 lines × 2) app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/ui/alwayson/AlwaysOnAlertDialogFragment.kt:80— app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/ui/alwayson/AlwaysOnAlertDialogFragment.kt:80-104 | network-protection/network-protection-impl/src/main/java/com/duckduckgo/networkprotection/impl/management/alwayson/NetworkProtectionAlwaysOnDialogFragment.kt:77-101 — 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `binding` to `ContentVpnAlwaysOnAlertBinding` in one and `DialogNetpAlwaysOnBinding` 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 (24–25 lines × 2) app/src/main/java/com/duckduckgo/app/browser/remotemessage/RemoteMessageMapper.kt:99— app/src/main/java/com/duckduckgo/app/browser/remotemessage/RemoteMessageMapper.kt:99-122 | remote-messaging/remote-messaging-impl/src/main/java/com/duckduckgo/remote/messaging/impl/mappers/RemoteMessageMapper.kt:103-127 — before extracting anything, compare `app/src/main/java/com/duckduckgo/app/browser/remotemessage/RemoteMessageMapper.kt` and `remote-messaging/remote-messaging-impl/src/main/java/com/duckduckgo/remote/messaging/impl/mappers/RemoteMessageMapper.kt` as WHOLE FILES: 98% 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. 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 (24 lines × 4) android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/TextExtensions.kt:78— android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/TextExtensions.kt:78-101 | android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/dialog/RadioListAlertDialogBuilder.kt:115-138 | android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/dialog/TextAlertDialogBuilder.kt:89-112 | app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/breakage/ReportBreakageAppListActivity.kt:154-177 — 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 `android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/TextExtensions.kt:78` 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 (24 lines × 2) subscriptions/subscriptions-internal/src/main/java/com/duckduckgo/subscriptions/internal/settings/SwitchSubscriptionProductView.kt:103— subscriptions/subscriptions-internal/src/main/java/com/duckduckgo/subscriptions/internal/settings/SwitchSubscriptionProductView.kt:103-126 | subscriptions/subscriptions-internal/src/main/java/com/duckduckgo/subscriptions/internal/settings/SwitchSubscriptionView.kt:103-126 — before extracting anything, compare `subscriptions/subscriptions-internal/src/main/java/com/duckduckgo/subscriptions/internal/settings/SwitchSubscriptionProductView.kt` and `subscriptions/subscriptions-internal/src/main/java/com/duckduckgo/subscriptions/internal/settings/SwitchSubscriptionView.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 233 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.
Duplicated block (22–23 lines × 2) android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/InfoPanel.kt:96— android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/InfoPanel.kt:96-117 | subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/feedback/SubscriptionFeedbackSubmitFragment.kt:132-154 — 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 `android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/InfoPanel.kt:96` 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 (22 lines × 2) app/src/main/java/com/duckduckgo/app/browser/favicon/FaviconDownloader.kt:133— app/src/main/java/com/duckduckgo/app/browser/favicon/FaviconDownloader.kt:133-154 | app/src/main/java/com/duckduckgo/app/browser/favicon/FaviconDownloader.kt:159-180 — 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 `app/src/main/java/com/duckduckgo/app/browser/favicon/FaviconDownloader.kt:133` 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 (21 lines × 2) app/src/main/java/com/duckduckgo/app/onboarding/orchestrator/NewUserOnboardingPlanProvider.kt:581— app/src/main/java/com/duckduckgo/app/onboarding/orchestrator/NewUserOnboardingPlanProvider.kt:581-601 | app/src/main/java/com/duckduckgo/app/onboarding/orchestrator/NewUserOnboardingPlanProvider.kt:671-691 — 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 `app/src/main/java/com/duckduckgo/app/onboarding/orchestrator/NewUserOnboardingPlanProvider.kt:581` 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 (19–20 lines × 3) lint-rules/src/main/java/com/duckduckgo/lint/ui/DaxContextMenuContentDetector.kt:56— lint-rules/src/main/java/com/duckduckgo/lint/ui/DaxContextMenuContentDetector.kt:56-74 | lint-rules/src/main/java/com/duckduckgo/lint/ui/DaxContextMenuItemContentDetector.kt:56-74 | lint-rules/src/main/java/com/duckduckgo/lint/ui/DaxListItemContentDetector.kt:64-83 — 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 `lint-rules/src/main/java/com/duckduckgo/lint/ui/DaxContextMenuContentDetector.kt: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 (19 lines × 3) android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/dialogs/DialogsFragment.kt:798— android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/dialogs/DialogsFragment.kt:798-816 | android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/dialogs/DialogsFragment.kt:855-873 | android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/dialogs/DialogsFragment.kt:913-931 — 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 `android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/dialogs/DialogsFragment.kt:798` 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, `android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/dialogs/DialogsFragment.kt:854` calls `setTitle` and `android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/dialogs/DialogsFragment.kt:797` 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.
Duplicated block (16–18 lines × 3) app/src/main/java/com/duckduckgo/app/browser/BrowserTabFragment.kt:5051— app/src/main/java/com/duckduckgo/app/browser/BrowserTabFragment.kt:5051-5066 | app/src/main/java/com/duckduckgo/app/systemsearch/SystemSearchActivity.kt:659-674 | saved-sites/saved-sites-impl/src/main/java/com/duckduckgo/savedsites/impl/newtab/FavouritesNewTabSectionView.kt:433-450 — 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 `app/src/main/java/com/duckduckgo/app/browser/BrowserTabFragment.kt:5051` 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: `R` names `com.duckduckgo.app.browser.R` in one and `com.duckduckgo.saved.sites.impl.R` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (16–17 lines × 2) autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/gpm/webflow/ImportGooglePasswordsWebFlowFragment.kt:380— autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/gpm/webflow/ImportGooglePasswordsWebFlowFragment.kt:380-396 | autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/takeout/webflow/ImportGoogleBookmarksWebFlowFragment.kt:468-483 — before extracting anything, compare `autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/gpm/webflow/ImportGooglePasswordsWebFlowFragment.kt` and `autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/takeout/webflow/ImportGoogleBookmarksWebFlowFragment.kt` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 86 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. 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 (13–15 lines × 2) app/src/main/java/com/duckduckgo/app/browser/BrowserWebViewClient.kt:1004— app/src/main/java/com/duckduckgo/app/browser/BrowserWebViewClient.kt:1004-1018 | app/src/main/java/com/duckduckgo/app/browser/urlextraction/UrlExtractingWebViewClient.kt:124-136 — 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 `app/src/main/java/com/duckduckgo/app/browser/BrowserWebViewClient.kt:1004` 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–15 lines × 2) pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/optout/PirOptOut.kt:271— pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/optout/PirOptOut.kt:271-285 | pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/optout/PirOptOut.kt:318-329 — 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 `pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/optout/PirOptOut.kt:271` 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 (14 lines × 4) android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/dialogs/DialogsFragment.kt:118— android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/dialogs/DialogsFragment.kt:118-131 | android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/dialogs/DialogsFragment.kt:286-299 | android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/dialogs/DialogsFragment.kt:320-333 | android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/dialogs/DialogsFragment.kt:365-378 — 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 `android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/dialogs/DialogsFragment.kt:118` 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, `android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/dialogs/DialogsFragment.kt:319` calls `setNegativeButton` and `android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/dialogs/DialogsFragment.kt:364` 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.
Duplicated block (13–14 lines × 3) duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/subscription/DuckAiPlusSettingsView.kt:72— duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/subscription/DuckAiPlusSettingsView.kt:72-84 | subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/settings/views/ItrSettingView.kt:79-91 | subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/settings/views/ProSettingView.kt:91-104 — 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 (12–14 lines × 2) app/src/main/java/com/duckduckgo/app/global/view/SingleTabFireDialogViewModel.kt:148— app/src/main/java/com/duckduckgo/app/global/view/SingleTabFireDialogViewModel.kt:148-161 | app/src/main/java/com/duckduckgo/app/global/view/SingleTabFireDialogViewModel.kt:284-295 — 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 `app/src/main/java/com/duckduckgo/app/global/view/SingleTabFireDialogViewModel.kt:148` 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–13 lines × 4) app/src/main/java/com/duckduckgo/app/browser/BrowserTabFragment.kt:5050— app/src/main/java/com/duckduckgo/app/browser/BrowserTabFragment.kt:5050-5060 | app/src/main/java/com/duckduckgo/app/systemsearch/SystemSearchActivity.kt:658-668 | saved-sites/saved-sites-impl/src/main/java/com/duckduckgo/savedsites/impl/bookmarks/BookmarksActivity.kt:683-695 | saved-sites/saved-sites-impl/src/main/java/com/duckduckgo/savedsites/impl/newtab/FavouritesNewTabSectionView.kt:432-443 — 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 `app/src/main/java/com/duckduckgo/app/browser/BrowserTabFragment.kt:5050` 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 first that the copies are not typed on the same thing: `R` names `com.duckduckgo.app.browser.R` in one and `com.duckduckgo.saved.sites.impl.R` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (11–13 lines × 3) ad-blocking/ad-blocking-impl/src/main/java/com/duckduckgo/adblocking/impl/duckplayer/DuckPlayerSettingsEntryView.kt:84— ad-blocking/ad-blocking-impl/src/main/java/com/duckduckgo/adblocking/impl/duckplayer/DuckPlayerSettingsEntryView.kt:84-94 | ad-blocking/ad-blocking-impl/src/main/java/com/duckduckgo/adblocking/impl/ui/AdBlockingProtectionsSettingsEntryView.kt:82-94 | ad-blocking/ad-blocking-impl/src/main/java/com/duckduckgo/adblocking/impl/ui/AdBlockingSettingsEntryView.kt:83-93 — before extracting anything, compare `ad-blocking/ad-blocking-impl/src/main/java/com/duckduckgo/adblocking/impl/duckplayer/DuckPlayerSettingsEntryView.kt` and `ad-blocking/ad-blocking-impl/src/main/java/com/duckduckgo/adblocking/impl/ui/AdBlockingSettingsEntryView.kt` as WHOLE FILES: 86% 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. 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 `ad-blocking/ad-blocking-impl/src/main/java/com/duckduckgo/adblocking/impl/duckplayer/DuckPlayerSettingsEntryView.kt:84` 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 × 3) android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/component/textinput/ComponentTextInputFragment.kt:256— android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/component/textinput/ComponentTextInputFragment.kt:256-268 | android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/component/textinput/ComponentTextInputFragment.kt:292-304 | android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/component/textinput/ComponentTextInputFragment.kt:399-411 — 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 `android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/component/textinput/ComponentTextInputFragment.kt:256` 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–13 lines × 2) duckchat/duckchat-internal/src/main/java/com/duckduckgo/duckchat/internal/DuckAiUrlSettingsActivity.kt:58— duckchat/duckchat-internal/src/main/java/com/duckduckgo/duckchat/internal/DuckAiUrlSettingsActivity.kt:58-70 | privacy-config/privacy-config-internal/src/main/java/com/duckduckgo/privacy/config/internal/PrivacyConfigInternalSettingsActivity.kt:73-83 — 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 `duckchat/duckchat-internal/src/main/java/com/duckduckgo/duckchat/internal/DuckAiUrlSettingsActivity.kt:58` 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, `duckchat/duckchat-internal/src/main/java/com/duckduckgo/duckchat/internal/DuckAiUrlSettingsActivity.kt:56` calls `getString` and `privacy-config/privacy-config-internal/src/main/java/com/duckduckgo/privacy/config/internal/PrivacyConfigInternalSettingsActivity.kt:72` 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.
Duplicated block (8–10 lines × 3) dax-prompts/dax-prompts-impl/src/main/java/com/duckduckgo/daxprompts/impl/ReEngagementPromptEvaluator.kt:76— dax-prompts/dax-prompts-impl/src/main/java/com/duckduckgo/daxprompts/impl/ReEngagementPromptEvaluator.kt:76-83 | dax-prompts/dax-prompts-impl/src/main/java/com/duckduckgo/daxprompts/impl/WinBackPromptEvaluator.kt:74-81 | remote-messaging/remote-messaging-impl/src/main/java/com/duckduckgo/remote/messaging/impl/modal/evaluator/RemoteMessageModalSurfaceEvaluator.kt:98-107 — 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 `remote-messaging/remote-messaging-impl/src/main/java/com/duckduckgo/remote/messaging/impl/modal/evaluator/RemoteMessageModalSurfaceEvaluator.kt:98` 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 (8–9 lines × 3) common/common-utils/src/main/java/com/duckduckgo/common/utils/extensions/FlowExtensions.kt:38— common/common-utils/src/main/java/com/duckduckgo/common/utils/extensions/FlowExtensions.kt:38-46 | common/common-utils/src/main/java/com/duckduckgo/common/utils/extensions/FlowExtensions.kt:63-70 | common/common-utils/src/main/java/com/duckduckgo/common/utils/extensions/FlowExtensions.kt:89-96 — 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 `common/common-utils/src/main/java/com/duckduckgo/common/utils/extensions/FlowExtensions.kt:38` 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 (17 lines × 7) ad-blocking/ad-blocking-impl/src/main/java/com/duckduckgo/adblocking/impl/duckplayer/JSONObjectAdapter.kt:30— ad-blocking/ad-blocking-impl/src/main/java/com/duckduckgo/adblocking/impl/duckplayer/JSONObjectAdapter.kt:30-48 | autoconsent/autoconsent-impl/src/main/java/com/duckduckgo/autoconsent/impl/adapters/JSONObjectAdapter.kt:30-46 | content-scope-scripts/content-scope-scripts-impl/src/main/java/com/duckduckgo/contentscopescripts/impl/messaging/JSONObjectAdapter.kt:30-48 | js-messaging/js-messaging-impl/src/main/java/com/duckduckgo/js/messaging/impl/JSONObjectAdapter.kt:30-48 | pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/brokers/BrokerAdapters.kt:33-63 | privacy-config/privacy-config-impl/src/main/java/com/duckduckgo/privacy/config/impl/network/JSONObjectAdapter.kt:30-48 | subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/JSONObjectAdapter.kt:30-48 — before extracting anything, compare `ad-blocking/ad-blocking-impl/src/main/java/com/duckduckgo/adblocking/impl/duckplayer/JSONObjectAdapter.kt` and `autoconsent/autoconsent-impl/src/main/java/com/duckduckgo/autoconsent/impl/adapters/JSONObjectAdapter.kt` as WHOLE FILES: 91% 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. 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 `pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/brokers/BrokerAdapters.kt:33` 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 (23 lines × 2) android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/recyclerviewext/GridColumnCalculator.kt:29— android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/recyclerviewext/GridColumnCalculator.kt:29-51 | app/src/main/java/com/duckduckgo/app/tabs/ui/GridViewColumnCalculator.kt:29-51 — before extracting anything, compare `android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/recyclerviewext/GridColumnCalculator.kt` and `app/src/main/java/com/duckduckgo/app/tabs/ui/GridViewColumnCalculator.kt` as WHOLE FILES: 95% 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. 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 `android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/recyclerviewext/GridColumnCalculator.kt:29` 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 (57 lines × 2) app/src/main/java/com/duckduckgo/app/browser/newtab/QuickAccessDragTouchItemListener.kt:35— app/src/main/java/com/duckduckgo/app/browser/newtab/QuickAccessDragTouchItemListener.kt:35-91 | saved-sites/saved-sites-impl/src/main/java/com/duckduckgo/savedsites/impl/newtab/QuickAccessDragTouchItemListener.kt:34-90 — before extracting anything, compare `app/src/main/java/com/duckduckgo/app/browser/newtab/QuickAccessDragTouchItemListener.kt` and `saved-sites/saved-sites-impl/src/main/java/com/duckduckgo/savedsites/impl/newtab/QuickAccessDragTouchItemListener.kt` as WHOLE FILES: 91% 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. 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 (32 lines × 2) duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/messaging/sync/Base64UrlExtensions.kt:32— duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/messaging/sync/Base64UrlExtensions.kt:32-65 | sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/EncodingExtension.kt:21-52 — 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 (39 lines × 2) feedback/feedback-impl/src/main/java/com/duckduckgo/feedback/impl/ui/negative/mainreason/MainReasonAdapter.kt:34— feedback/feedback-impl/src/main/java/com/duckduckgo/feedback/impl/ui/negative/mainreason/MainReasonAdapter.kt:34-72 | feedback/feedback-impl/src/main/java/com/duckduckgo/feedback/impl/ui/negative/subreason/SubReasonAdapter.kt:34-72 — 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 `feedback/feedback-impl/src/main/java/com/duckduckgo/feedback/impl/ui/negative/mainreason/MainReasonAdapter.kt:34` 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 × 4) ad-blocking/ad-blocking-impl/src/main/java/com/duckduckgo/adblocking/impl/duckplayer/DuckPlayerScriptsJsMessaging.kt:95— ad-blocking/ad-blocking-impl/src/main/java/com/duckduckgo/adblocking/impl/duckplayer/DuckPlayerScriptsJsMessaging.kt:95-105 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/clearing/DuckChatDeleterJsMessaging.kt:81-90 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/nativeinput/suggestions/reader/ChatSuggestionsJsMessaging.kt:77-86 | subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/messaging/SubscriptionMessagingInterface.kt:117-127 — before extracting anything, compare `ad-blocking/ad-blocking-impl/src/main/java/com/duckduckgo/adblocking/impl/duckplayer/DuckPlayerScriptsJsMessaging.kt` and `subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/messaging/SubscriptionMessagingInterface.kt` as WHOLE FILES: this scan already matched 4 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. 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 (5 lines × 16) ad-blocking/ad-blocking-impl/src/main/java/com/duckduckgo/adblocking/impl/duckplayer/DuckPlayerSettingsActivity.kt:91— ad-blocking/ad-blocking-impl/src/main/java/com/duckduckgo/adblocking/impl/duckplayer/DuckPlayerSettingsActivity.kt:91-95 | app/src/main/java/com/duckduckgo/app/browser/threatprotection/ThreatProtectionSettingsActivity.kt:98-102 | app/src/main/java/com/duckduckgo/app/firebutton/AutomaticDataClearingSettingsActivity.kt:70-74 | app/src/main/java/com/duckduckgo/app/firebutton/DataClearingSettingsActivity.kt:83-87 | app/src/main/java/com/duckduckgo/app/generalsettings/GeneralSettingsActivity.kt:120-124 | app/src/main/java/com/duckduckgo/app/generalsettings/showonapplaunch/ShowOnAppLaunchActivity.kt:68-72 | app/src/main/java/com/duckduckgo/app/privatesearch/PrivateSearchActivity.kt:82-86 | app/src/main/java/com/duckduckgo/app/webtrackingprotection/WebTrackingProtectionActivity.kt:96-100 | autoconsent/autoconsent-impl/src/main/java/com/duckduckgo/autoconsent/impl/ui/AutoconsentSettingsActivity.kt:114-118 | autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/ui/credential/management/importpassword/ImportPasswordsActivity.kt:75-79 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/subscription/DuckAiPaidSettingsActivity.kt:102-106 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/settings/DuckAiShortcutSettingsActivity.kt:79-83 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/settings/DuckChatSettingsActivity.kt:143-147 | network-protection/network-protection-impl/src/main/java/com/duckduckgo/networkprotection/impl/management/NetworkProtectionManagementActivity.kt:142-146 | network-protection/network-protection-impl/src/main/java/com/duckduckgo/networkprotection/impl/settings/geoswitching/NetpGeoswitchingActivity.kt:68-72 | subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/ui/ChangePlanActivity.kt:51-55 — before extracting anything, compare `autoconsent/autoconsent-impl/src/main/java/com/duckduckgo/autoconsent/impl/ui/AutoconsentSettingsActivity.kt` and `duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/subscription/DuckAiPaidSettingsActivity.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `autoconsent/autoconsent-impl/src/main/java/com/duckduckgo/autoconsent/impl/ui/AutoconsentSettingsActivity.kt:110` calls `configureClickableLink` and `ad-blocking/ad-blocking-impl/src/main/java/com/duckduckgo/adblocking/impl/duckplayer/DuckPlayerSettingsActivity.kt: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 (14 lines × 3) ad-click/ad-click-impl/src/main/java/com/duckduckgo/adclick/impl/metrics/AdClickAttributedMetric.kt:130— ad-click/ad-click-impl/src/main/java/com/duckduckgo/adclick/impl/metrics/AdClickAttributedMetric.kt:130-143 | attributed-metrics/attributed-metrics-impl/src/main/java/com/duckduckgo/app/attributed/metrics/search/SearchAttributedMetric.kt:151-164 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/metric/DuckAiAttributedMetric.kt:123-136 — before extracting anything, compare `ad-click/ad-click-impl/src/main/java/com/duckduckgo/adclick/impl/metrics/AdClickAttributedMetric.kt` and `duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/metric/DuckAiAttributedMetric.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 59 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. 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 × 4) app/src/main/java/com/duckduckgo/app/browser/BrowserTabFragment.kt:2213— app/src/main/java/com/duckduckgo/app/browser/BrowserTabFragment.kt:2213-2219 | duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/contextual/DuckChatContextualWebViewFragment.kt:874-880 | subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/onboarding/features/SummaryOfBenefitsFooterView.kt:128-134 | subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/ui/SubscriptionsWebViewActivity.kt:425-431 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `app/src/main/java/com/duckduckgo/app/browser/BrowserTabFragment.kt:2210` calls `addTabsObserver` and `duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/contextual/DuckChatContextualWebViewFragment.kt:871` 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 (5 lines × 4) app/src/main/java/com/duckduckgo/app/browser/webview/WebViewActivity.kt:121— app/src/main/java/com/duckduckgo/app/browser/webview/WebViewActivity.kt:121-125 | autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/email/incontext/EmailProtectionInContextSignupActivity.kt:105-109 | settings/settings-impl/src/main/java/com/duckduckgo/settings/impl/SettingsWebViewActivity.kt:95-99 | subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/ui/SubscriptionsWebViewActivity.kt:528-532 — 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.
Duplicated block (5 lines × 7) codegen/codegen-ksp/src/main/java/com/duckduckgo/codegen/ksp/ContributesActivePluginPointProcessor.kt:915— codegen/codegen-ksp/src/main/java/com/duckduckgo/codegen/ksp/ContributesActivePluginPointProcessor.kt:915-919 | codegen/codegen-ksp/src/main/java/com/duckduckgo/codegen/ksp/ContributesPluginPointProcessor.kt:247-251 | codegen/codegen-ksp/src/main/java/com/duckduckgo/codegen/ksp/ContributesRemoteFeatureProcessor.kt:855-859 | codegen/codegen-ksp/src/main/java/com/duckduckgo/codegen/ksp/ContributesServiceApiProcessor.kt:177-181 | codegen/codegen-ksp/src/main/java/com/duckduckgo/codegen/ksp/ContributesSubComponentProcessor.kt:278-282 | codegen/codegen-ksp/src/main/java/com/duckduckgo/codegen/ksp/ContributesViewModelProcessor.kt:194-198 | codegen/codegen-ksp/src/main/java/com/duckduckgo/codegen/ksp/ContributesWorkerProcessor.kt:196-200 — 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 7 call sites, so a change lands once.
Duplicated block (5 lines × 6) desktop-app-promotion/desktop-app-promotion-impl/src/main/java/com/duckduckgo/desktopapppromotion/impl/DesktopAppPromotionActivity.kt:95— desktop-app-promotion/desktop-app-promotion-impl/src/main/java/com/duckduckgo/desktopapppromotion/impl/DesktopAppPromotionActivity.kt:95-101 | macos/macos-impl/src/main/java/com/duckduckgo/macos/impl/MacOsActivity.kt:76-80 | subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/pir/PirActivity.kt:67-71 | subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/ui/RestoreSubscriptionActivity.kt:104-108 | sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/promotion/SyncGetOnOtherPlatformsActivity.kt:80-84 | windows/windows-impl/src/main/java/com/duckduckgo/windows/impl/ui/WindowsActivity.kt:77-81 — 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.
Duplicated block (7 lines × 3) subscriptions/subscriptions-internal/src/main/java/com/duckduckgo/subscriptions/internal/settings/CancelPendingPlanChangeView.kt:79— subscriptions/subscriptions-internal/src/main/java/com/duckduckgo/subscriptions/internal/settings/CancelPendingPlanChangeView.kt:79-85 | subscriptions/subscriptions-internal/src/main/java/com/duckduckgo/subscriptions/internal/settings/SwitchSubscriptionProductView.kt:82-89 | subscriptions/subscriptions-internal/src/main/java/com/duckduckgo/subscriptions/internal/settings/SwitchSubscriptionView.kt:82-89 — before extracting anything, compare `subscriptions/subscriptions-internal/src/main/java/com/duckduckgo/subscriptions/internal/settings/SwitchSubscriptionProductView.kt` and `subscriptions/subscriptions-internal/src/main/java/com/duckduckgo/subscriptions/internal/settings/SwitchSubscriptionView.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 233 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 `subscriptions/subscriptions-internal/src/main/java/com/duckduckgo/subscriptions/internal/settings/CancelPendingPlanChangeView.kt: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 (17–18 lines × 2) scripts/release/create-asana-hotfix-release.py:174— scripts/release/create-asana-hotfix-release.py:174-190 | scripts/release/create-asana-public-release.py:77-94 — 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 `scripts/release/create-asana-hotfix-release.py:174` 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.
Coverage not measured — JavaScript/TypeScript suite — Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured — the jest suite in .github/actions/pr-asana-sync/ ran and not one test passed (No tests found, exiting with code 1), so the coverage would describe the failed run, not the code. Coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan. Alternatively, commit the lcov/Cobertura report your CI produces and it is read without a re-run.
DM10 · One transaction, one aggregate· One operation mutates 3 aggregates · ×1
One operation mutates 3 aggregates: RealSavedSitesSyncPersisterAlgorithm.processDeletedItems saved-sites/saved-sites-impl/src/main/java/com/duckduckgo/savedsites/impl/sync/algorithm/SavedSitesSyncPersisterAlgorithm.kt:272— `RealSavedSitesSyncPersisterAlgorithm.processDeletedItems` saves `Bookmark`, `Favorite`, `BookmarkFolder` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event.
M1 · Documentation (README)· README may be stale · ×1
README may be stale — 3373 code files changed in the last 6 months but the README was not touched — it may no longer reflect the system.
Sync-over-async blocking app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/apps/TrackingProtectionAppsRepository.kt:91— `getAppsAndProtectionInfo` is async and calls runBlocking — a blocking call inside async code stalls the coroutine's thread, and every coroutine dispatched to it for as long as it runs.
X18 · Disposal-pattern correctness· Disposable created and abandoned in the function that made it · ×1
Disposable created and abandoned in the function that made it network-protection/network-protection-internal/src/main/java/com/duckduckgo/networkprotection/internal/feature/NetPInternalSettingsActivity.kt:102— `FileInputStream(…)` opens something that has to be given back — a file descriptor, a socket, a directory handle — and it is held in `input`, and every later use of `input` in its block reads a member through it — it is never returned, passed, stored, captured by a lambda, reassigned or released, so this expression both creates the value and is the last place that can release it, and does not. Every call leaks one more open handle until the collector happens to reach it: `Too many open files` under load, and on Windows a file that cannot be replaced or deleted while it is held. Open it with `FileInputStream(…).use { r -> … }`, which releases it on every path including a throw, or hold it and call `.close()` in a `finally`.
Orphaned file android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/DaxDialog.kt: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 duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/messaging/DuckChatStandaloneJsMessageHandlers.kt: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 cookies/cookies-impl/src/main/java/com/duckduckgo/cookies/impl/features/firstparty/FirstPartyCookiesModifier.kt: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 android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/LottieDaxDialog.kt: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 app/src/main/java/com/duckduckgo/app/survey/ui/SurveyActivity.kt: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 app/src/main/java/com/duckduckgo/app/email/AppEmailManager.kt: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 privacy-config/privacy-config-internal/src/main/java/com/duckduckgo/privacy/config/internal/PrivacyConfigInternalSettingsActivity.kt: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 autoconsent/autoconsent-impl/src/main/java/com/duckduckgo/autoconsent/impl/handlers/OptOutAndAutoconsentDoneMessageHandlerPlugin.kt: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 subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/messaging/ItrMessagingInterface.kt: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 privacy-config/privacy-config-internal/src/main/java/com/duckduckgo/privacy/config/internal/PrivacyConfigInternalViewModel.kt: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 app/src/internal/java/com/duckduckgo/app/audit/AuditSettingsActivity.kt: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 subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/settings/views/ItrSettingView.kt: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 network-protection/network-protection-impl/src/main/java/com/duckduckgo/networkprotection/impl/subscription/settings/ProSettingNetPView.kt: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 lint-rules/src/main/java/com/duckduckgo/lint/strings/MissingInstructionDetector.kt: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 app/src/main/java/com/duckduckgo/app/browser/session/RoomWebViewSessionStorage.kt: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 request-filterer/request-filterer-impl/src/main/java/com/duckduckgo/request/filterer/impl/RequestFiltererImpl.kt: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 autoconsent/autoconsent-api/src/main/java/com/duckduckgo/autoconsent/api/Autoconsent.kt: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 android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/TypeAnimationTextView.kt: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 cookies/cookies-impl/src/main/java/com/duckduckgo/cookies/impl/features/firstparty/FirstPartyCookiesModifierWorker.kt: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 browser-api/src/main/java/com/duckduckgo/app/global/model/Site.kt: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 httpsupgrade/httpsupgrade-impl/src/main/java/com/duckduckgo/httpsupgrade/impl/HttpsUpgrader.kt: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 app/src/internal/java/com/duckduckgo/app/audit/AuditSettingsViewModel.kt: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 privacy-config/privacy-config-store/src/main/java/com/duckduckgo/privacy/config/store/features/gpc/GpcRepository.kt: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 cookies/cookies-impl/src/main/java/com/duckduckgo/cookies/impl/features/CookiesFeaturePlugin.kt: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 lint-rules/src/main/java/com/duckduckgo/lint/strings/PlaceholderDetector.kt: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.
Duplicated predicate app/src/main/java/com/duckduckgo/app/cta/ui/Cta.kt:779— `!deviceInfo.isTablet() && context.resources.configuration.orientation == Configuration.ORIENTATION_LANDSCAPE` appears character-identically in 2 files — app/src/main/java/com/duckduckgo/app/cta/ui/Cta.kt, app/src/main/java/com/duckduckgo/app/cta/ui/WavingDaxController.kt. 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 app/src/main/java/com/duckduckgo/app/email/AppEmailManager.kt:76— `!emailDataStore.emailToken.isNullOrBlank() && !emailDataStore.emailUsername.isNullOrBlank()` appears character-identically in 2 files — app/src/main/java/com/duckduckgo/app/email/AppEmailManager.kt, app/src/main/java/com/duckduckgo/app/email/sync/EmailSync.kt. 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 app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/ui/tracker_activity/DeviceShieldTrackerActivityViewModel.kt:95— `!vpnStateMonitor.isAlwaysOnEnabled() && vpnStateMonitor.vpnLastDisabledByAndroid()` appears character-identically in 2 files — app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/ui/tracker_activity/DeviceShieldTrackerActivityViewModel.kt, network-protection/network-protection-impl/src/main/java/com/duckduckgo/networkprotection/impl/management/NetworkProtectionManagementViewModel.kt. 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 lint-rules/src/main/java/com/duckduckgo/lint/strings/MissingInstructionDetector.kt:38— `ResourceUsageModel.isAnalyticsFile(context.file) || !context.project.reportIssues` appears character-identically in 2 files — lint-rules/src/main/java/com/duckduckgo/lint/strings/MissingInstructionDetector.kt, lint-rules/src/main/java/com/duckduckgo/lint/strings/PlaceholderDetector.kt. 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 app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt:3010— `acceptsOnly("image/", fileChooserParams.acceptTypes) && cameraHardwareAvailable` appears character-identically in 2 files — app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt, duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/contextual/DuckChatContextualWebViewFragment.kt. 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 app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt:3013— `acceptsOnly("video/", fileChooserParams.acceptTypes) && cameraHardwareAvailable` appears character-identically in 2 files — app/src/main/java/com/duckduckgo/app/browser/BrowserTabViewModel.kt, duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/contextual/DuckChatContextualWebViewFragment.kt. 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 content-scope-scripts/content-scope-scripts-impl/src/main/java/com/duckduckgo/contentscopescripts/impl/messaging/ContentScopeScriptsJsMessaging.kt:402— `allowedDomains.contains(host) || (eTld != null && allowedDomains.contains(eTld))` appears character-identically in 2 files — content-scope-scripts/content-scope-scripts-impl/src/main/java/com/duckduckgo/contentscopescripts/impl/messaging/ContentScopeScriptsJsMessaging.kt, subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/messaging/SubscriptionMessagingInterface.kt. 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 app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/ui/tracker_activity/DeviceShieldTrackerActivityViewModel.kt:190— `alwaysOnState.enabled && alwaysOnState.lockedDown` appears character-identically in 2 files — app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/ui/tracker_activity/DeviceShieldTrackerActivityViewModel.kt, network-protection/network-protection-impl/src/main/java/com/duckduckgo/networkprotection/impl/management/NetworkProtectionManagementViewModel.kt. 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 app/src/main/java/com/duckduckgo/app/clipboard/ClipboardInteractorImpl.kt:55— `appBuildConfig.manufacturer == "samsung" && (appBuildConfig.sdkInt == VERSION_CODES.S || appBuildConfig.sdkInt == VERSION_CODES.S_V2)` appears character-identically in 3 files — app/src/main/java/com/duckduckgo/app/clipboard/ClipboardInteractorImpl.kt, autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/ui/credential/management/AutofillClipboardInteractor.kt, autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/ui/credential/passwordgeneration/AutofillUseGeneratedPasswordDialogFragment.kt. 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 autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/deviceauth/AuthLauncher.kt:147— `appBuildConfig.sdkInt != Build.VERSION_CODES.Q && appBuildConfig.sdkInt != Build.VERSION_CODES.P` appears character-identically in 2 files — autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/deviceauth/AuthLauncher.kt, autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/deviceauth/DeviceAuthenticator.kt. 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 autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/promo/ImportInPasswordsVisibility.kt:86— `autofillFeature.self().isEnabled() && autofillFeature.canImportFromGooglePasswordManager().isEnabled()` appears character-identically in 3 files — autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/importing/promo/ImportInPasswordsVisibility.kt, autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/ui/credential/management/AutofillPasswordsManagementViewModel.kt, autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/ui/settings/AutofillSettingsViewModel.kt. 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 codegen/codegen-ksp/src/main/java/com/duckduckgo/codegen/ksp/ContributesPluginPointProcessor.kt:104— `boundType != null && boundType.declaration.qualifiedName?.asString() != "kotlin.Unit"` appears character-identically in 2 files — codegen/codegen-ksp/src/main/java/com/duckduckgo/codegen/ksp/ContributesPluginPointProcessor.kt, codegen/codegen-ksp/src/main/java/com/duckduckgo/codegen/ksp/ContributesServiceApiProcessor.kt. 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 codegen/codegen-ksp/src/main/java/com/duckduckgo/codegen/ksp/ContributesActivePluginPointProcessor.kt:298— `boundTypeType != null && boundTypeType.declaration.qualifiedName?.asString() != "kotlin.Unit"` appears character-identically in 2 files — codegen/codegen-ksp/src/main/java/com/duckduckgo/codegen/ksp/ContributesActivePluginPointProcessor.kt, codegen/codegen-ksp/src/main/java/com/duckduckgo/codegen/ksp/ContributesRemoteFeatureProcessor.kt. 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 sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/engine/SyncGzipInterceptor.kt:51— `chain.request().url.toString().contains(SyncService.SYNC_PROD_ENVIRONMENT_URL) || chain.request().url.toString().contains(SyncService.SYNC_D…` appears character-identically in 3 files — sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/engine/SyncGzipInterceptor.kt, sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/engine/SyncInvalidTokenInterceptor.kt, sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/engine/SyncServerUnavailableInterceptor.kt. 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 app/src/main/java/com/duckduckgo/app/browser/filechooser/FileChooserIntentBuilder.kt:56— `clipData != null && clipData.itemCount > 0` appears character-identically in 2 files — app/src/main/java/com/duckduckgo/app/browser/filechooser/FileChooserIntentBuilder.kt, duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/filechooser/FileChooserIntentBuilder.kt. 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 app/src/main/java/com/duckduckgo/app/browser/omnibar/OmnibarLayout.kt:1479— `color == Color.WHITE || Color.alpha(color) < 128` appears character-identically in 2 files — app/src/main/java/com/duckduckgo/app/browser/omnibar/OmnibarLayout.kt, app/src/main/java/com/duckduckgo/app/browser/omnibar/animations/addressbar/AddressBarTrackersAnimator.kt. 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 autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/service/AutofillSimpleCredentialsListFragment.kt:208— `credentials.isEmpty() && credentialSearchQuery.isEmpty()` appears character-identically in 2 files — autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/service/AutofillSimpleCredentialsListFragment.kt, autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/ui/credential/management/viewing/AutofillManagementListMode.kt. 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 app/src/main/java/com/duckduckgo/app/browser/newtab/FavoritesQuickAccessAdapter.kt:183— `dX.absoluteValue > 10 || dY.absoluteValue > 10` appears character-identically in 2 files — app/src/main/java/com/duckduckgo/app/browser/newtab/FavoritesQuickAccessAdapter.kt, saved-sites/saved-sites-impl/src/main/java/com/duckduckgo/savedsites/impl/newtab/FavouritesNewTabSectionsAdapter.kt. 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 pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/store/PirEventsRepository.kt:297— `database != null && database.databaseContentsAreReadable()` appears character-identically in 3 files — pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/store/PirEventsRepository.kt, pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/store/PirRepository.kt, pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/store/PirSchedulingRepository.kt. 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 lint-rules/src/main/java/com/duckduckgo/lint/ui/DaxListItemColorUsageDetector.kt:163— `declarationText.contains(ARBITRARY_COLOR_ACCESS_REGEX) || declarationText.contains(ARBITRARY_COLOR_CONSTRUCTOR_REGEX)` appears character-identically in 2 files — lint-rules/src/main/java/com/duckduckgo/lint/ui/DaxListItemColorUsageDetector.kt, lint-rules/src/main/java/com/duckduckgo/lint/ui/DaxTextColorUsageDetector.kt. 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 autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/AutofillGlobalCapabilityChecker.kt:48— `deviceAuthenticator.isAuthenticationRequiredForAutofill() && !deviceAuthenticator.hasValidDeviceAuthentication()` appears character-identically in 3 files — autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/AutofillGlobalCapabilityChecker.kt, autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/ui/credential/management/AutofillPasswordsManagementViewModel.kt, autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/ui/settings/AutofillSettingsViewModel.kt. 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 pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/common/actions/BrokerActionFailedEventHandler.kt:168— `event.error is PirError.ActionError && event.error.actionID != currentBrokerStepAction.id` appears character-identically in 2 files — pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/common/actions/BrokerActionFailedEventHandler.kt, pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/common/actions/ErrorReceivedHandler.kt. 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 ad-click/ad-click-impl/src/main/java/com/duckduckgo/adclick/impl/metrics/AdClickAttributedMetric.kt:137— `eventStats.daysWithEvents == 0 || eventStats.rollingAverage == 0.0` appears character-identically in 3 files — ad-click/ad-click-impl/src/main/java/com/duckduckgo/adclick/impl/metrics/AdClickAttributedMetric.kt, attributed-metrics/attributed-metrics-impl/src/main/java/com/duckduckgo/app/attributed/metrics/search/SearchAttributedMetric.kt, duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/metric/DuckAiAttributedMetric.kt. 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 app/src/main/java/com/duckduckgo/app/cta/ui/CtaViewModel.kt:466— `extendedOnboardingFeatureToggles.freeTrialCopy().isEnabled() && subscriptions.isFreeTrialEligible()` appears character-identically in 2 files — app/src/main/java/com/duckduckgo/app/cta/ui/CtaViewModel.kt, app/src/main/java/com/duckduckgo/app/cta/ui/SubscriptionPromoModalDecider.kt. 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 pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/dashboard/messaging/handlers/PirWebAddNameToCurrentUserProfileMessageHandler.kt:60— `firstName.isBlank() || lastName.isBlank()` appears character-identically in 2 files — pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/dashboard/messaging/handlers/PirWebAddNameToCurrentUserProfileMessageHandler.kt, pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/dashboard/messaging/handlers/PirWebSetNameAtIndexInCurrentUserProfileMessageHandler.kt. 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.
Silent fallback default in catch subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/repository/AuthRepository.kt:248— `getSubscription` swallows every exception into `emptyList()` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch or in the KDoc, and the row stops firing.
Silent fallback default in catch subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/repository/AuthRepository.kt:379— `getPendingPlans` swallows every exception into `emptyList()` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch or in the KDoc, and the row stops firing.
Silent fallback default in catch subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/repository/AuthRepository.kt:449— `toProductList` swallows every exception into `emptyList()` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch or in the KDoc, and the row stops firing.
Silent fallback default in catch statistics/statistics-impl/src/main/java/com/duckduckgo/app/statistics/api/StatisticsRequester.kt:202— `emailSignInState` swallows every exception into `0` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch or in the KDoc, and the row stops firing.
Silent fallback default in catch privacy-dashboard/privacy-dashboard-impl/src/main/java/com/duckduckgo/privacy/dashboard/impl/ui/PrivacyDashboardPayloadAdapter.kt:42— `onUrlClicked` swallows every exception into `""` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch or in the KDoc, and the row stops firing.
Silent fallback default in catch privacy-dashboard/privacy-dashboard-impl/src/main/java/com/duckduckgo/privacy/dashboard/impl/ui/PrivacyDashboardPayloadAdapter.kt:47— `onOpenSettings` swallows every exception into `""` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch or in the KDoc, and the row stops firing.
Silent fallback default in catch privacy-dashboard/privacy-dashboard-impl/src/main/java/com/duckduckgo/privacy/dashboard/impl/ui/PrivacyDashboardPayloadAdapter.kt:57— `onGetToggleReportOptions` swallows every exception into `""` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch or in the KDoc, and the row stops firing.
Silent fallback default in catch network-protection/network-protection-impl/src/main/java/com/duckduckgo/networkprotection/impl/config/NetPDefaultConfigProvider.kt:124— `fallbackDns` swallows every exception into `emptySet()` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch or in the KDoc, and the row stops firing.
Silent fallback default in catch event-hub/event-hub-impl/src/main/java/com/duckduckgo/eventhub/impl/pixels/EventHubRepository.kt:89— `parseParamsJson` swallows every exception into `emptyMap()` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch or in the KDoc, and the row stops firing.
Silent fallback default in catch duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/history/ChatHistoryRepository.kt:135— `parseIsoMillis` swallows every exception into `0L` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch or in the KDoc, and the row stops firing.
Silent fallback default in catch autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/service/mapper/PackageManagerExtension.kt:35— `getSHA256HexadecimalFingerprintCompat` swallows every exception into `emptyList()` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch or in the KDoc, and the row stops firing.
Silent fallback default in catch autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/ui/credential/management/survey/AutofillSurveyJsonParser.kt:46— `parseJson` swallows every exception into `emptyList()` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch or in the KDoc, and the row stops firing.
Silent fallback default in catch autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/ui/credential/management/survey/AutofillSurveyStore.kt:81— `availableSurveys` swallows every exception into `emptyList()` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch or in the KDoc, and the row stops firing.
Silent fallback default in catch app/src/main/java/com/duckduckgo/app/browser/SpecialUrlDetector.kt:156— `queryActivities` swallows every exception into `emptyList()` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch or in the KDoc, and the row stops firing.
Silent fallback default in catch app/src/main/java/com/duckduckgo/app/browser/trafficquality/remote/FeaturesRequestHeaderSettingStore.kt:63— `getConfig` swallows every exception into `emptyList()` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch or in the KDoc, and the row stops firing.
Silent fallback default in catch app/src/main/java/com/duckduckgo/app/trackerdetection/blocklist/BlockListInterceptorApiPlugin.kt:76— `intercept` swallows every exception into `emptyMap()` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch or in the KDoc, and the row stops firing.
Silent fallback default in catch app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/blocklist/AppTPBlockListInterceptorApiPlugin.kt:88— `intercept` swallows every exception into `emptyMap()` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch or in the KDoc, and the row stops firing.
Silent fallback default in catch app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/network/DnsProviderImpl.kt:44— `getPrivateDns` swallows every exception into `emptyList()` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch or in the KDoc, and the row stops firing.
Silent fallback default in catch app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/network/util/NetworkUtil.kt:44— `getSystemActiveNetworkDefaultDns` swallows every exception into `emptyList()` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch or in the KDoc, and the row stops firing.
Silent fallback default in catch app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/network/util/NetworkUtil.kt:95— `getUnderlyingNetworks` swallows every exception into `emptyList()` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. 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 in the catch or in the KDoc, and the row stops firing.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 35 significant file(s) lose their only recent owner: sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/ui/dashboard/SyncActivity.kt, sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/ui/pairing/process/ProcessSyncCodeViewModel.kt, sync/sync-internal/src/main/java/com/duckduckgo/sync/internal/ui/SyncV2PairingDebugViewModel.kt, sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/exchange/v2/ExchangeV2Message.kt, sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/ui/pairing/read/camera/ReadSyncCodeCameraFragment.kt, sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/ui/pairing/show/DisplayQrCodeViewModel.kt, sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/ui/devices/EditDeviceActivity.kt, sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/ui/pairing/process/ProcessSyncCodeActivity.kt (+27 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 36 significant file(s) lose their only recent owner: perf-benchmarks/pageload_benchmark.py, android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/compose/listitem/DaxListItem.kt, android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/compose/appbars/DaxSearchTopAppBar.kt, app/src/main/java/com/duckduckgo/app/browser/postidle/RealPostIdleSessionWideEvent.kt, macrobenchmark/src/main/java/com/duckduckgo/macrobenchmark/PageLoadBenchmark.kt, app/src/main/java/com/duckduckgo/app/cta/ui/WavingDaxController.kt, android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/compose/appbars/DaxTopAppBar.kt, android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/compose/skeleton/DaxSkeleton.kt (+28 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #3 — If anonymized user #3 becomes unavailable, 26 significant file(s) lose their only recent owner: sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/ThirdPartyCredentialManager.kt, sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/ThirdPartyDeviceListDecryptor.kt, sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/AccountInfoKeyManager.kt, REDACTED, sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/AccountInfoDdgWrapRepairer.kt, sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/DeviceInfoMigrator.kt, sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/AccountInfoPrivateKeyProvider.kt, sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/DeviceInfoUpdater.kt (+18 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #4 — If anonymized user #4 becomes unavailable, 17 significant file(s) lose their only recent owner: autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/store/keys/SecureStorageKeyStore.kt, app/src/main/java/com/duckduckgo/app/browser/WebViewCompatTestHelper.kt, autoconsent/autoconsent-impl/src/main/java/com/duckduckgo/autoconsent/impl/prompt/CookiePopupOptInActivity.kt, ad-blocking/ad-blocking-impl/src/main/java/com/duckduckgo/adblocking/impl/domain/ScriptletUpdater.kt, autoconsent/autoconsent-impl/src/main/java/com/duckduckgo/autoconsent/impl/prompt/CookiePopupOptInViewModel.kt, app/src/main/java/com/duckduckgo/app/permissions/PermissionsViewModel.kt, malicious-site-protection/malicious-site-protection-impl/src/main/kotlin/com/duckduckgo/malicioussiteprotection/impl/MaliciousSiteModule.kt, app/src/main/java/com/duckduckgo/app/browser/applinks/AppLinksSnackBarConfigurator.kt (+9 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #5 — If anonymized user #5 becomes unavailable, 16 significant file(s) lose their only recent owner: network-protection/network-protection-impl/src/main/java/com/duckduckgo/networkprotection/impl/subscription/onboarding/SubscriptionOnboardingVpnFragment.kt, network-protection/network-protection-impl/src/main/java/com/duckduckgo/networkprotection/impl/subscription/onboarding/SubscriptionOnboardingVpnViewModel.kt, subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/onboarding/SubscriptionOnboardingViewModel.kt, app/src/main/java/com/duckduckgo/app/survey/rmf/DefaultSurveyParameters.kt, subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/notification/SubscriptionExpirationReminderNotification.kt, subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/onboarding/SubscriptionOnboardingActivity.kt, duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/subscriptiononboarding/SubscriptionOnboardingDuckAiViewModel.kt, subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/onboarding/features/SubscriptionOnboardingFeaturesSummaryFragment.kt (+8 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #6 — If anonymized user #6 becomes unavailable, 18 significant file(s) lose their only recent owner: remote-messaging/remote-messaging-impl/src/main/java/com/duckduckgo/remote/messaging/impl/modal/cardslist/CardsListAdapter.kt, remote-messaging/remote-messaging-impl/src/main/java/com/duckduckgo/remote/messaging/impl/store/RemoteMessageImageStore.kt, android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/compose/panel/DaxPanel.kt, request-interception/request-interception-impl/src/main/java/com/duckduckgo/request/interception/impl/RealRequestBlocklist.kt, app/src/main/java/com/duckduckgo/app/browser/tabs/TabReuseDistanceReporter.kt, remote-messaging/remote-messaging-impl/src/main/java/com/duckduckgo/remote/messaging/impl/mappers/CardItemAdapter.kt, privacy-config/privacy-config-impl/src/main/java/com/duckduckgo/privacy/config/impl/PrivacyConfigDownloadTelemetry.kt, android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/compose/panel/DaxAlertPanel.kt (+10 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #7 — If anonymized user #7 becomes unavailable, 14 significant file(s) lose their only recent owner: app/src/main/java/com/duckduckgo/app/onboarding/ui/page/welcome/engine/DialogRenderEngine.kt, app/src/main/java/com/duckduckgo/app/onboarding/ui/page/welcome/binders/ComparisonChartBinder.kt, app/src/main/java/com/duckduckgo/app/onboarding/ui/page/welcome/binders/PreferenceSelectorBinder.kt, app/src/main/java/com/duckduckgo/app/onboarding/ui/page/ComparisonChartConfig.kt, app/src/main/java/com/duckduckgo/app/onboarding/ui/page/welcome/binders/DownloadReasonBinder.kt, app/src/main/java/com/duckduckgo/app/onboarding/ui/page/welcome/binders/QuickSetupBinder.kt, app/src/main/java/com/duckduckgo/app/onboarding/CustomAiOnboardingStore.kt, app/src/main/java/com/duckduckgo/app/onboarding/SegmentedOnboardingExperimentMetrics.kt (+6 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #8 — If anonymized user #8 becomes unavailable, 14 significant file(s) lose their only recent owner: statistics/statistics-impl/src/main/java/com/duckduckgo/app/statistics/wideevents/db/WideEventRepositoryImpl.kt, statistics/statistics-api/src/main/java/com/duckduckgo/app/statistics/wideevents/WideEventClient.kt, statistics/statistics-impl/src/main/java/com/duckduckgo/app/statistics/wideevents/db/WideEventEntity.kt, statistics/statistics-impl/src/main/java/com/duckduckgo/app/statistics/wideevents/WideEventClientImpl.kt, network-protection/network-protection-impl/src/main/java/com/duckduckgo/networkprotection/impl/pixels/VpnEnableWideEvent.kt, statistics/statistics-impl/src/main/java/com/duckduckgo/app/statistics/wideevents/PixelWideEventSender.kt, app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/pixels/VpnEnableWideEvent.kt, statistics/statistics-impl/src/main/java/com/duckduckgo/app/statistics/wideevents/db/Mappers.kt (+6 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #9 — If anonymized user #9 becomes unavailable, 14 significant file(s) lose their only recent owner: pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/wideevents/PirScanWideEvent.kt, pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/dashboard/messaging/handlers/PirWebSaveProfileMessageHandler.kt, pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/wideevents/PirInitialScanCompletionWideEvent.kt, pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/dashboard/state/PirDashboardInitialScanStateProvider.kt, pir/pir-internal/src/main/java/com/duckduckgo/pir/internal/settings/PirDevSettingsActivity.kt, pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/dashboard/state/PirWebProfileStateHolder.kt, pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/pixels/PirInteractionReporter.kt, pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/dashboard/messaging/handlers/PirWebGetDataBrokersMessageHandler.kt (+6 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #10 — If anonymized user #10 becomes unavailable, 10 significant file(s) lose their only recent owner: app/src/main/java/com/duckduckgo/app/fire/store/FireDataStore.kt, app/src/main/java/com/duckduckgo/app/tabs/ui/BrowserModeToggleView.kt, android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/compose/slider/DaxSlider.kt, app/src/main/java/com/duckduckgo/app/fire/FireModeLastTabObserver.kt, app/src/main/java/com/duckduckgo/app/di/BrowserModeActivityModule.kt, app/src/main/java/com/duckduckgo/app/browser/tabpreview/WebViewPreviewPersister.kt, lint-rules/src/main/java/com/duckduckgo/lint/ui/NoRawM3SliderUsageDetector.kt, data-clearing/data-clearing-impl/src/main/java/com/duckduckgo/dataclearing/impl/toggles/RealDataClearingModularization.kt (+2 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #11 — If anonymized user #11 becomes unavailable, 8 significant file(s) lose their only recent owner: pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/common/NativeBrokerActionHandler.kt, pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/brokers/BrokerJsonUpdater.kt, duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/DuckChatVoiceMicrophoneService.kt, scripts/pir-broker-update/update_pir_brokers.py, saved-sites/saved-sites-impl/src/main/java/com/duckduckgo/savedsites/impl/dialogs/EditBookmarkFolderDialogFragment.kt, duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/DuckChatVoiceNotificationActionReceiver.kt, saved-sites/saved-sites-impl/src/main/java/com/duckduckgo/savedsites/impl/sync/DisplayModeSyncSetting.kt, saved-sites/saved-sites-impl/src/main/java/com/duckduckgo/savedsites/impl/dialogs/AddBookmarkFolderDialogFragment.kt. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #12 — If anonymized user #12 becomes unavailable, 7 significant file(s) lose their only recent owner: voice-search/voice-search-impl/src/main/java/com/duckduckgo/voice/impl/VoiceSearchPermissionDialogsLauncher.kt, app/src/main/java/com/duckduckgo/app/trackerdetection/api/RealTrackerDataDownloader.kt, app/src/main/java/com/duckduckgo/app/browser/progressbar/ShimmerRenderer.kt, app/src/main/java/com/duckduckgo/app/browser/CoordinatorLayoutHelper.kt, app/src/main/java/com/duckduckgo/app/global/rating/AppRatingPromptEvaluator.kt, app/src/main/java/com/duckduckgo/app/trackerdetection/CloakedCnameDetector.kt, app/src/main/java/com/duckduckgo/app/browser/modals/SubscriptionPromoModalEvaluator.kt. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #13 — If anonymized user #13 becomes unavailable, 6 significant file(s) lose their only recent owner: duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/nativeinput/edit/EditPromptActivity.kt, versioning.gradle, duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/nativeinput/views/StartChatView.kt, duckchat/duckchat-api/src/main/java/com/duckduckgo/duckchat/api/inputscreen/SingleViewChatTabItem.kt, duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/nativeinput/views/StopStreamingView.kt, duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/nativeinput/views/PickerMenuRow.kt. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #14 — If anonymized user #14 becomes unavailable, 4 significant file(s) lose their only recent owner: app/src/main/java/com/duckduckgo/app/browser/errorpage/BadUrlErrorPageWideEvent.kt, app/src/main/java/com/duckduckgo/app/browser/suggestredirect/DnsLookup.kt, app/src/main/java/com/duckduckgo/app/browser/suggestredirect/SuggestRedirectEvaluator.kt, app/src/main/java/com/duckduckgo/app/browser/suggestredirect/HostnameResolver.kt. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #15 — If anonymized user #15 becomes unavailable, 4 significant file(s) lose their only recent owner: duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/contextual/suggestions/ContextualSuggestionsMatcher.kt, duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/contextual/suggestions/ContextualSuggestedPromptsProvider.kt, duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/contextual/suggestions/ContextualSuggestionsViewModel.kt, app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/service/DnsChangeCallback.kt. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #16 — If anonymized user #16 becomes unavailable, 5 significant file(s) lose their only recent owner: settings/settings-impl/src/main/java/com/duckduckgo/settings/impl/serpsettings/messaging/SerpSettingsSubscriptionEventPlugin.kt, settings/settings-impl/src/main/java/com/duckduckgo/settings/impl/serpsettings/RealSerpSettingsDataProvider.kt, privacy-config/privacy-config-store/src/main/java/com/duckduckgo/privacy/config/store/features/trackerallowlist/TrackerAllowlistRepository.kt, app/src/main/java/com/duckduckgo/app/trackerdetection/CachedTdsEntityLookup.kt, privacy-config/privacy-config-impl/src/main/java/com/duckduckgo/privacy/config/impl/features/trackerallowlist/RealTrackerAllowlist.kt. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #17 — If anonymized user #17 becomes unavailable, 4 significant file(s) lose their only recent owner: lint-rules/src/main/java/com/duckduckgo/lint/MetricsPixelNumericValueDetector.kt, lint-rules/src/main/java/com/duckduckgo/lint/NoMetricsPixelExtensionUsageDetector.kt, feature-toggles/feature-toggles-impl/src/main/java/com/duckduckgo/feature/toggles/impl/MetricsPixelStore.kt, feature-toggles/feature-toggles-api/src/main/java/com/duckduckgo/feature/toggles/api/MetricsPixelPlugin.kt. Pair on, review, or document these before any departure.
DM2 · Strongly-typed ids· Primitive id on a domain type · ×16
Primitive id on a domain type: Relation.folderId saved-sites/saved-sites-store/src/main/java/com/duckduckgo/savedsites/store/RoomEntities.kt:60— `Relation.folderId` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that.
Primitive id on a domain type: Relation.entityId saved-sites/saved-sites-store/src/main/java/com/duckduckgo/savedsites/store/RoomEntities.kt:61— `Relation.entityId` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that.
Primitive id on a domain type: RemoteMessagingCohort.messageId remote-messaging/remote-messaging-store/src/main/java/com/duckduckgo/remote/messaging/store/RemoteMessagingCohort.kt:24— `RemoteMessagingCohort.messageId` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that.
Primitive id on a domain type: StoredExtractedProfile.profileQueryId pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/store/db/ExtractedProfileEntities.kt:41— `StoredExtractedProfile.profileQueryId` is a raw `Long` — give it a strongly-typed id: a dedicated single-field type wrapping the `Long`, in whatever form your language spells that.
Primitive id on a domain type: StoredExtractedProfile.reportId pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/store/db/ExtractedProfileEntities.kt:51— `StoredExtractedProfile.reportId` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that.
Primitive id on a domain type: ScanCompletedBroker.profileQueryId pir/pir-impl/src/main/java/com/duckduckgo/pir/impl/store/db/ScanResultsEntities.kt:31— `ScanCompletedBroker.profileQueryId` is a raw `Long` — give it a strongly-typed id: a dedicated single-field type wrapping the `Long`, in whatever form your language spells that.
Primitive id on a domain type: Started.rootPlanId onboarding/onboarding-api/src/main/java/com/duckduckgo/onboarding/api/LinearOnboardingOrchestrator.kt:68— `Started.rootPlanId` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that.
Primitive id on a domain type: NetPManuallyExcludedApp.packageId network-protection/network-protection-store/src/main/java/com/duckduckgo/networkprotection/store/db/NetPExclusionListEntities.kt:24— `NetPManuallyExcludedApp.packageId` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that.
Primitive id on a domain type: NetPEgressServer.publicKey network-protection/network-protection-store/src/main/java/com/duckduckgo/networkprotection/store/remote_config/NetPEgressServer.kt:27— `NetPEgressServer.publicKey` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that.
Primitive id on a domain type: Action.tabId duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/wideevents/DuckAiSelectionJourneyWideEvent.kt:184— `Action.tabId` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that.
Primitive id on a domain type: AppTracker.trackerCompanyId app-tracking-protection/vpn-store/src/main/java/com/duckduckgo/mobile/android/vpn/trackers/AppTracker.kt:28— `AppTracker.trackerCompanyId` is a raw `Int` — give it a strongly-typed id: a dedicated single-field type wrapping the `Int`, in whatever form your language spells that.
Primitive id on a domain type: AppTrackerExcludedPackage.packageId app-tracking-protection/vpn-store/src/main/java/com/duckduckgo/mobile/android/vpn/trackers/AppTracker.kt:51— `AppTrackerExcludedPackage.packageId` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that.
Primitive id on a domain type: AppTrackerSystemAppOverridePackage.packageId app-tracking-protection/vpn-store/src/main/java/com/duckduckgo/mobile/android/vpn/trackers/AppTracker.kt:63— `AppTrackerSystemAppOverridePackage.packageId` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that.
Primitive id on a domain type: AppTrackerManualExcludedApp.packageId app-tracking-protection/vpn-store/src/main/java/com/duckduckgo/mobile/android/vpn/trackers/AppTracker.kt:87— `AppTrackerManualExcludedApp.packageId` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that.
Primitive id on a domain type: Notification.notificationId app-database/src/main/java/com/duckduckgo/app/notification/model/Notification.kt:27— `Notification.notificationId` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that.
Primitive id on a domain type: Survey.surveyId app-database/src/main/java/com/duckduckgo/app/survey/model/Survey.kt:28— `Survey.surveyId` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that.
README/code drift data-store/readme.md:9— data-store/readme.md links to `❓`, but `data-store/❓` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift duckchat/readme.md:11— duckchat/readme.md links to `❓`, but `duckchat/❓` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift example-feature/readme.md:10— example-feature/readme.md links to `❓`, but `example-feature/❓` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift .github/actions/pr-asana-sync/README.md:14— .github/actions/pr-asana-sync/README.md links to `./.github/workflows/asana.yml`, but `.github/actions/pr-asana-sync/.github/workflows/asana.yml` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift .github/actions/pr-asana-sync/README.md:47— .github/actions/pr-asana-sync/README.md documents the environment variable `NO_AUTOCLOSE_PROJECTS`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift .github/actions/pr-asana-sync/README.md:50— .github/actions/pr-asana-sync/README.md documents the environment variable `SKIPPED_USERS`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
Interpolated log message defeats structured logging scripts/piranha/clean.py:34— `info` at line 34 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging scripts/piranha/clean.py:56— `info` at line 56 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
Subsumed condition operand network-protection/network-protection-impl/src/test/java/com/duckduckgo/networkprotection/impl/reddit/RedditBlockWorkaroundTest.kt:176— `url.startsWith("https")` can never decide this `||` — every value satisfying `url.startsWith("https")` also satisfies `url.startsWith("http")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
Subsumed condition operand privacy-config/privacy-config-impl/src/main/java/com/duckduckgo/privacy/config/impl/features/amplinks/RealAmpLinks.kt:120— `extractedUrl.startsWith("https")` can never decide this `||` — every value satisfying `extractedUrl.startsWith("https")` also satisfies `extractedUrl.startsWith("http")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
C5 · Data-Subject Rights· Partial data-subject-rights support · ×1
Partial data-subject-rights support — Corroborated rights: erasure ✓ · export ✗ · consent ✗. Each tick means this scan found code in the repository implementing that right — a deletion/anonymisation path for erasure, a data-export or portability path for export, and consent state recorded alongside the personal data it authorises. A ✗ therefore means no such code was recognised HERE, not that the right is unsupported: a capability provided by a platform, a manual runbook, or code spelled in a way this scan does not match is not visible to it. Confirm before treating a cross as a gap; where it is one, the right has to be fulfilled manually.
D16 · Bus Factor· Further sole-owners (lower concentration) · ×1
Further sole-owners (lower concentration) — 5 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 (244 single-owned of 2275 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 2275 of the 4503 production source files in this repository met that bar). They are anonymized user #18 (2 file(s)), anonymized user #19 (1 file(s)), anonymized user #20 (1 file(s)), anonymized user #21 (1 file(s)), anonymized user #22 (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: android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/compose/message/DaxAppTPBanner.kt, subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/internal/PaywallPathProvider.kt, app/src/main/java/com/duckduckgo/app/browser/returnsession/RealReturnSessionWideEvent.kt, downloads/downloads-impl/src/main/java/com/duckduckgo/downloads/impl/DownloaderUtil.kt, broken-site/broken-site-impl/src/main/java/com/duckduckgo/brokensite/impl/BrokenSiteReportRepository.kt, sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/metrics/SyncDevicesAttributeMetric.kt.
No ADRs found — 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/`.
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion — 13 of 195 project(s) overshoot their size bounds, lowering Project Cohesion to 8.7/10. The most over is `app` (109604 LoC, 3225 module-visible types across 233 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.
D34 · Knowledge Freshness· Orphaned files with no living knowledge · ×1
Orphaned files with no living knowledge — 64 of 2275 analysed file(s) have no living knowledge left — their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 2275 of the 4503 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each — most significant first: android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/DaxDialog.kt, cookies/cookies-impl/src/main/java/com/duckduckgo/cookies/impl/features/firstparty/FirstPartyCookiesModifier.kt, android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/LottieDaxDialog.kt, app/src/main/java/com/duckduckgo/app/survey/ui/SurveyActivity.kt, app/src/main/java/com/duckduckgo/app/email/AppEmailManager.kt, autoconsent/autoconsent-impl/src/main/java/com/duckduckgo/autoconsent/impl/handlers/OptOutAndAutoconsentDoneMessageHandlerPlugin.kt, app/src/internal/java/com/duckduckgo/app/audit/AuditSettingsActivity.kt, subscriptions/subscriptions-impl/src/main/java/com/duckduckgo/subscriptions/impl/settings/views/ItrSettingView.kt (and 56 more). 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.
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.
Logging is not universal — Only 3/6 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `common/common-utils`, `perf-benchmarks`.
No SAST — No static application security testing detected. For this repository's stack, add spotbugs with find-sec-bugs (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 361016 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.
Changelog looks stale/thin — The changelog this check read carries 0 versioned entries, against a bar of 3. Counted as either the distinct `x.y.z` versions it names (a link's target is not counted) or its version-shaped section headings (`## [1.2.0]`, `## V14.x.x`, `## Updates in 8.0.x`), whichever is the larger — so a log sectioned by minor series counts its sections, not its individual patch numbers. Entries recorded somewhere this check does not read — release notes generated at tag time from a generator config it did not recognise, or a log kept outside the repository — are not counted here, and this row is about what is re-findable in the tree rather than about how often you release.
X2 · Cancellation propagation· Not all suspend functions that make a request accept the coroutine's cancellation · ×1
Not all suspend functions that make a request accept the coroutine's cancellation — Only 0/4 suspend functions that make a cancellable request (Ktor, OkHttp newCall, URL streams) accept the coroutine's cancellation or pass one on, so a request keeps running after whatever wanted it has given up — a screen navigated away from, a disposed widget, a superseded search. In a suspend function, make the request with a call that suspends — Ktor, OkHttp's `executeAsync()`, or a `suspendCancellableCoroutine` that cancels the `Call` — not a blocking `execute()`: `withContext(Dispatchers.IO)` moves the call off the caller's thread but does not make it cancellable; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
Outdated: fastlane — `fastlane` is resolved to 2.217.0 in the committed REDACTED but 2.241.1 is the current release on rubygems.org, and Gemfile declares no version requirement for it, so nothing but the lockfile is holding it back. This build is therefore missing every fix published since, including any security fix. Run `bundle update fastlane` and commit the updated REDACTED.
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.
trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
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 92 file(s) — `ad-click/ad-click-impl/src/main/java/com/duckduckgo/adclick/impl/store/exemptions/AdClickExemptionsDatabase.kt`, `android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/component/ComponentViewHolder.kt`, `android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/compose/theme/Typography.kt`, `android-design-system/design-system/src/main/java/com/duckduckgo/common/ui/view/ViewExtension.kt`, `app-database/src/main/java/com/duckduckgo/app/browser/session/WebViewSessionEntity.kt`, … (+87 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
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.
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.
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.
Run 01a16fdf-7636-71b0-97dd-88f04d304658 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 473 · Warnings: 976 · Recommendations: 169 · Info: 1 — Appendix A · all findings · full markdown report.
Generated by Watchdog — deterministic code-health analysis. 24-10-2026 @ 21:44 UTC.
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.