Public report of wangzhishou/OneBox, published 17 November 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 17 November 2026, 07:37 UTC · Survey ID cd_585af8d26fba4c258bcc024d5987b6f8
wangzhishou/OneBox
Measured 17 November 2026, 07:34 UTC, at code version de75fc1
First survey, so nothing to compare with yet
CAI scoreWeak
CriticalWeakAdequateStrongExemplary
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 very large codebase: 1,266,212 lines of product code in 158 projects, tests not counted · Estimated rebuild effort: about 10.1 person-years · Weakest lens: Code Health, 28.4
Findings by how serious they are
41 critical4438 serious170 minor
12 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Canine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
17 November 2026, 07:34 UTC
A measurement, not a certificate. The Code Assurance Index records a number
together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee
the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that
implements it, and today the Canine Code Analyzer is the only one that does.
The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸
85of 85 dimensions measured by tools.
4570of 4649 findings point to an exact file and line, so you can open each one in the code. The other 79 concern the repository as a whole, such as missing documentation.
85dimensions across 8 lenses, read from 1,266,212 lines of product code in 158 projects.
wangzhishou/OneBox falls short of our standard for production, held back most by its Code Health lens, the quality of the code itself. It scores 36.5 out of 100 and is rated Weak, and 12 of its 41 critical findings are security problems.
Code Health, at 28.4, is the weakest lens and counts most in the score. The best first step is fixing the password or key in the code, worth about 4.2 points. Adding type checking would lift Code Health itself, worth about 3.5 points. Raising Code Health to 70 would lift the score to about 43.2.
Nine pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. One automatic update takes new releases before a bad one can be spotted, and four form fields can't be read by a screen reader. Pinning each tool to an exact version, setting a waiting period for automatic updates and labelling the form fields would close these risks. The 11 pages that don't say their language need their language set.
The product code is 1,266,212 lines, about €1,500,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.
If Code Health rose from 28.4 to 70, the lowest score rated Strong, the score would rise from 36.5 to about 43.2.
Code composition: what the lines of code are
Product code 99%Tests 1%
Rebuild cost: about €1,500,000 · Estimate
Cost to rebuild
€490,000 to €2,400,000, for 8,106 to 25,717 hours of work, about 10.1 person-years for 6 to 20 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 36. 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
Very large: 1,266,212 lines of product code
What it is not
Not a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.
How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
Resolve the 1 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED.
Raises the score by about 4.2 points · Low effort · REDACTED Scanning
2
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
Raises the score by about 3.5 points · Medium effort · Type Safety
3
Resolve the 40 finding(s) in Cyclomatic Complexity.
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,500,000 to build again, about 10.1 person-years of work. Its weakest lens is Code Health, at 28.4 (Weak). Code Health is about how easy the code is to read and change safely, and code that is hard to read is slow and risky to change, so every future change costs more than it should. Because the weakest lens counts most in the score, work on Code Health also moves the score most.
Based on: the rebuild estimate · the Code Health grade · how much each lens counts
What to do: Start with the Code Health actions in Top priorities.
One cause behind 18 Domain Modelling findings · Common cause
18 findings in the Domain Modelling lens come from the same cause. The code models the business as objects, such as an order or a customer, and each object should guard its own rules: an order, for example, should refuse to be shipped before it has been paid. Here the objects don't do that. Some objects only hold data, while the rules that should keep that data valid sit elsewhere in the code. Identifiers, such as order numbers and customer numbers, are passed around as plain numbers or text, so nothing stops the code from using one kind where another belongs. Because all of these findings have the same cause, fixing it once, in the business objects themselves, deals with them together.
Based on: Rich vs anemic model (6 findings) · Strongly-typed ids (12 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 1 Leaked secret finding(s) in REDACTED Scanning. Of all the actions in this report, it raises the score most for the work it takes: about 4.2 points for low effort, because it clears the 1 REDACTED 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
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 7.0 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 3% to 6% on every change. The history of the code shows how much it changes: about 738,716 lines over the last 90 days, which is about 2,995,904 lines a year. At that pace, the extra work comes to an estimated 193.4 to 1160.3 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.
Architecture — module dependency graph
Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.
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.
3061 modules, with 6076 dependencies between them. 76 loops run through 213 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 3021 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.
shifenmiao.database.di uses shifenmiao.database, so a change to shifenmiao.database can break shifenmiao.database.di, while a change to shifenmiao.database.di can't break shifenmiao.database.
Position
Below the diagonal: shifenmiao.database.di uses a module listed above it, which is the healthy direction.
12→15 shifenmiao.model uses shifenmiao.model.aipart of a loop✕
Connections
3 pairs of types, where a type in shifenmiao.model uses a type in shifenmiao.model.ai.
shifenmiao.model uses shifenmiao.model.ai, so a change to shifenmiao.model.ai can break shifenmiao.model, while a change to shifenmiao.model can't break shifenmiao.model.ai.
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.
t8rin.imagetoolbox.core.domain.image.model uses t8rin.imagetoolbox.core.domain.model, so a change to t8rin.imagetoolbox.core.domain.model can break t8rin.imagetoolbox.core.domain.image.model, while a change to t8rin.imagetoolbox.core.domain.image.model can't break t8rin.imagetoolbox.core.domain.model.
Position
Below the diagonal: t8rin.imagetoolbox.core.domain.image.model uses a module listed above it, which is the healthy direction.
13→16 t8rin.imagetoolbox.core.domain.image.model uses t8rin.imagetoolbox.core.domain.imagepart of a loop✕
Connections
2 pairs of types, where a type in t8rin.imagetoolbox.core.domain.image.model uses a type in t8rin.imagetoolbox.core.domain.image.
t8rin.imagetoolbox.core.domain.image.model uses t8rin.imagetoolbox.core.domain.image, so a change to t8rin.imagetoolbox.core.domain.image can break t8rin.imagetoolbox.core.domain.image.model, while a change to t8rin.imagetoolbox.core.domain.image.model can't break t8rin.imagetoolbox.core.domain.image.
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.
shifenmiao.database.item.entity uses shifenmiao.model, so a change to shifenmiao.model can break shifenmiao.database.item.entity, while a change to shifenmiao.database.item.entity can't break shifenmiao.model.
Position
Below the diagonal: shifenmiao.database.item.entity uses a module listed above it, which is the healthy direction.
shifenmiao.model.ai uses shifenmiao.model, so a change to shifenmiao.model can break shifenmiao.model.ai, while a change to shifenmiao.model.ai can't break shifenmiao.model.
Position
Below the diagonal: shifenmiao.model.ai uses a module listed above it, which is the healthy direction.
t8rin.imagetoolbox.core.domain.image uses t8rin.imagetoolbox.core.domain.model, so a change to t8rin.imagetoolbox.core.domain.model can break t8rin.imagetoolbox.core.domain.image, while a change to t8rin.imagetoolbox.core.domain.image can't break t8rin.imagetoolbox.core.domain.model.
Position
Below the diagonal: t8rin.imagetoolbox.core.domain.image uses a module listed above it, which is the healthy direction.
t8rin.imagetoolbox.core.domain.image uses t8rin.imagetoolbox.core.domain.image.model, so a change to t8rin.imagetoolbox.core.domain.image.model can break t8rin.imagetoolbox.core.domain.image, while a change to t8rin.imagetoolbox.core.domain.image can't break t8rin.imagetoolbox.core.domain.image.model.
Position
Below the diagonal: t8rin.imagetoolbox.core.domain.image uses a module listed above it, which is the healthy direction.
t8rin.imagetoolbox.core.settings.domain.model uses t8rin.imagetoolbox.core.domain.model, so a change to t8rin.imagetoolbox.core.domain.model can break t8rin.imagetoolbox.core.settings.domain.model, while a change to t8rin.imagetoolbox.core.settings.domain.model can't break t8rin.imagetoolbox.core.domain.model.
Position
Below the diagonal: t8rin.imagetoolbox.core.settings.domain.model uses a module listed above it, which is the healthy direction.
t8rin.imagetoolbox.core.settings.domain.model uses t8rin.imagetoolbox.core.domain.image.model, so a change to t8rin.imagetoolbox.core.domain.image.model can break t8rin.imagetoolbox.core.settings.domain.model, while a change to t8rin.imagetoolbox.core.settings.domain.model can't break t8rin.imagetoolbox.core.domain.image.model.
Position
Below the diagonal: t8rin.imagetoolbox.core.settings.domain.model uses a module listed above it, which is the healthy direction.
shifenmiao.database.ai.entity uses shifenmiao.model.ai, so a change to shifenmiao.model.ai can break shifenmiao.database.ai.entity, while a change to shifenmiao.database.ai.entity can't break shifenmiao.model.ai.
Position
Below the diagonal: shifenmiao.database.ai.entity uses a module listed above it, which is the healthy direction.
shifenmiao.network.api uses shifenmiao.model, so a change to shifenmiao.model can break shifenmiao.network.api, while a change to shifenmiao.network.api can't break shifenmiao.model.
Position
Below the diagonal: shifenmiao.network.api uses a module listed above it, which is the healthy direction.
shifenmiao.network.api uses shifenmiao.model.ai, so a change to shifenmiao.model.ai can break shifenmiao.network.api, while a change to shifenmiao.network.api can't break shifenmiao.model.ai.
Position
Below the diagonal: shifenmiao.network.api uses a module listed above it, which is the healthy direction.
t8rin.imagetoolbox.core.domain.saving.model uses t8rin.imagetoolbox.core.domain.image.model, so a change to t8rin.imagetoolbox.core.domain.image.model can break t8rin.imagetoolbox.core.domain.saving.model, while a change to t8rin.imagetoolbox.core.domain.saving.model can't break t8rin.imagetoolbox.core.domain.image.model.
Position
Below the diagonal: t8rin.imagetoolbox.core.domain.saving.model uses a module listed above it, which is the healthy direction.
t8rin.imagetoolbox.core.domain.saving.model uses t8rin.imagetoolbox.core.domain.image, so a change to t8rin.imagetoolbox.core.domain.image can break t8rin.imagetoolbox.core.domain.saving.model, while a change to t8rin.imagetoolbox.core.domain.saving.model can't break t8rin.imagetoolbox.core.domain.image.
Position
Below the diagonal: t8rin.imagetoolbox.core.domain.saving.model uses a module listed above it, which is the healthy direction.
t8rin.imagetoolbox.core.settings.domain uses t8rin.imagetoolbox.core.domain.model, so a change to t8rin.imagetoolbox.core.domain.model can break t8rin.imagetoolbox.core.settings.domain, while a change to t8rin.imagetoolbox.core.settings.domain can't break t8rin.imagetoolbox.core.domain.model.
Position
Below the diagonal: t8rin.imagetoolbox.core.settings.domain uses a module listed above it, which is the healthy direction.
t8rin.imagetoolbox.core.settings.domain uses t8rin.imagetoolbox.core.domain.image.model, so a change to t8rin.imagetoolbox.core.domain.image.model can break t8rin.imagetoolbox.core.settings.domain, while a change to t8rin.imagetoolbox.core.settings.domain can't break t8rin.imagetoolbox.core.domain.image.model.
Position
Below the diagonal: t8rin.imagetoolbox.core.settings.domain uses a module listed above it, which is the healthy direction.
t8rin.imagetoolbox.core.settings.domain uses t8rin.imagetoolbox.core.settings.domain.model, so a change to t8rin.imagetoolbox.core.settings.domain.model can break t8rin.imagetoolbox.core.settings.domain, while a change to t8rin.imagetoolbox.core.settings.domain can't break t8rin.imagetoolbox.core.settings.domain.model.
Position
Below the diagonal: t8rin.imagetoolbox.core.settings.domain uses a module listed above it, which is the healthy direction.
179 pairs of types, where a type in wanbaohe.core.ui.utils.navigation.Screen uses a type in wanbaohe.core.ui.utils.navigation. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
wanbaohe.core.ui.utils.navigation.Screen uses wanbaohe.core.ui.utils.navigation, so a change to wanbaohe.core.ui.utils.navigation can break wanbaohe.core.ui.utils.navigation.Screen, while a change to wanbaohe.core.ui.utils.navigation.Screen can't break wanbaohe.core.ui.utils.navigation.
Position
Below the diagonal: wanbaohe.core.ui.utils.navigation.Screen uses a module listed above it, which is the healthy direction.
wanbaohe.core.ui.utils.navigation.Screen uses shifenmiao.model, so a change to shifenmiao.model can break wanbaohe.core.ui.utils.navigation.Screen, while a change to wanbaohe.core.ui.utils.navigation.Screen can't break shifenmiao.model.
Position
Below the diagonal: wanbaohe.core.ui.utils.navigation.Screen uses a module listed above it, which is the healthy direction.
wanbaohe.core.ui.utils.navigation.Screen uses shifenmiao.model.ai, so a change to shifenmiao.model.ai can break wanbaohe.core.ui.utils.navigation.Screen, while a change to wanbaohe.core.ui.utils.navigation.Screen can't break shifenmiao.model.ai.
Position
Below the diagonal: wanbaohe.core.ui.utils.navigation.Screen uses a module listed above it, which is the healthy direction.
shifenmiao.ai.agent.tool uses shifenmiao.database, so a change to shifenmiao.database can break shifenmiao.ai.agent.tool, while a change to shifenmiao.ai.agent.tool can't break shifenmiao.database.
Position
Below the diagonal: shifenmiao.ai.agent.tool uses a module listed above it, which is the healthy direction.
shifenmiao.ai.agent.tool uses shifenmiao.model.ai.tool, so a change to shifenmiao.model.ai.tool can break shifenmiao.ai.agent.tool, while a change to shifenmiao.ai.agent.tool can't break shifenmiao.model.ai.tool.
Position
Below the diagonal: shifenmiao.ai.agent.tool uses a module listed above it, which is the healthy direction.
shifenmiao.ai.agent.tool uses t8rin.imagetoolbox.core.domain.coroutines, so a change to t8rin.imagetoolbox.core.domain.coroutines can break shifenmiao.ai.agent.tool, while a change to shifenmiao.ai.agent.tool can't break t8rin.imagetoolbox.core.domain.coroutines.
Position
Below the diagonal: shifenmiao.ai.agent.tool uses a module listed above it, which is the healthy direction.
shifenmiao.ai.agent.tool uses wanbaohe.core.ui.utils.navigation, so a change to wanbaohe.core.ui.utils.navigation can break shifenmiao.ai.agent.tool, while a change to shifenmiao.ai.agent.tool can't break wanbaohe.core.ui.utils.navigation.
Position
Below the diagonal: shifenmiao.ai.agent.tool uses a module listed above it, which is the healthy direction.
shifenmiao.ai.agent.tool uses shifenmiao.model, so a change to shifenmiao.model can break shifenmiao.ai.agent.tool, while a change to shifenmiao.ai.agent.tool can't break shifenmiao.model.
Position
Below the diagonal: shifenmiao.ai.agent.tool uses a module listed above it, which is the healthy direction.
shifenmiao.ai.agent.tool uses shifenmiao.database.item.entity, so a change to shifenmiao.database.item.entity can break shifenmiao.ai.agent.tool, while a change to shifenmiao.ai.agent.tool can't break shifenmiao.database.item.entity.
Position
Below the diagonal: shifenmiao.ai.agent.tool uses a module listed above it, which is the healthy direction.
shifenmiao.ai.agent.tool uses shifenmiao.model.ai, so a change to shifenmiao.model.ai can break shifenmiao.ai.agent.tool, while a change to shifenmiao.ai.agent.tool can't break shifenmiao.model.ai.
Position
Below the diagonal: shifenmiao.ai.agent.tool uses a module listed above it, which is the healthy direction.
shifenmiao.ai.agent.tool uses shifenmiao.database.ai.entity, so a change to shifenmiao.database.ai.entity can break shifenmiao.ai.agent.tool, while a change to shifenmiao.ai.agent.tool can't break shifenmiao.database.ai.entity.
Position
Below the diagonal: shifenmiao.ai.agent.tool uses a module listed above it, which is the healthy direction.
shifenmiao.ai.request uses shifenmiao.model.ai, so a change to shifenmiao.model.ai can break shifenmiao.ai.request, while a change to shifenmiao.ai.request can't break shifenmiao.model.ai.
Position
Below the diagonal: shifenmiao.ai.request uses a module listed above it, which is the healthy direction.
shifenmiao.ai.request uses shifenmiao.database.ai.entity, so a change to shifenmiao.database.ai.entity can break shifenmiao.ai.request, while a change to shifenmiao.ai.request can't break shifenmiao.database.ai.entity.
Position
Below the diagonal: shifenmiao.ai.request uses a module listed above it, which is the healthy direction.
shifenmiao.ai.request uses shifenmiao.network.api, so a change to shifenmiao.network.api can break shifenmiao.ai.request, while a change to shifenmiao.ai.request can't break shifenmiao.network.api.
Position
Below the diagonal: shifenmiao.ai.request uses a module listed above it, which is the healthy direction.
shifenmiao.common.manager uses shifenmiao.database, so a change to shifenmiao.database can break shifenmiao.common.manager, while a change to shifenmiao.common.manager can't break shifenmiao.database.
Position
Below the diagonal: shifenmiao.common.manager uses a module listed above it, which is the healthy direction.
shifenmiao.common.manager uses t8rin.imagetoolbox.core.domain.coroutines, so a change to t8rin.imagetoolbox.core.domain.coroutines can break shifenmiao.common.manager, while a change to shifenmiao.common.manager can't break t8rin.imagetoolbox.core.domain.coroutines.
Position
Below the diagonal: shifenmiao.common.manager uses a module listed above it, which is the healthy direction.
shifenmiao.common.manager uses shifenmiao.model.ai, so a change to shifenmiao.model.ai can break shifenmiao.common.manager, while a change to shifenmiao.common.manager can't break shifenmiao.model.ai.
Position
Below the diagonal: shifenmiao.common.manager uses a module listed above it, which is the healthy direction.
shifenmiao.common.manager uses shifenmiao.database.ai.entity, so a change to shifenmiao.database.ai.entity can break shifenmiao.common.manager, while a change to shifenmiao.common.manager can't break shifenmiao.database.ai.entity.
Position
Below the diagonal: shifenmiao.common.manager uses a module listed above it, which is the healthy direction.
shifenmiao.common.manager uses shifenmiao.network.api, so a change to shifenmiao.network.api can break shifenmiao.common.manager, while a change to shifenmiao.common.manager can't break shifenmiao.network.api.
Position
Below the diagonal: shifenmiao.common.manager uses a module listed above it, which is the healthy direction.
t8rin.imagetoolbox.core.domain.saving uses t8rin.imagetoolbox.core.domain.image, so a change to t8rin.imagetoolbox.core.domain.image can break t8rin.imagetoolbox.core.domain.saving, while a change to t8rin.imagetoolbox.core.domain.saving can't break t8rin.imagetoolbox.core.domain.image.
Position
Below the diagonal: t8rin.imagetoolbox.core.domain.saving uses a module listed above it, which is the healthy direction.
t8rin.imagetoolbox.core.domain.saving uses t8rin.imagetoolbox.core.domain.saving.model, so a change to t8rin.imagetoolbox.core.domain.saving.model can break t8rin.imagetoolbox.core.domain.saving, while a change to t8rin.imagetoolbox.core.domain.saving can't break t8rin.imagetoolbox.core.domain.saving.model.
Position
Below the diagonal: t8rin.imagetoolbox.core.domain.saving uses a module listed above it, which is the healthy direction.
shifenmiao.ai.service uses shifenmiao.database, so a change to shifenmiao.database can break shifenmiao.ai.service, while a change to shifenmiao.ai.service can't break shifenmiao.database.
Position
Below the diagonal: shifenmiao.ai.service uses a module listed above it, which is the healthy direction.
shifenmiao.ai.service uses shifenmiao.model.ai.tool, so a change to shifenmiao.model.ai.tool can break shifenmiao.ai.service, while a change to shifenmiao.ai.service can't break shifenmiao.model.ai.tool.
Position
Below the diagonal: shifenmiao.ai.service uses a module listed above it, which is the healthy direction.
shifenmiao.ai.service uses shifenmiao.model, so a change to shifenmiao.model can break shifenmiao.ai.service, while a change to shifenmiao.ai.service can't break shifenmiao.model.
Position
Below the diagonal: shifenmiao.ai.service uses a module listed above it, which is the healthy direction.
shifenmiao.ai.service uses shifenmiao.database.item.entity, so a change to shifenmiao.database.item.entity can break shifenmiao.ai.service, while a change to shifenmiao.ai.service can't break shifenmiao.database.item.entity.
Position
Below the diagonal: shifenmiao.ai.service uses a module listed above it, which is the healthy direction.
shifenmiao.ai.service uses shifenmiao.model.ai, so a change to shifenmiao.model.ai can break shifenmiao.ai.service, while a change to shifenmiao.ai.service can't break shifenmiao.model.ai.
Position
Below the diagonal: shifenmiao.ai.service uses a module listed above it, which is the healthy direction.
shifenmiao.ai.service uses shifenmiao.ai.agent.tool, so a change to shifenmiao.ai.agent.tool can break shifenmiao.ai.service, while a change to shifenmiao.ai.service can't break shifenmiao.ai.agent.tool.
Position
Below the diagonal: shifenmiao.ai.service uses a module listed above it, which is the healthy direction.
27→34 shifenmiao.ai.service uses shifenmiao.ai.componentpart of a loop✕
Connections
1 pair of types, where a type in shifenmiao.ai.service uses a type in shifenmiao.ai.component.
shifenmiao.ai.service uses shifenmiao.ai.component, so a change to shifenmiao.ai.component can break shifenmiao.ai.service, while a change to shifenmiao.ai.service can't break shifenmiao.ai.component.
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.
wanbaohe.core.ui.utils uses t8rin.imagetoolbox.core.domain.coroutines, so a change to t8rin.imagetoolbox.core.domain.coroutines can break wanbaohe.core.ui.utils, while a change to wanbaohe.core.ui.utils can't break t8rin.imagetoolbox.core.domain.coroutines.
Position
Below the diagonal: wanbaohe.core.ui.utils uses a module listed above it, which is the healthy direction.
wanbaohe.core.ui.utils uses t8rin.imagetoolbox.core.domain.image.model, so a change to t8rin.imagetoolbox.core.domain.image.model can break wanbaohe.core.ui.utils, while a change to wanbaohe.core.ui.utils can't break t8rin.imagetoolbox.core.domain.image.model.
Position
Below the diagonal: wanbaohe.core.ui.utils uses a module listed above it, which is the healthy direction.
wanbaohe.core.ui.utils uses t8rin.imagetoolbox.core.settings.domain.model, so a change to t8rin.imagetoolbox.core.settings.domain.model can break wanbaohe.core.ui.utils, while a change to wanbaohe.core.ui.utils can't break t8rin.imagetoolbox.core.settings.domain.model.
Position
Below the diagonal: wanbaohe.core.ui.utils uses a module listed above it, which is the healthy direction.
wanbaohe.core.ui.utils uses t8rin.imagetoolbox.core.domain.saving.model, so a change to t8rin.imagetoolbox.core.domain.saving.model can break wanbaohe.core.ui.utils, while a change to wanbaohe.core.ui.utils can't break t8rin.imagetoolbox.core.domain.saving.model.
Position
Below the diagonal: wanbaohe.core.ui.utils uses a module listed above it, which is the healthy direction.
wanbaohe.core.ui.utils uses t8rin.imagetoolbox.core.settings.domain, so a change to t8rin.imagetoolbox.core.settings.domain can break wanbaohe.core.ui.utils, while a change to wanbaohe.core.ui.utils can't break t8rin.imagetoolbox.core.settings.domain.
Position
Below the diagonal: wanbaohe.core.ui.utils uses a module listed above it, which is the healthy direction.
wanbaohe.core.ui.utils uses t8rin.imagetoolbox.core.domain.saving, so a change to t8rin.imagetoolbox.core.domain.saving can break wanbaohe.core.ui.utils, while a change to wanbaohe.core.ui.utils can't break t8rin.imagetoolbox.core.domain.saving.
Position
Below the diagonal: wanbaohe.core.ui.utils uses a module listed above it, which is the healthy direction.
shifenmiao.common.logic uses shifenmiao.database, so a change to shifenmiao.database can break shifenmiao.common.logic, while a change to shifenmiao.common.logic can't break shifenmiao.database.
Position
Below the diagonal: shifenmiao.common.logic uses a module listed above it, which is the healthy direction.
shifenmiao.common.logic uses t8rin.imagetoolbox.core.domain.coroutines, so a change to t8rin.imagetoolbox.core.domain.coroutines can break shifenmiao.common.logic, while a change to shifenmiao.common.logic can't break t8rin.imagetoolbox.core.domain.coroutines.
Position
Below the diagonal: shifenmiao.common.logic uses a module listed above it, which is the healthy direction.
shifenmiao.common.logic uses wanbaohe.core.ui.utils.navigation, so a change to wanbaohe.core.ui.utils.navigation can break shifenmiao.common.logic, while a change to shifenmiao.common.logic can't break wanbaohe.core.ui.utils.navigation.
Position
Below the diagonal: shifenmiao.common.logic uses a module listed above it, which is the healthy direction.
shifenmiao.common.logic uses shifenmiao.model, so a change to shifenmiao.model can break shifenmiao.common.logic, while a change to shifenmiao.common.logic can't break shifenmiao.model.
Position
Below the diagonal: shifenmiao.common.logic uses a module listed above it, which is the healthy direction.
shifenmiao.common.logic uses t8rin.imagetoolbox.core.domain.image, so a change to t8rin.imagetoolbox.core.domain.image can break shifenmiao.common.logic, while a change to shifenmiao.common.logic can't break t8rin.imagetoolbox.core.domain.image.
Position
Below the diagonal: shifenmiao.common.logic uses a module listed above it, which is the healthy direction.
shifenmiao.common.logic uses t8rin.imagetoolbox.core.settings.domain.model, so a change to t8rin.imagetoolbox.core.settings.domain.model can break shifenmiao.common.logic, while a change to shifenmiao.common.logic can't break t8rin.imagetoolbox.core.settings.domain.model.
Position
Below the diagonal: shifenmiao.common.logic uses a module listed above it, which is the healthy direction.
shifenmiao.common.logic uses shifenmiao.network.api, so a change to shifenmiao.network.api can break shifenmiao.common.logic, while a change to shifenmiao.common.logic can't break shifenmiao.network.api.
Position
Below the diagonal: shifenmiao.common.logic uses a module listed above it, which is the healthy direction.
shifenmiao.common.logic uses t8rin.imagetoolbox.core.domain.saving.model, so a change to t8rin.imagetoolbox.core.domain.saving.model can break shifenmiao.common.logic, while a change to shifenmiao.common.logic can't break t8rin.imagetoolbox.core.domain.saving.model.
Position
Below the diagonal: shifenmiao.common.logic uses a module listed above it, which is the healthy direction.
shifenmiao.common.logic uses t8rin.imagetoolbox.core.settings.domain, so a change to t8rin.imagetoolbox.core.settings.domain can break shifenmiao.common.logic, while a change to shifenmiao.common.logic can't break t8rin.imagetoolbox.core.settings.domain.
Position
Below the diagonal: shifenmiao.common.logic uses a module listed above it, which is the healthy direction.
shifenmiao.common.logic uses shifenmiao.common.manager, so a change to shifenmiao.common.manager can break shifenmiao.common.logic, while a change to shifenmiao.common.logic can't break shifenmiao.common.manager.
Position
Below the diagonal: shifenmiao.common.logic uses a module listed above it, which is the healthy direction.
shifenmiao.common.logic uses t8rin.imagetoolbox.core.domain.saving, so a change to t8rin.imagetoolbox.core.domain.saving can break shifenmiao.common.logic, while a change to shifenmiao.common.logic can't break t8rin.imagetoolbox.core.domain.saving.
Position
Below the diagonal: shifenmiao.common.logic uses a module listed above it, which is the healthy direction.
shifenmiao.common.logic uses wanbaohe.core.ui.utils, so a change to wanbaohe.core.ui.utils can break shifenmiao.common.logic, while a change to shifenmiao.common.logic can't break wanbaohe.core.ui.utils.
Position
Below the diagonal: shifenmiao.common.logic uses a module listed above it, which is the healthy direction.
shifenmiao.marktodo.screenLogic uses t8rin.imagetoolbox.core.domain.coroutines, so a change to t8rin.imagetoolbox.core.domain.coroutines can break shifenmiao.marktodo.screenLogic, while a change to shifenmiao.marktodo.screenLogic can't break t8rin.imagetoolbox.core.domain.coroutines.
Position
Below the diagonal: shifenmiao.marktodo.screenLogic uses a module listed above it, which is the healthy direction.
shifenmiao.marktodo.screenLogic uses wanbaohe.core.ui.utils.navigation, so a change to wanbaohe.core.ui.utils.navigation can break shifenmiao.marktodo.screenLogic, while a change to shifenmiao.marktodo.screenLogic can't break wanbaohe.core.ui.utils.navigation.
Position
Below the diagonal: shifenmiao.marktodo.screenLogic uses a module listed above it, which is the healthy direction.
shifenmiao.marktodo.screenLogic uses wanbaohe.core.ui.utils, so a change to wanbaohe.core.ui.utils can break shifenmiao.marktodo.screenLogic, while a change to shifenmiao.marktodo.screenLogic can't break wanbaohe.core.ui.utils.
Position
Below the diagonal: shifenmiao.marktodo.screenLogic uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in t8rin.imagetoolbox.feature.pdf_tools.presentation.router.screenLogic uses a type in t8rin.imagetoolbox.core.domain.coroutines.
t8rin.imagetoolbox.feature.pdf_tools.presentation.router.screenLogic uses t8rin.imagetoolbox.core.domain.coroutines, so a change to t8rin.imagetoolbox.core.domain.coroutines can break t8rin.imagetoolbox.feature.pdf_tools.presentation.router.screenLogic, while a change to t8rin.imagetoolbox.feature.pdf_tools.presentation.router.screenLogic can't break t8rin.imagetoolbox.core.domain.coroutines.
Position
Below the diagonal: t8rin.imagetoolbox.feature.pdf_tools.presentation.router.screenLogic uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in t8rin.imagetoolbox.feature.pdf_tools.presentation.router.screenLogic uses a type in wanbaohe.core.ui.utils.navigation.
t8rin.imagetoolbox.feature.pdf_tools.presentation.router.screenLogic uses wanbaohe.core.ui.utils.navigation, so a change to wanbaohe.core.ui.utils.navigation can break t8rin.imagetoolbox.feature.pdf_tools.presentation.router.screenLogic, while a change to t8rin.imagetoolbox.feature.pdf_tools.presentation.router.screenLogic can't break wanbaohe.core.ui.utils.navigation.
Position
Below the diagonal: t8rin.imagetoolbox.feature.pdf_tools.presentation.router.screenLogic uses a module listed above it, which is the healthy direction.
t8rin.imagetoolbox.feature.pdf_tools.presentation.router.screenLogic uses wanbaohe.core.ui.utils, so a change to wanbaohe.core.ui.utils can break t8rin.imagetoolbox.feature.pdf_tools.presentation.router.screenLogic, while a change to t8rin.imagetoolbox.feature.pdf_tools.presentation.router.screenLogic can't break wanbaohe.core.ui.utils.
Position
Below the diagonal: t8rin.imagetoolbox.feature.pdf_tools.presentation.router.screenLogic uses a module listed above it, which is the healthy direction.
wanbaohe.markuplayers.presentation.screenLogic uses t8rin.imagetoolbox.core.domain.coroutines, so a change to t8rin.imagetoolbox.core.domain.coroutines can break wanbaohe.markuplayers.presentation.screenLogic, while a change to wanbaohe.markuplayers.presentation.screenLogic can't break t8rin.imagetoolbox.core.domain.coroutines.
Position
Below the diagonal: wanbaohe.markuplayers.presentation.screenLogic uses a module listed above it, which is the healthy direction.
wanbaohe.markuplayers.presentation.screenLogic uses wanbaohe.core.ui.utils.navigation, so a change to wanbaohe.core.ui.utils.navigation can break wanbaohe.markuplayers.presentation.screenLogic, while a change to wanbaohe.markuplayers.presentation.screenLogic can't break wanbaohe.core.ui.utils.navigation.
Position
Below the diagonal: wanbaohe.markuplayers.presentation.screenLogic uses a module listed above it, which is the healthy direction.
wanbaohe.markuplayers.presentation.screenLogic uses wanbaohe.markuplayers.domain.model, so a change to wanbaohe.markuplayers.domain.model can break wanbaohe.markuplayers.presentation.screenLogic, while a change to wanbaohe.markuplayers.presentation.screenLogic can't break wanbaohe.markuplayers.domain.model.
Position
Below the diagonal: wanbaohe.markuplayers.presentation.screenLogic uses a module listed above it, which is the healthy direction.
wanbaohe.markuplayers.presentation.screenLogic uses t8rin.imagetoolbox.core.domain.image.model, so a change to t8rin.imagetoolbox.core.domain.image.model can break wanbaohe.markuplayers.presentation.screenLogic, while a change to wanbaohe.markuplayers.presentation.screenLogic can't break t8rin.imagetoolbox.core.domain.image.model.
Position
Below the diagonal: wanbaohe.markuplayers.presentation.screenLogic uses a module listed above it, which is the healthy direction.
wanbaohe.markuplayers.presentation.screenLogic uses t8rin.imagetoolbox.core.domain.image, so a change to t8rin.imagetoolbox.core.domain.image can break wanbaohe.markuplayers.presentation.screenLogic, while a change to wanbaohe.markuplayers.presentation.screenLogic can't break t8rin.imagetoolbox.core.domain.image.
Position
Below the diagonal: wanbaohe.markuplayers.presentation.screenLogic uses a module listed above it, which is the healthy direction.
wanbaohe.markuplayers.presentation.screenLogic uses t8rin.imagetoolbox.core.domain.saving.model, so a change to t8rin.imagetoolbox.core.domain.saving.model can break wanbaohe.markuplayers.presentation.screenLogic, while a change to wanbaohe.markuplayers.presentation.screenLogic can't break t8rin.imagetoolbox.core.domain.saving.model.
Position
Below the diagonal: wanbaohe.markuplayers.presentation.screenLogic uses a module listed above it, which is the healthy direction.
wanbaohe.markuplayers.presentation.screenLogic uses t8rin.imagetoolbox.core.domain.saving, so a change to t8rin.imagetoolbox.core.domain.saving can break wanbaohe.markuplayers.presentation.screenLogic, while a change to wanbaohe.markuplayers.presentation.screenLogic can't break t8rin.imagetoolbox.core.domain.saving.
Position
Below the diagonal: wanbaohe.markuplayers.presentation.screenLogic uses a module listed above it, which is the healthy direction.
wanbaohe.markuplayers.presentation.screenLogic uses wanbaohe.core.ui.utils, so a change to wanbaohe.core.ui.utils can break wanbaohe.markuplayers.presentation.screenLogic, while a change to wanbaohe.markuplayers.presentation.screenLogic can't break wanbaohe.core.ui.utils.
Position
Below the diagonal: wanbaohe.markuplayers.presentation.screenLogic uses a module listed above it, which is the healthy direction.
wanbaohe.xiangqi.router.screenLogic uses t8rin.imagetoolbox.core.domain.coroutines, so a change to t8rin.imagetoolbox.core.domain.coroutines can break wanbaohe.xiangqi.router.screenLogic, while a change to wanbaohe.xiangqi.router.screenLogic can't break t8rin.imagetoolbox.core.domain.coroutines.
Position
Below the diagonal: wanbaohe.xiangqi.router.screenLogic uses a module listed above it, which is the healthy direction.
wanbaohe.xiangqi.router.screenLogic uses wanbaohe.core.ui.utils.navigation, so a change to wanbaohe.core.ui.utils.navigation can break wanbaohe.xiangqi.router.screenLogic, while a change to wanbaohe.xiangqi.router.screenLogic can't break wanbaohe.core.ui.utils.navigation.
Position
Below the diagonal: wanbaohe.xiangqi.router.screenLogic uses a module listed above it, which is the healthy direction.
wanbaohe.xiangqi.router.screenLogic uses wanbaohe.xiangqi.domain.model, so a change to wanbaohe.xiangqi.domain.model can break wanbaohe.xiangqi.router.screenLogic, while a change to wanbaohe.xiangqi.router.screenLogic can't break wanbaohe.xiangqi.domain.model.
Position
Below the diagonal: wanbaohe.xiangqi.router.screenLogic uses a module listed above it, which is the healthy direction.
wanbaohe.xiangqi.router.screenLogic uses shifenmiao.model.ai, so a change to shifenmiao.model.ai can break wanbaohe.xiangqi.router.screenLogic, while a change to wanbaohe.xiangqi.router.screenLogic can't break shifenmiao.model.ai.
Position
Below the diagonal: wanbaohe.xiangqi.router.screenLogic uses a module listed above it, which is the healthy direction.
wanbaohe.xiangqi.router.screenLogic uses shifenmiao.common.manager, so a change to shifenmiao.common.manager can break wanbaohe.xiangqi.router.screenLogic, while a change to wanbaohe.xiangqi.router.screenLogic can't break shifenmiao.common.manager.
Position
Below the diagonal: wanbaohe.xiangqi.router.screenLogic uses a module listed above it, which is the healthy direction.
wanbaohe.xiangqi.router.screenLogic uses wanbaohe.core.ui.utils, so a change to wanbaohe.core.ui.utils can break wanbaohe.xiangqi.router.screenLogic, while a change to wanbaohe.xiangqi.router.screenLogic can't break wanbaohe.core.ui.utils.
Position
Below the diagonal: wanbaohe.xiangqi.router.screenLogic uses a module listed above it, which is the healthy direction.
shifenmiao.ai.component uses shifenmiao.database, so a change to shifenmiao.database can break shifenmiao.ai.component, while a change to shifenmiao.ai.component can't break shifenmiao.database.
Position
Below the diagonal: shifenmiao.ai.component uses a module listed above it, which is the healthy direction.
shifenmiao.ai.component uses shifenmiao.model.ai.tool, so a change to shifenmiao.model.ai.tool can break shifenmiao.ai.component, while a change to shifenmiao.ai.component can't break shifenmiao.model.ai.tool.
Position
Below the diagonal: shifenmiao.ai.component uses a module listed above it, which is the healthy direction.
shifenmiao.ai.component uses t8rin.imagetoolbox.core.domain.coroutines, so a change to t8rin.imagetoolbox.core.domain.coroutines can break shifenmiao.ai.component, while a change to shifenmiao.ai.component can't break t8rin.imagetoolbox.core.domain.coroutines.
Position
Below the diagonal: shifenmiao.ai.component uses a module listed above it, which is the healthy direction.
shifenmiao.ai.component uses wanbaohe.core.ui.utils.navigation, so a change to wanbaohe.core.ui.utils.navigation can break shifenmiao.ai.component, while a change to shifenmiao.ai.component can't break wanbaohe.core.ui.utils.navigation.
Position
Below the diagonal: shifenmiao.ai.component uses a module listed above it, which is the healthy direction.
shifenmiao.ai.component uses shifenmiao.model, so a change to shifenmiao.model can break shifenmiao.ai.component, while a change to shifenmiao.ai.component can't break shifenmiao.model.
Position
Below the diagonal: shifenmiao.ai.component uses a module listed above it, which is the healthy direction.
shifenmiao.ai.component uses shifenmiao.database.item.entity, so a change to shifenmiao.database.item.entity can break shifenmiao.ai.component, while a change to shifenmiao.ai.component can't break shifenmiao.database.item.entity.
Position
Below the diagonal: shifenmiao.ai.component uses a module listed above it, which is the healthy direction.
55 pairs of types, where a type in shifenmiao.ai.component uses a type in shifenmiao.model.ai. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
shifenmiao.ai.component uses shifenmiao.model.ai, so a change to shifenmiao.model.ai can break shifenmiao.ai.component, while a change to shifenmiao.ai.component can't break shifenmiao.model.ai.
Position
Below the diagonal: shifenmiao.ai.component uses a module listed above it, which is the healthy direction.
shifenmiao.ai.component uses shifenmiao.database.ai.entity, so a change to shifenmiao.database.ai.entity can break shifenmiao.ai.component, while a change to shifenmiao.ai.component can't break shifenmiao.database.ai.entity.
Position
Below the diagonal: shifenmiao.ai.component uses a module listed above it, which is the healthy direction.
shifenmiao.ai.component uses shifenmiao.network.api, so a change to shifenmiao.network.api can break shifenmiao.ai.component, while a change to shifenmiao.ai.component can't break shifenmiao.network.api.
Position
Below the diagonal: shifenmiao.ai.component uses a module listed above it, which is the healthy direction.
shifenmiao.ai.component uses wanbaohe.core.ui.utils.navigation.Screen, so a change to wanbaohe.core.ui.utils.navigation.Screen can break shifenmiao.ai.component, while a change to shifenmiao.ai.component can't break wanbaohe.core.ui.utils.navigation.Screen.
Position
Below the diagonal: shifenmiao.ai.component uses a module listed above it, which is the healthy direction.
39 pairs of types, where a type in shifenmiao.ai.component uses a type in shifenmiao.ai.agent.tool. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
shifenmiao.ai.component uses shifenmiao.ai.agent.tool, so a change to shifenmiao.ai.agent.tool can break shifenmiao.ai.component, while a change to shifenmiao.ai.component can't break shifenmiao.ai.agent.tool.
Position
Below the diagonal: shifenmiao.ai.component uses a module listed above it, which is the healthy direction.
shifenmiao.ai.component uses shifenmiao.ai.request, so a change to shifenmiao.ai.request can break shifenmiao.ai.component, while a change to shifenmiao.ai.component can't break shifenmiao.ai.request.
Position
Below the diagonal: shifenmiao.ai.component uses a module listed above it, which is the healthy direction.
shifenmiao.ai.component uses shifenmiao.common.manager, so a change to shifenmiao.common.manager can break shifenmiao.ai.component, while a change to shifenmiao.ai.component can't break shifenmiao.common.manager.
Position
Below the diagonal: shifenmiao.ai.component uses a module listed above it, which is the healthy direction.
shifenmiao.ai.component uses shifenmiao.ai.service, so a change to shifenmiao.ai.service can break shifenmiao.ai.component, while a change to shifenmiao.ai.component can't break shifenmiao.ai.service.
Position
Below the diagonal: shifenmiao.ai.component uses a module listed above it, which is the healthy direction.
shifenmiao.ai.component uses wanbaohe.core.ui.utils, so a change to wanbaohe.core.ui.utils can break shifenmiao.ai.component, while a change to shifenmiao.ai.component can't break wanbaohe.core.ui.utils.
Position
Below the diagonal: shifenmiao.ai.component uses a module listed above it, which is the healthy direction.
shifenmiao.ai.component uses shifenmiao.common.logic, so a change to shifenmiao.common.logic can break shifenmiao.ai.component, while a change to shifenmiao.ai.component can't break shifenmiao.common.logic.
Position
Below the diagonal: shifenmiao.ai.component uses a module listed above it, which is the healthy direction.
shifenmiao.online.component uses shifenmiao.database, so a change to shifenmiao.database can break shifenmiao.online.component, while a change to shifenmiao.online.component can't break shifenmiao.database.
Position
Below the diagonal: shifenmiao.online.component uses a module listed above it, which is the healthy direction.
shifenmiao.online.component uses t8rin.imagetoolbox.core.domain.coroutines, so a change to t8rin.imagetoolbox.core.domain.coroutines can break shifenmiao.online.component, while a change to shifenmiao.online.component can't break t8rin.imagetoolbox.core.domain.coroutines.
Position
Below the diagonal: shifenmiao.online.component uses a module listed above it, which is the healthy direction.
shifenmiao.online.component uses wanbaohe.core.ui.utils.navigation, so a change to wanbaohe.core.ui.utils.navigation can break shifenmiao.online.component, while a change to shifenmiao.online.component can't break wanbaohe.core.ui.utils.navigation.
Position
Below the diagonal: shifenmiao.online.component uses a module listed above it, which is the healthy direction.
shifenmiao.online.component uses shifenmiao.model, so a change to shifenmiao.model can break shifenmiao.online.component, while a change to shifenmiao.online.component can't break shifenmiao.model.
Position
Below the diagonal: shifenmiao.online.component uses a module listed above it, which is the healthy direction.
shifenmiao.online.component uses shifenmiao.database.item.entity, so a change to shifenmiao.database.item.entity can break shifenmiao.online.component, while a change to shifenmiao.online.component can't break shifenmiao.database.item.entity.
Position
Below the diagonal: shifenmiao.online.component uses a module listed above it, which is the healthy direction.
shifenmiao.online.component uses shifenmiao.model.ai, so a change to shifenmiao.model.ai can break shifenmiao.online.component, while a change to shifenmiao.online.component can't break shifenmiao.model.ai.
Position
Below the diagonal: shifenmiao.online.component uses a module listed above it, which is the healthy direction.
shifenmiao.online.component uses shifenmiao.network.api, so a change to shifenmiao.network.api can break shifenmiao.online.component, while a change to shifenmiao.online.component can't break shifenmiao.network.api.
Position
Below the diagonal: shifenmiao.online.component uses a module listed above it, which is the healthy direction.
shifenmiao.online.component uses t8rin.imagetoolbox.core.settings.domain, so a change to t8rin.imagetoolbox.core.settings.domain can break shifenmiao.online.component, while a change to shifenmiao.online.component can't break t8rin.imagetoolbox.core.settings.domain.
Position
Below the diagonal: shifenmiao.online.component uses a module listed above it, which is the healthy direction.
shifenmiao.online.component uses shifenmiao.common.manager, so a change to shifenmiao.common.manager can break shifenmiao.online.component, while a change to shifenmiao.online.component can't break shifenmiao.common.manager.
Position
Below the diagonal: shifenmiao.online.component uses a module listed above it, which is the healthy direction.
shifenmiao.online.component uses t8rin.imagetoolbox.core.domain.saving, so a change to t8rin.imagetoolbox.core.domain.saving can break shifenmiao.online.component, while a change to shifenmiao.online.component can't break t8rin.imagetoolbox.core.domain.saving.
Position
Below the diagonal: shifenmiao.online.component uses a module listed above it, which is the healthy direction.
shifenmiao.online.component uses wanbaohe.core.ui.utils, so a change to wanbaohe.core.ui.utils can break shifenmiao.online.component, while a change to shifenmiao.online.component can't break wanbaohe.core.ui.utils.
Position
Below the diagonal: shifenmiao.online.component uses a module listed above it, which is the healthy direction.
shifenmiao.online.component uses shifenmiao.common.logic, so a change to shifenmiao.common.logic can break shifenmiao.online.component, while a change to shifenmiao.online.component can't break shifenmiao.common.logic.
Position
Below the diagonal: shifenmiao.online.component uses a module listed above it, which is the healthy direction.
t8rin.imagetoolbox.feature.root.presentation.components.navigation uses wanbaohe.core.ui.utils.navigation, so a change to wanbaohe.core.ui.utils.navigation can break t8rin.imagetoolbox.feature.root.presentation.components.navigation, while a change to t8rin.imagetoolbox.feature.root.presentation.components.navigation can't break wanbaohe.core.ui.utils.navigation.
Position
Below the diagonal: t8rin.imagetoolbox.feature.root.presentation.components.navigation uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in t8rin.imagetoolbox.feature.root.presentation.components.navigation uses a type in wanbaohe.core.ui.utils.navigation.Screen.
t8rin.imagetoolbox.feature.root.presentation.components.navigation uses wanbaohe.core.ui.utils.navigation.Screen, so a change to wanbaohe.core.ui.utils.navigation.Screen can break t8rin.imagetoolbox.feature.root.presentation.components.navigation, while a change to t8rin.imagetoolbox.feature.root.presentation.components.navigation can't break wanbaohe.core.ui.utils.navigation.Screen.
Position
Below the diagonal: t8rin.imagetoolbox.feature.root.presentation.components.navigation uses a module listed above it, which is the healthy direction.
t8rin.imagetoolbox.feature.root.presentation.components.navigation uses shifenmiao.common.logic, so a change to shifenmiao.common.logic can break t8rin.imagetoolbox.feature.root.presentation.components.navigation, while a change to t8rin.imagetoolbox.feature.root.presentation.components.navigation can't break shifenmiao.common.logic.
Position
Below the diagonal: t8rin.imagetoolbox.feature.root.presentation.components.navigation uses a module listed above it, which is the healthy direction.
wanbaohe.setting.router.screenLogic uses t8rin.imagetoolbox.core.domain.coroutines, so a change to t8rin.imagetoolbox.core.domain.coroutines can break wanbaohe.setting.router.screenLogic, while a change to wanbaohe.setting.router.screenLogic can't break t8rin.imagetoolbox.core.domain.coroutines.
Position
Below the diagonal: wanbaohe.setting.router.screenLogic uses a module listed above it, which is the healthy direction.
wanbaohe.setting.router.screenLogic uses wanbaohe.core.ui.utils.navigation, so a change to wanbaohe.core.ui.utils.navigation can break wanbaohe.setting.router.screenLogic, while a change to wanbaohe.setting.router.screenLogic can't break wanbaohe.core.ui.utils.navigation.
Position
Below the diagonal: wanbaohe.setting.router.screenLogic uses a module listed above it, which is the healthy direction.
wanbaohe.setting.router.screenLogic uses wanbaohe.core.ui.utils, so a change to wanbaohe.core.ui.utils can break wanbaohe.setting.router.screenLogic, while a change to wanbaohe.setting.router.screenLogic can't break wanbaohe.core.ui.utils.
Position
Below the diagonal: wanbaohe.setting.router.screenLogic uses a module listed above it, which is the healthy direction.
wanbaohe.setting.router.screenLogic uses shifenmiao.common.logic, so a change to shifenmiao.common.logic can break wanbaohe.setting.router.screenLogic, while a change to wanbaohe.setting.router.screenLogic can't break shifenmiao.common.logic.
Position
Below the diagonal: wanbaohe.setting.router.screenLogic uses a module listed above it, which is the healthy direction.
109 pairs of types, where a type in shifenmiao.ai.agent.tool.builtin uses a type in shifenmiao.model.ai.tool. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
shifenmiao.ai.agent.tool.builtin uses shifenmiao.model.ai.tool, so a change to shifenmiao.model.ai.tool can break shifenmiao.ai.agent.tool.builtin, while a change to shifenmiao.ai.agent.tool.builtin can't break shifenmiao.model.ai.tool.
Position
Below the diagonal: shifenmiao.ai.agent.tool.builtin uses a module listed above it, which is the healthy direction.
shifenmiao.ai.agent.tool.builtin uses t8rin.imagetoolbox.core.domain.model, so a change to t8rin.imagetoolbox.core.domain.model can break shifenmiao.ai.agent.tool.builtin, while a change to shifenmiao.ai.agent.tool.builtin can't break t8rin.imagetoolbox.core.domain.model.
Position
Below the diagonal: shifenmiao.ai.agent.tool.builtin uses a module listed above it, which is the healthy direction.
shifenmiao.ai.agent.tool.builtin uses wanbaohe.core.ui.utils.navigation, so a change to wanbaohe.core.ui.utils.navigation can break shifenmiao.ai.agent.tool.builtin, while a change to shifenmiao.ai.agent.tool.builtin can't break wanbaohe.core.ui.utils.navigation.
Position
Below the diagonal: shifenmiao.ai.agent.tool.builtin uses a module listed above it, which is the healthy direction.
shifenmiao.ai.agent.tool.builtin uses t8rin.imagetoolbox.core.domain.image.model, so a change to t8rin.imagetoolbox.core.domain.image.model can break shifenmiao.ai.agent.tool.builtin, while a change to shifenmiao.ai.agent.tool.builtin can't break t8rin.imagetoolbox.core.domain.image.model.
Position
Below the diagonal: shifenmiao.ai.agent.tool.builtin uses a module listed above it, which is the healthy direction.
56 pairs of types, where a type in shifenmiao.ai.agent.tool.builtin uses a type in shifenmiao.model.ai. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
shifenmiao.ai.agent.tool.builtin uses shifenmiao.model.ai, so a change to shifenmiao.model.ai can break shifenmiao.ai.agent.tool.builtin, while a change to shifenmiao.ai.agent.tool.builtin can't break shifenmiao.model.ai.
Position
Below the diagonal: shifenmiao.ai.agent.tool.builtin uses a module listed above it, which is the healthy direction.
shifenmiao.ai.agent.tool.builtin uses t8rin.imagetoolbox.core.domain.image, so a change to t8rin.imagetoolbox.core.domain.image can break shifenmiao.ai.agent.tool.builtin, while a change to shifenmiao.ai.agent.tool.builtin can't break t8rin.imagetoolbox.core.domain.image.
Position
Below the diagonal: shifenmiao.ai.agent.tool.builtin uses a module listed above it, which is the healthy direction.
shifenmiao.ai.agent.tool.builtin uses t8rin.imagetoolbox.core.settings.domain.model, so a change to t8rin.imagetoolbox.core.settings.domain.model can break shifenmiao.ai.agent.tool.builtin, while a change to shifenmiao.ai.agent.tool.builtin can't break t8rin.imagetoolbox.core.settings.domain.model.
Position
Below the diagonal: shifenmiao.ai.agent.tool.builtin uses a module listed above it, which is the healthy direction.
shifenmiao.ai.agent.tool.builtin uses t8rin.imagetoolbox.core.settings.domain, so a change to t8rin.imagetoolbox.core.settings.domain can break shifenmiao.ai.agent.tool.builtin, while a change to shifenmiao.ai.agent.tool.builtin can't break t8rin.imagetoolbox.core.settings.domain.
Position
Below the diagonal: shifenmiao.ai.agent.tool.builtin uses a module listed above it, which is the healthy direction.
199 pairs of types, where a type in shifenmiao.ai.agent.tool.builtin uses a type in shifenmiao.ai.agent.tool. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
shifenmiao.ai.agent.tool.builtin uses shifenmiao.ai.agent.tool, so a change to shifenmiao.ai.agent.tool can break shifenmiao.ai.agent.tool.builtin, while a change to shifenmiao.ai.agent.tool.builtin can't break shifenmiao.ai.agent.tool.
Position
Below the diagonal: shifenmiao.ai.agent.tool.builtin uses a module listed above it, which is the healthy direction.
shifenmiao.ai.agent.tool.builtin uses shifenmiao.common.manager, so a change to shifenmiao.common.manager can break shifenmiao.ai.agent.tool.builtin, while a change to shifenmiao.ai.agent.tool.builtin can't break shifenmiao.common.manager.
Position
Below the diagonal: shifenmiao.ai.agent.tool.builtin uses a module listed above it, which is the healthy direction.
shifenmiao.ai.agent.tool.builtin uses t8rin.imagetoolbox.core.domain.saving, so a change to t8rin.imagetoolbox.core.domain.saving can break shifenmiao.ai.agent.tool.builtin, while a change to shifenmiao.ai.agent.tool.builtin can't break t8rin.imagetoolbox.core.domain.saving.
Position
Below the diagonal: shifenmiao.ai.agent.tool.builtin uses a module listed above it, which is the healthy direction.
shifenmiao.ai.agent.tool.builtin uses shifenmiao.ai.service, so a change to shifenmiao.ai.service can break shifenmiao.ai.agent.tool.builtin, while a change to shifenmiao.ai.agent.tool.builtin can't break shifenmiao.ai.service.
Position
Below the diagonal: shifenmiao.ai.agent.tool.builtin uses a module listed above it, which is the healthy direction.
shifenmiao.ai.agent.tool.builtin uses shifenmiao.ai.component, so a change to shifenmiao.ai.component can break shifenmiao.ai.agent.tool.builtin, while a change to shifenmiao.ai.agent.tool.builtin can't break shifenmiao.ai.component.
Position
Below the diagonal: shifenmiao.ai.agent.tool.builtin uses a module listed above it, which is the healthy direction.
t8rin.imagetoolbox.feature.root.presentation.components.navigation.NavigationChild uses shifenmiao.model, so a change to shifenmiao.model can break t8rin.imagetoolbox.feature.root.presentation.components.navigation.NavigationChild, while a change to t8rin.imagetoolbox.feature.root.presentation.components.navigation.NavigationChild can't break shifenmiao.model.
Position
Below the diagonal: t8rin.imagetoolbox.feature.root.presentation.components.navigation.NavigationChild uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in t8rin.imagetoolbox.feature.root.presentation.components.navigation.NavigationChild uses a type in wanbaohe.core.ui.utils.navigation.Screen.
t8rin.imagetoolbox.feature.root.presentation.components.navigation.NavigationChild uses wanbaohe.core.ui.utils.navigation.Screen, so a change to wanbaohe.core.ui.utils.navigation.Screen can break t8rin.imagetoolbox.feature.root.presentation.components.navigation.NavigationChild, while a change to t8rin.imagetoolbox.feature.root.presentation.components.navigation.NavigationChild can't break wanbaohe.core.ui.utils.navigation.Screen.
Position
Below the diagonal: t8rin.imagetoolbox.feature.root.presentation.components.navigation.NavigationChild uses a module listed above it, which is the healthy direction.
39 pairs of types, where a type in t8rin.imagetoolbox.feature.root.presentation.components.navigation.NavigationChild uses a type in shifenmiao.common.logic. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
t8rin.imagetoolbox.feature.root.presentation.components.navigation.NavigationChild uses shifenmiao.common.logic, so a change to shifenmiao.common.logic can break t8rin.imagetoolbox.feature.root.presentation.components.navigation.NavigationChild, while a change to t8rin.imagetoolbox.feature.root.presentation.components.navigation.NavigationChild can't break shifenmiao.common.logic.
Position
Below the diagonal: t8rin.imagetoolbox.feature.root.presentation.components.navigation.NavigationChild uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in t8rin.imagetoolbox.feature.root.presentation.components.navigation.NavigationChild uses a type in shifenmiao.marktodo.screenLogic.
t8rin.imagetoolbox.feature.root.presentation.components.navigation.NavigationChild uses shifenmiao.marktodo.screenLogic, so a change to shifenmiao.marktodo.screenLogic can break t8rin.imagetoolbox.feature.root.presentation.components.navigation.NavigationChild, while a change to t8rin.imagetoolbox.feature.root.presentation.components.navigation.NavigationChild can't break shifenmiao.marktodo.screenLogic.
Position
Below the diagonal: t8rin.imagetoolbox.feature.root.presentation.components.navigation.NavigationChild uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in t8rin.imagetoolbox.feature.root.presentation.components.navigation.NavigationChild uses a type in t8rin.imagetoolbox.feature.pdf_tools.presentation.router.screenLogic.
t8rin.imagetoolbox.feature.root.presentation.components.navigation.NavigationChild uses t8rin.imagetoolbox.feature.pdf_tools.presentation.router.screenLogic, so a change to t8rin.imagetoolbox.feature.pdf_tools.presentation.router.screenLogic can break t8rin.imagetoolbox.feature.root.presentation.components.navigation.NavigationChild, while a change to t8rin.imagetoolbox.feature.root.presentation.components.navigation.NavigationChild can't break t8rin.imagetoolbox.feature.pdf_tools.presentation.router.screenLogic.
Position
Below the diagonal: t8rin.imagetoolbox.feature.root.presentation.components.navigation.NavigationChild uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in t8rin.imagetoolbox.feature.root.presentation.components.navigation.NavigationChild uses a type in wanbaohe.markuplayers.presentation.screenLogic.
t8rin.imagetoolbox.feature.root.presentation.components.navigation.NavigationChild uses wanbaohe.markuplayers.presentation.screenLogic, so a change to wanbaohe.markuplayers.presentation.screenLogic can break t8rin.imagetoolbox.feature.root.presentation.components.navigation.NavigationChild, while a change to t8rin.imagetoolbox.feature.root.presentation.components.navigation.NavigationChild can't break wanbaohe.markuplayers.presentation.screenLogic.
Position
Below the diagonal: t8rin.imagetoolbox.feature.root.presentation.components.navigation.NavigationChild uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in t8rin.imagetoolbox.feature.root.presentation.components.navigation.NavigationChild uses a type in wanbaohe.xiangqi.router.screenLogic.
t8rin.imagetoolbox.feature.root.presentation.components.navigation.NavigationChild uses wanbaohe.xiangqi.router.screenLogic, so a change to wanbaohe.xiangqi.router.screenLogic can break t8rin.imagetoolbox.feature.root.presentation.components.navigation.NavigationChild, while a change to t8rin.imagetoolbox.feature.root.presentation.components.navigation.NavigationChild can't break wanbaohe.xiangqi.router.screenLogic.
Position
Below the diagonal: t8rin.imagetoolbox.feature.root.presentation.components.navigation.NavigationChild uses a module listed above it, which is the healthy direction.
11 pairs of types, where a type in t8rin.imagetoolbox.feature.root.presentation.components.navigation.NavigationChild uses a type in shifenmiao.ai.component.
t8rin.imagetoolbox.feature.root.presentation.components.navigation.NavigationChild uses shifenmiao.ai.component, so a change to shifenmiao.ai.component can break t8rin.imagetoolbox.feature.root.presentation.components.navigation.NavigationChild, while a change to t8rin.imagetoolbox.feature.root.presentation.components.navigation.NavigationChild can't break shifenmiao.ai.component.
Position
Below the diagonal: t8rin.imagetoolbox.feature.root.presentation.components.navigation.NavigationChild uses a module listed above it, which is the healthy direction.
7 pairs of types, where a type in t8rin.imagetoolbox.feature.root.presentation.components.navigation.NavigationChild uses a type in shifenmiao.online.component.
t8rin.imagetoolbox.feature.root.presentation.components.navigation.NavigationChild uses shifenmiao.online.component, so a change to shifenmiao.online.component can break t8rin.imagetoolbox.feature.root.presentation.components.navigation.NavigationChild, while a change to t8rin.imagetoolbox.feature.root.presentation.components.navigation.NavigationChild can't break shifenmiao.online.component.
Position
Below the diagonal: t8rin.imagetoolbox.feature.root.presentation.components.navigation.NavigationChild uses a module listed above it, which is the healthy direction.
149 pairs of types, where a type in t8rin.imagetoolbox.feature.root.presentation.components.navigation.NavigationChild uses a type in t8rin.imagetoolbox.feature.root.presentation.components.navigation. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
t8rin.imagetoolbox.feature.root.presentation.components.navigation.NavigationChild uses t8rin.imagetoolbox.feature.root.presentation.components.navigation, so a change to t8rin.imagetoolbox.feature.root.presentation.components.navigation can break t8rin.imagetoolbox.feature.root.presentation.components.navigation.NavigationChild, while a change to t8rin.imagetoolbox.feature.root.presentation.components.navigation.NavigationChild can't break t8rin.imagetoolbox.feature.root.presentation.components.navigation.
Position
Below the diagonal: t8rin.imagetoolbox.feature.root.presentation.components.navigation.NavigationChild uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in t8rin.imagetoolbox.feature.root.presentation.components.navigation.NavigationChild uses a type in wanbaohe.setting.router.screenLogic.
t8rin.imagetoolbox.feature.root.presentation.components.navigation.NavigationChild uses wanbaohe.setting.router.screenLogic, so a change to wanbaohe.setting.router.screenLogic can break t8rin.imagetoolbox.feature.root.presentation.components.navigation.NavigationChild, while a change to t8rin.imagetoolbox.feature.root.presentation.components.navigation.NavigationChild can't break wanbaohe.setting.router.screenLogic.
Position
Below the diagonal: t8rin.imagetoolbox.feature.root.presentation.components.navigation.NavigationChild uses a module listed above it, which is the healthy direction.
t8rin.imagetoolbox.feature.root.presentation.screenLogic uses t8rin.imagetoolbox.core.domain.coroutines, so a change to t8rin.imagetoolbox.core.domain.coroutines can break t8rin.imagetoolbox.feature.root.presentation.screenLogic, while a change to t8rin.imagetoolbox.feature.root.presentation.screenLogic can't break t8rin.imagetoolbox.core.domain.coroutines.
Position
Below the diagonal: t8rin.imagetoolbox.feature.root.presentation.screenLogic uses a module listed above it, which is the healthy direction.
t8rin.imagetoolbox.feature.root.presentation.screenLogic uses t8rin.imagetoolbox.core.domain.model, so a change to t8rin.imagetoolbox.core.domain.model can break t8rin.imagetoolbox.feature.root.presentation.screenLogic, while a change to t8rin.imagetoolbox.feature.root.presentation.screenLogic can't break t8rin.imagetoolbox.core.domain.model.
Position
Below the diagonal: t8rin.imagetoolbox.feature.root.presentation.screenLogic uses a module listed above it, which is the healthy direction.
t8rin.imagetoolbox.feature.root.presentation.screenLogic uses wanbaohe.core.ui.utils.navigation, so a change to wanbaohe.core.ui.utils.navigation can break t8rin.imagetoolbox.feature.root.presentation.screenLogic, while a change to t8rin.imagetoolbox.feature.root.presentation.screenLogic can't break wanbaohe.core.ui.utils.navigation.
Position
Below the diagonal: t8rin.imagetoolbox.feature.root.presentation.screenLogic uses a module listed above it, which is the healthy direction.
t8rin.imagetoolbox.feature.root.presentation.screenLogic uses t8rin.imagetoolbox.core.domain.image, so a change to t8rin.imagetoolbox.core.domain.image can break t8rin.imagetoolbox.feature.root.presentation.screenLogic, while a change to t8rin.imagetoolbox.feature.root.presentation.screenLogic can't break t8rin.imagetoolbox.core.domain.image.
Position
Below the diagonal: t8rin.imagetoolbox.feature.root.presentation.screenLogic uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in t8rin.imagetoolbox.feature.root.presentation.screenLogic uses a type in t8rin.imagetoolbox.core.settings.domain.model.
t8rin.imagetoolbox.feature.root.presentation.screenLogic uses t8rin.imagetoolbox.core.settings.domain.model, so a change to t8rin.imagetoolbox.core.settings.domain.model can break t8rin.imagetoolbox.feature.root.presentation.screenLogic, while a change to t8rin.imagetoolbox.feature.root.presentation.screenLogic can't break t8rin.imagetoolbox.core.settings.domain.model.
Position
Below the diagonal: t8rin.imagetoolbox.feature.root.presentation.screenLogic uses a module listed above it, which is the healthy direction.
t8rin.imagetoolbox.feature.root.presentation.screenLogic uses t8rin.imagetoolbox.core.settings.domain, so a change to t8rin.imagetoolbox.core.settings.domain can break t8rin.imagetoolbox.feature.root.presentation.screenLogic, while a change to t8rin.imagetoolbox.feature.root.presentation.screenLogic can't break t8rin.imagetoolbox.core.settings.domain.
Position
Below the diagonal: t8rin.imagetoolbox.feature.root.presentation.screenLogic uses a module listed above it, which is the healthy direction.
t8rin.imagetoolbox.feature.root.presentation.screenLogic uses t8rin.imagetoolbox.core.domain.saving, so a change to t8rin.imagetoolbox.core.domain.saving can break t8rin.imagetoolbox.feature.root.presentation.screenLogic, while a change to t8rin.imagetoolbox.feature.root.presentation.screenLogic can't break t8rin.imagetoolbox.core.domain.saving.
Position
Below the diagonal: t8rin.imagetoolbox.feature.root.presentation.screenLogic uses a module listed above it, which is the healthy direction.
t8rin.imagetoolbox.feature.root.presentation.screenLogic uses wanbaohe.core.ui.utils, so a change to wanbaohe.core.ui.utils can break t8rin.imagetoolbox.feature.root.presentation.screenLogic, while a change to t8rin.imagetoolbox.feature.root.presentation.screenLogic can't break wanbaohe.core.ui.utils.
Position
Below the diagonal: t8rin.imagetoolbox.feature.root.presentation.screenLogic uses a module listed above it, which is the healthy direction.
t8rin.imagetoolbox.feature.root.presentation.screenLogic uses shifenmiao.common.logic, so a change to shifenmiao.common.logic can break t8rin.imagetoolbox.feature.root.presentation.screenLogic, while a change to t8rin.imagetoolbox.feature.root.presentation.screenLogic can't break shifenmiao.common.logic.
Position
Below the diagonal: t8rin.imagetoolbox.feature.root.presentation.screenLogic uses a module listed above it, which is the healthy direction.
t8rin.imagetoolbox.feature.root.presentation.screenLogic uses shifenmiao.ai.component, so a change to shifenmiao.ai.component can break t8rin.imagetoolbox.feature.root.presentation.screenLogic, while a change to t8rin.imagetoolbox.feature.root.presentation.screenLogic can't break shifenmiao.ai.component.
Position
Below the diagonal: t8rin.imagetoolbox.feature.root.presentation.screenLogic uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in t8rin.imagetoolbox.feature.root.presentation.screenLogic uses a type in t8rin.imagetoolbox.feature.root.presentation.components.navigation.
t8rin.imagetoolbox.feature.root.presentation.screenLogic uses t8rin.imagetoolbox.feature.root.presentation.components.navigation, so a change to t8rin.imagetoolbox.feature.root.presentation.components.navigation can break t8rin.imagetoolbox.feature.root.presentation.screenLogic, while a change to t8rin.imagetoolbox.feature.root.presentation.screenLogic can't break t8rin.imagetoolbox.feature.root.presentation.components.navigation.
Position
Below the diagonal: t8rin.imagetoolbox.feature.root.presentation.screenLogic uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 28.4 · Weak · gated by R1, R2, R3 ·
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
18
High / Critical
A03:2025 — Software Supply Chain Failures
4
Medium
A07:2025 — Authentication Failures
3
High / Critical
Roadmap
Top priorities: Resolve the 1 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED; Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up; Resolve the 40 finding(s) in Cyclomatic Complexity.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 1 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED.
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
Add a test runner (vitest / jest / playwright) and eslint and type checking (adopt TypeScript, or type-check the existing JavaScript with `checkJs`) as package.json scripts and run them in CI.
God Classes: TooManyMethods: GradientMakerComponent
How the grades work
Every finding carries one of four grades. Three say how serious it is. The fourth says this
survey could not settle it — and it is a grade, not a gap.
Critical — 41
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 — 4438
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 — 12
Something this survey could not settle
from the outside, and which could be critical or serious. Either a control was required and no
positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves
nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean
result. These are excluded from the score rather than awarded a pass, so the number on the cover neither
rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each
one is named under Limitations.
Methodology & how to trust this report
This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 85 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.8, the weighted average across measured dimensions.
Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.
What we checked — 85 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, 4570 of 4649 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 or a scanner, 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.
D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: test source is present (.kt) but the built-in coverage collector has no runner for this repository's ecosystem — so this suite was never executed by it. Not scored — this is a gap in the analyzer's language coverage, not a defect in the repo.
D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test source is present (.kt) and this repository declares a JVM test suite (repository root, Gradle), but it was not re-run: no test result was produced. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
D12 Dependency Hygiene — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Not scored — 158 Maven/Gradle manifest(s) were read, stating a version for 195 dependency(ies) and leaving 2 to a parent or an imported BOM, but no build resolved the dependency graph, so the outdated signal was not established. NOT a finding that these dependencies are current or healthy.
D14 License Compliance — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares package.json, but the licence verdict published here was taken over its JVM 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.
D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 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 (feature/xiangqi/build.gradle.kts), 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.
D24 Comment Value — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. D24 compares a comment's words with the identifiers, literals and constructs of the code it annotates, using English function-word and rationale lexicons. Comments in another script or language were left unread rather than counted as clean.
D24 Comment Value — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
D30 Dependency Vulnerabilities — measured, with a gap in what it reached — 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. The scanner produced no output at all, so no dependency was actually scanned. 1 of 2 declared ecosystem(s) (npm) WERE scanned and every vulnerability they reported is included in this result; osv was not, so this dimension's score covers less than the dependency surface this repository declares, and nothing here is evidence that osv is free of known-vulnerable dependencies. osv: the scanner produced no output at all, so no dependency was actually scanned. This is reported as a measurement gap rather than a clean pass. osv-scanner documents exit 128 as "no package sources found" — but this scan only invoked it because the tree declares a source it supports (`pom.xml` and the resolved lockfiles among them), so the tool's report and this repository disagree. Check that those sources are reachable from the directory the scan ran in before concluding anything is missing. If this tree really does commit only range-pinned manifests, commit the lockfile your package manager produces — but only where your ecosystem HAS one and commits it: Maven has none at all (osv-scanner reads `pom.xml` directly) and Gradle writes one only under opt-in dependency locking, while a published Composer package and a published Dart library both deliberately exclude theirs. In those three, generate one in CI before the scan instead — a resolved dependency list or an SBOM fed to the scanner.
D32 Data Compliance (PII/GDPR) — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `build-logic/convention/src/main/kotlin/com/t8rin/imagetoolbox/ProjectExtensions.kt`, `core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/A2uiRenderContext.kt`, `core/a2ui/src/main/java/com/wanbaohe/a2ui/viewModel/A2uiComponent.kt`, `core/crash/src/main/java/com/t8rin/imagetoolbox/core/crash/presentation/screenLogic/CrashComponent.kt`, `core/data/src/main/java/com/t8rin/imagetoolbox/core/data/remote/AndroidRemoteResourcesStore.kt`, … (+248 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.
D43 Malicious Dependencies — measured, with a gap in what it reached — 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. The scanner produced no output at all, so no dependency was actually scanned. 1 of 2 declared ecosystem(s) (npm) WERE scanned and every vulnerability they reported is included in this result; osv was not, so this dimension's score covers less than the dependency surface this repository declares, and nothing here is evidence that osv is free of known-vulnerable dependencies. osv: the scanner produced no output at all, so no dependency was actually scanned. This is reported as a measurement gap rather than a clean pass. osv-scanner documents exit 128 as "no package sources found" — but this scan only invoked it because the tree declares a source it supports (`pom.xml` and the resolved lockfiles among them), so the tool's report and this repository disagree. Check that those sources are reachable from the directory the scan ran in before concluding anything is missing. If this tree really does commit only range-pinned manifests, commit the lockfile your package manager produces — but only where your ecosystem HAS one and commits it: Maven has none at all (osv-scanner reads `pom.xml` directly) and Gradle writes one only under opt-in dependency locking, while a published Composer package and a published Dart library both deliberately exclude theirs. In those three, generate one in CI before the scan instead — a resolved dependency list or an SBOM fed to the scanner.
AXB1 Runtime evidence locked — no reproducible boot — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Subject: 35 markup document(s) — HTML, Razor, JSX, Vue, Svelte or server templates. The Runtime Evidence tier boots an app only via docker-compose, an Aspire AppHost, a Dockerfile, an npm dev script, a web service's own toolchain entry point (cargo, go, dotnet, Python, Spring Boot), or an Android app's own Gradle wrapper (run on an emulator); an Apple or Flutter app needs a host it lacks. None applied, so no live runtime a11y/egress/header evidence was collected. You can widen what we reach: add a docker-compose.yml (or an Aspire AppHost) that brings the app up with its dependencies. We then boot it in an isolated sandbox and gathers real runtime evidence — you change nothing in your pipeline (no CI step, no SDK).
C2 Access Controls — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
DM11 Constructible invalid state — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 32 further occurrence(s) are not listed individually; the score already reflects all 72.
DM8 Value-object opportunities — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check finds primitive parameters that travel together through several signatures of the domain (a missing value object). Its deterministic rule has not yet shown 95 % precision on adjudicated rows, so the clumps it finds are counted here and not published as findings, and the card carries no score. That is a limit of the analyzer, not a finding about your code.
DM9 Scattered domain decisions — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The frontend declares that it computes whether a construction is produced or passed, yet 9738 of 9763 constructions arrived without the answer. Arm two skipped them; it did not clear them.
ED5 Idempotency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check 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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby, Scala, Rust and Java 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.
IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby, Scala and Rust 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.
M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
P1 CI/CD gates — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. A CI pipeline exists and the word "test" appears, but no explicit test-runner invocation (your stack's test command, or a test job) was matched — so either the gate runs tests through a step this pass could not recognise, or "test" is incidental here (a path, "latest", a reporter). Which of the two it is cannot be settled from this dimension's evidence; the coverage dimensions report whether a suite exists at all. You can widen what we reach: name the test runner explicitly in the pipeline step (your stack's test command, or a job named for the suite) so the gate is unambiguous to a reader and to this pass.
R2 Cyclomatic Complexity — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 63 further occurrence(s) are not listed individually; the score already reflects all 103.
S1 Web-Security Posture — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
X10 Duplicated predicate — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 158 further occurrence(s) are not listed individually; the score already reflects all 198.
X24 Document value interpolated into markup unescaped — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X3 Exception handling — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 111 further occurrence(s) are not listed individually; the score already reflects all 151.
X7 Silent fallback defaults — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 34 further occurrence(s) are not listed individually; the score already reflects all 74.
Repo exclusion declarations: 2 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
We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
D21 Naming Consistency: Naming consistency compares each name with the convention its structural peers follow in this repository: it cannot tell whether a consistently used name is a good one, and languages other than C# and TypeScript are not measured.
D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
AC4 Keyboard semantics: Keyboard semantics are inferred from markup attributes — interactivity wired purely in script, focus managed at runtime, and component-level handlers are invisible. A clean result means "no static keyboard-trap shape", not a keyboard-operability proof.
AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
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: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
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.
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.
292 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was ChildProvider.createChild at 179. A further 82 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 WeatherIconMapperKt.getIconByCode at 508 — they are counted neither in the figure above nor in this dimension's score. 60 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: core/weather/src/main/java/com/weather/icons/WeatherIconMapper.kt (WeatherIconMapperKt.getIconByCode at 508), core/data/src/main/java/com/t8rin/imagetoolbox/core/data/image/AndroidImageScaler.kt (AndroidImageScaler.toResizeFunction at 52), feature/lifetime/src/main/java/com/shifenmiao/lifetime/util/PresetDisplayNames.kt (PresetDisplayNamesKt.presetEventNameRes at 49), core/domain/src/main/kotlin/com/t8rin/imagetoolbox/core/domain/model/MimeType.kt (MimeType.toFileExtension at 43), feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/model/DefaultCategoryNames.kt (DefaultCategoryNamesKt.defaultCategoryNameResId at 43), and 55 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.
+ 277 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 1 body over 120 down to 120 or less in Cyclomatic Complexity — start with ChildProvider.createChild (cyclomatic 179). — Refactoring it lifts Cyclomatic Complexity from 5.4 to about 5.8/10.
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.
+ 513 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 2 bodies over 120 down to 120 or less in Cognitive Complexity — start with MermaidSessionPipeline.preprocessForStyle (cognitive 182), HandleDeeplinksKt.handleDeeplinks (cognitive 135). — 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 Cognitive Complexity from 5.3 to about 5.7/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes8.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 393 MethodTooLong finding(s) in God Classes — start with AppDatabase.kt (20), FeatureDatabase.kt (20), AIDuelChatScreen.kt (5). — One of this dimension's main actionable groups (393 warning-level).
Resolve the 213 FileTooLong finding(s) in God Classes — start with OnlineMatchScreen.kt (3), MarkupLayersComponent.kt, CoinFrontLi.kt. — One of this dimension's main actionable groups (213 warning-level).
Resolve the 67 TooManyMethods finding(s) in God Classes — start with MarkupLayersComponent.kt, AndroidSettingsManager.kt, ExtendedFrameImage.kt. — One of this dimension's main actionable groups (67 warning-level).
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.
1540 duplicated block group(s) detected. 6.2 % of the production lines (78,649 of 1,266,212) are in a reported copy. A further 863 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. 7 of the 2403 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.
+ 548 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 76 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with CreateAIAgentComponent.kt (2), MarkupProjectStore.kt (2), ThreeFrameImage.kt (2). — One of this dimension's main actionable groups (76 warning-level).
Resolve the 74 Duplicated block (10 lines × 2) finding(s) in Code Duplication — start with CreateAIAgentComponent.kt (3), UserInfoScreen.kt (2), MermaidSessionPipeline.kt (2). — One of this dimension's main actionable groups (74 warning-level).
Resolve the 69 Duplicated block (11 lines × 2) finding(s) in Code Duplication — start with UriUtils.kt (2), CreateAIAgentComponent.kt (2), CreateAIAgentScreen.kt (2). — One of this dimension's main actionable groups (69 warning-level).
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling6.2 / 10Adequate✓ 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.
158 production modules (Gradle+npm+CMake), 0 dependency cycle(s), 37 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; 29 module(s) off the main sequence, with abstractness counted on 153 of the 158 (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).
Unstable project WanBaoHe:feature:ad-watch · ×37
Off the main sequence: WanBaoHe:core:camera-api · ×28
Off the main sequence: WanBaoHe:feature:common
What to do
Resolve the 37 Unstable project WanBaoHe finding(s) in Coupling. — One of this dimension's main actionable groups (37 warning-level).
Resolve the 28 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (28 warning-level).
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 21 Low cohesion finding(s) in Cohesion (LCOM4) — start with CollageMakerComponent.kt, ItemListComponent.kt, AgentLoopExecutor.kt. — One of this dimension's main actionable groups (21 warning-level).
Detailed fixes: d6_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.
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 112 declared JVM dependency artifact(s) use a banned license. Licences were resolved from the POMs Maven Central publishes, over the coordinates this repository's 158 Maven/Gradle manifest(s) declare with a version resolvable from the manifest itself — the same declaration-site closure this analysis reads for dependency currency. The JVM has no lockfile a checkout is guaranteed to carry, so this is deliberately NOT the transitive closure. 2 further coordinate(s) are declared with no version at the declaration site — inherited from a parent POM, a BOM or an unresolved Gradle version reference — and are NOT graded: this verdict covers what the checkout pins, not the full transitive graph. A further 80 coordinate(s) are not published to Maven Central — another repository (Google's Maven hosts androidx), a SNAPSHOT, or a private artifact — so their licences are not readable from here and they are outside this verdict. ★ COVERAGE OF THIS VERDICT: it grades this repository's JVM dependencies and nothing else. The repository also declares package.json, and the licences of those dependencies were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.
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.
Top hotspots: feature/app/src/main/java/com/t8rin/imagetoolbox/feature/root/presentation/components/navigation/ChildProvider.kt (49×179=8771); feature/text-card/src/main/java/com/wanbaohe/textcard/presentation/editor/TextCardEditorScreen.kt (27×70=1890); feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/editor/EditorScaffold.kt (33×53=1749) Repeated repair below the complexity floor: feature/common/src/main/java/com/shifenmiao/common/components/OperateBar.kt (7 of 10 changes were fixes); core/database/src/main/java/com/shifenmiao/database/item/dao/ItemEntityDao.kt (5 of 9 changes were fixes); feature/ai/src/main/java/com/shifenmiao/ai/component/AIChatBaseComponent.kt (5 of 9 changes were fixes)
Resolve the 115 Hotspot finding(s) in Churn × Complexity Hotspots — start with ChildProvider.kt, TextCardEditorScreen.kt, EditorScaffold.kt. — One of this dimension's main actionable groups (115 warning-level).
Resolve the 12 Repeated repair finding(s) in Churn × Complexity Hotspots — start with OperateBar.kt, ItemEntityDao.kt, AIChatBaseComponent.kt. — One of this dimension's main actionable groups (12 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 Factor9.3 / 10Exemplary✓ 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.
275 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is feature/settings/src/main/java/com/wanbaohe/setting/ai/screen/AIEngineSettingsDetailScreen.kt. Counted over 3000 of the 6527 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 · ×2
✓ On the Gold path — maintain.
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.
10 deducted task-comment markers across 1266212 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 9 TodoComment finding(s) in Explicit Debt — start with Prism_css.java, CropStateImpl.kt, DynamicCropState.kt. — One of this dimension's main actionable groups (9 warning-level).
Resolve the 1 XxxComment finding(s) in Explicit Debt — start with GetCurrentTimeTool.kt. — One of this dimension's main actionable groups (1 warning-level).
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: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.
What it measures: Whether names — types, methods, variables — are clear and consistent.
Method: Seven vocabulary-free rules (N1-N7) mine each naming convention from the repository and flag a name that breaks a convention its structural peers in the same unit follow; production C# and TypeScript, each its own population. Deterministic, no model, no sample. Advisory.
10 naming inconsistencies among 505 declarations measured against a convention their peers follow.
`currentAIEngine` spells `AI` where 78 names in the project spell it `Ai` · ×2feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:672
`currentAIEngine` spells `AI` where 79 names in the project spell it `Ai` · ×2feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuGameComponent.kt:732
`currentAIEngine` spells `AI` where 83 names in the project spell it `Ai` · ×2feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiGameComponent.kt:585
`produceID` spells `ID` where 154 names in the project spell it `Id`core/model/src/main/java/com/shifenmiao/model/ai/AIGCInfo.kt:59
`propagateID` spells `ID` where 154 names in the project spell it `Id`core/model/src/main/java/com/shifenmiao/model/ai/AIGCInfo.kt:77
+ 2 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 2 `currentAIEngine` spells `AI` where 78 names in the project spell it… finding(s) in Naming Consistency — start with ChessGameComponent.kt, ChessRouterComponent.kt. — One of this dimension's main actionable groups (2 recommendation-level).
Resolve the 2 `currentAIEngine` spells `AI` where 79 names in the project spell it… finding(s) in Naming Consistency — start with GomokuGameComponent.kt, GomokuRouterComponent.kt. — One of this dimension's main actionable groups (2 recommendation-level).
Resolve the 2 `currentAIEngine` spells `AI` where 83 names in the project spell it… finding(s) in Naming Consistency — start with XiangqiGameComponent.kt, XiangqiRouterComponent.kt. — One of this dimension's main actionable groups (2 recommendation-level).
Detailed fixes: d21_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether comments are worth it — explaining WHY (valuable) rather than WHAT (redundant).
Method: Every inline C# comment compared word by word with the identifiers, literals and constructs of the code it annotates (taken from the syntax); a comment whose words that code already contains is redundant, as are closing-brace labels and generator template text. Comments giving a reason or a reference are kept; other scripts and languages are not judged. Deterministic, exhaustive, advisory.
29 of 155 build units (Gradle, npm) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesion · ×29core/resources/build.gradle.kts:1
What to do
Resolve the 29 Projects may be oversized for their cohesion finding(s) in Project Cohesion — start with build.gradle.kts (29). — One of this dimension's main actionable groups (29 recommendation-level).
Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.
Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.
Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.
71 % of calls cross a namespace and 5 % go through an interface, but 100 % of collaborators are co-located — so a call's collaborators sit together and tracing stays easy. Baseline: small — navigation cost is tolerated.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: REDACTED scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.
1 finding(s): 0 critical, 1 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.
REDACTED
REDACTED
What to do
Resolve the 1 REDACTED finding(s) in Secrets (history) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.
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).
18 finding(s): 0 critical, 10 high, 8 medium, 0 low. 9 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 13 file(s) — `.github/workflows/issue-triage.lock.yml`, `core/resources/src/main/assets/js/tailwindcss.js`, `feature/ai/src/main/java/com/shifenmiao/ai/component/AIStreamAnswerComponent.kt` (lines 469–470, line 476, lines 480–482), `feature/file-viewer/src/main/assets/viewer/epub.js` (line 5), `feature/file-viewer/src/main/assets/viewer/lib/pptx/pptxjs.js`, … (+8 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 1 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
+ 1 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (3). — One of this dimension's main actionable groups (3 warning-level).
No action in Static Analysis (SAST) — all 9 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (9 issue-level, 0 of them charged here).
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 Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
No known-vulnerable dependencies in the 1 ecosystem(s) that were scanned (npm). Partial dependency scan: 1 of 2 declared ecosystem(s) were scanned (npm), and the findings above are real and complete for them. osv was not scanned (osv: the scanner produced no output at all, so no dependency was actually scanned), so this is not the whole dependency surface and the result is reported at reduced confidence.
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.
Every significant source file has living knowledge — recently and meaningfully worked. Counted over 3000 of the 6527 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 1 Change coupling finding(s) in Change Coupling — start with AIAddEngineScreen.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.
What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.
Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
No known-vulnerable dependencies in the 1 ecosystem(s) that were scanned (npm). Partial dependency scan: 1 of 2 declared ecosystem(s) were scanned (npm), and the findings above are real and complete for them. osv was not scanned (osv: the scanner produced no output at all, so no dependency was actually scanned), so this is not the whole dependency surface and the result is reported at reduced confidence.
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 4 platform declaration(s) and 195 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
✓ On the Gold path — maintain.
Detailed fixes: d44_recommendation.md.
Do you agree with this assessment?
Frontend & cross-cutting dimensions
R = React/JS · M = Maturity · P = Readiness.
AC1 · Text alternatives4.8 / 10Weak✓ Tool-verified
Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.
Coverage: Population: image/media elements — img, area, input[type=image], svg, video, object, embed, canvas — across the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and dynamic-attribute elements are skipped. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is NOT read by any producer, so it contributes no element to this population; where such a frontend is present the card discloses it as an analyzer gap rather than scoring around it.
An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative. — web/file_transfer/js/features/files/interactions.js:79
What to do
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
Do you agree with this assessment?
AC2 · Forms & labels4.9 / 10Weak✓ Tool-verified
Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, a click handler on a plain element names the control it declares, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.
Coverage: Population: form controls, buttons, links, fieldsets and known UI-library field components in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and spread/dynamic-attribute elements are skipped, so a control whose label arrives through a spread or a runtime expression is deliberately not judged. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id. (×2) — feature/lifetime/protype/_1/code.html:121, feature/lifetime/protype/_1/code.html:142
A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one). (×3) — web/file_transfer/index.html:211, web/file_transfer/js/features/files/render.js:124, web/file_transfer/js/features/files/render.js:184
This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label. (×4) — web/milkdown-editor/index.html:738, web/milkdown-editor/index.html:739, web/milkdown-editor/index.html:751, …
What to do
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
Do you agree with this assessment?
AC3 · Page structure4.2 / 10Weak✓ Tool-verified
Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.
Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
With more than one navigation landmark, each needs an aria-label/aria-labelledby (e.g. "Primary", "Footer") so assistive tech can tell them apart. At least one nav here is unlabelled. — web/file_transfer/index.html:2
The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en"). (×11) — web/file_viewer/src/docx.html:2, web/file_viewer/src/epub.html:2, web/file_viewer/src/imgweb.html:2, …
No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. (×11) — web/file_viewer/src/docx.html:2, web/file_viewer/src/imgweb.html:2, web/file_viewer/src/md.html:2, …
A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope). (×2) — web/file_viewer/src/prose-doc.js:1702, web/file_viewer/src/prose-rtf.js:460
user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta. — web/milkdown-editor/index.html:5
What to do
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
Other · Accessibility — Whether interactive behaviour is keyboard-reachable — no click handler on a non-interactive element lacking a role, tabindex and key handler, no element the repo's own CSS styles `cursor: pointer` without giving it any of the three, no unfocusable element whose only binding is a mouse enter/leave pair or a double-click, no positive tabindex, no href-less anchor, no placeholder-href (#/javascript) link acting as a button. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: click handlers on non-interactive elements lacking role+tabindex+key handler, positive tabindex values, and href-less anchors. Components skipped, spreads suppressed. Deterministic, hard fact per element.
Coverage: Population: elements that pose a keyboard-semantics question, in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) — a non-natively-interactive element carrying a click handler, a double-click or hover enter/leave binding, a pointer-only gesture on a tabindex="0" element, or `cursor: pointer` from the repo's own CSS; an href-less or placeholder-href (#, javascript:) anchor; and any element with a positive tabindex. Natively interactive elements used correctly (<button>, <a href>, form controls) are NOT in the population — there is nothing to judge — so a page of nothing but correct controls gives AC4 nothing to measure. Keyboard reachability is judged from the markup, never from a rendered page. ★ An interactive element declared in a tagged-template (html`…`) or hyperscript frontend is NOT in this population — no producer reads either — so an empty population is reported as an analyzer gap, never as "this repository has no interactive elements".
A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler. (×3) — web/file_transfer/index.html:219, web/file_transfer/js/features/files/navigation.js:13, web/file_transfer/js/features/files/navigation.js:24
This <div role="dialog"> is a modal dialog, but focus is moved into it, but nothing keeps it there: Tab walks out to the page behind, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close. (×2) — web/file_viewer/src/epub.html:32, web/file_viewer/src/epub.html:43
An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action. (×2) — web/file_viewer/src/prose-doc.js:1501, web/file_viewer/src/prose-odt.js:872
What to do
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
Other · Accessibility — Whether ARIA is used correctly — valid non-abstract roles, the ARIA state a role requires, valid (non-misspelled) aria-* attribute names, in-enum values for token-typed aria-* attributes, and no aria-hidden on (or wrapping) a focusable element. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: role values checked against the WAI-ARIA role set (abstract/invalid flagged), required ARIA state for a role, and aria-hidden on a focusable element. Deterministic, role/attribute level.
Coverage: Population: elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) that carry a role or an aria-* attribute; roles and token values are checked against the ARIA enums exhaustively within that set. An expression-valued (dynamic) role or aria-* value is skipped rather than guessed, and markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.
Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.
Coverage: Population: styled elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx), plus in-repo <style> blocks, in-repo .css files and CSS-in-JS literals. Colour contrast is computed from LITERAL colour pairs only (hex/rgb/hsl/named, including var() tokens and Tailwind neutral utilities) — computed, runtime-themed and external-CDN colour is never resolved, so this is a partial read of contrast by construction. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
`.skeleton` moves (`animation: shimmer 1.5s infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — web/file_transfer/index.html:26
`.spinner` moves (`animation: spin 1s linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — web/milkdown-editor/index.html:398
`.dialog` moves (`transition: transform 0.2s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — web/milkdown-editor/index.html:460
`.milkdown` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — web/milkdown-editor/index.html:175
`.milkdown .editor` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — web/milkdown-editor/index.html:179
What to do
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
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.
Other · Architecture — Whether singleton services avoid mutable shared instance state that concurrent callers would race on.
Method: Roslyn scan: singleton field mutations unguarded by lock or Interlocked, per type; syntax-based guard detection. Deterministic, traceable per field.
`A2uiComponentRegistry` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (rendererMap; e.g. `rendererMap` in `register` at line 34). — core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/A2uiComponentRegistry.kt:26
`NetworkAudioPlayer` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (effectPlayer, backgroundDesired, backgroundPlayerSource, backgroundPlayer, playEpoch; e.g. `effectPlayer` in `playEffect` at line 67). — core/base/src/main/java/com/shifenmiao/base/audio/NetworkAudioPlayer.kt:51
`DeviceInfoModule` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (info; e.g. `info` in `getDeviceInfoFun` at line 103). — core/base/src/main/java/com/shifenmiao/base/hilt/DeviceInfoModule.kt:48
`VideoPipState` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (owner; e.g. `owner` in `update` at line 83). — core/base/src/main/java/com/shifenmiao/base/pip/VideoPipState.kt:70
`ActionRegistry` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (customHandlers; e.g. `customHandlers` in `register` at line 129). — core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/action/ActionEngine.kt:122
`ModifierRegistry` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (handlers; e.g. `handlers` in `register` at line 92). — core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/modifier/ModifierRegistry.kt:76
`ComponentRegistry` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (renderers; e.g. `renderers` in `register` at line 75). — core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/renderer/ComponentRegistry.kt:66
`OkHttpHtmlDownloader` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (currentClient; e.g. `currentClient` in `downloadHtml` at line 42). — core/network/src/main/java/com/shifenmiao/network/downloader/OkHttpHtmlDownloader.kt:38
`GmRewardedAdController` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (sdkStarting, loading, rewardedAd, configRetried; e.g. `sdkStarting` in `ensureSdkStarted` at line 100). — feature/ad-watch/src/domestic/java/com/wanbaohe/adwatch/ads/GmRewardedAdController.kt:63
`GmsRewardedAdController` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (loading, rewardedAd; e.g. `loading` in `preloadInternal` at line 78). — feature/ad-watch/src/google/java/com/wanbaohe/adwatch/ads/GmsRewardedAdController.kt:50
`AgentToolRegistry` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (cachedToolDefinitions; e.g. `cachedToolDefinitions` in `invalidateToolDefinitionsCache` at line 140). — feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/AgentToolRegistry.kt:65
`SignalingClientImpl` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (savedRoomId, savedListener, isUserDisconnect, reconnectAttempts, listener, webSocket; e.g. `savedRoomId` in `connect` at line 112). (×3) — feature/chess/src/main/java/com/wanbaohe/chess/data/online/SignalingClientImpl.kt:59, feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/online/SignalingClientImpl.kt:59, feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/online/SignalingClientImpl.kt:59
`VoiceRecognizer` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (client, recorder; e.g. `client` in `start` at line 109). — feature/common/src/main/java/com/shifenmiao/common/voice/VoiceRecognizer.kt:47
`LoginStateHolder` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (handledWechatCodes; e.g. `handledWechatCodes` in `markWechatCodeHandled` at line 195). — feature/login/src/main/java/com/shifenmiao/login/state/LoginStateHolder.kt:44
`InlineMediaPlaybackCoordinator` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (activeController; e.g. `activeController` in `activate` at line 57). — feature/media-player/src/main/java/com/wanbaohe/media/domain/InlineMediaPlaybackController.kt:54
`ExoPlaybackEngine` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (playerKind, queueEntries, errorStreak, activeTextureView, mediaSession, exoPlayer; e.g. `playerKind` in `openQueue` at line 107). — feature/media-player/src/main/java/com/wanbaohe/media/playback/ExoPlaybackEngine.kt:73
`PoemService` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (memoryFilterCache; e.g. `memoryFilterCache` in `loadFilterCache` at line 162). — feature/poem/src/main/java/com/wanbaohe/poem/service/PoemService.kt:57
`VisualAutomationController` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (isRunning, currentActivity, actionHistory; e.g. `isRunning` in `startTask` at line 126). — feature/visual-automation/src/main/java/com/wanbaohe/visual/automation/VisualAutomationController.kt:87
`WebpService` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (cachedExtractResult; e.g. `cachedExtractResult` in `extractFrames` at line 67). — feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/service/WebpService.kt:45
`LocalXiangqiEngine` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (writer, reader, process; e.g. `writer` in `destroyProcess` at line 219). — feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/local/LocalXiangqiEngine.kt:56
What to do
Java/Kotlin: keep container singletons stateless — move per-request data into locals or a request-scoped bean — or back the state with java.util.concurrent types (ConcurrentHashMap, AtomicInteger/AtomicReference), guard it with synchronized / a Lock (Kotlin: withLock), or mark a flag that is only ever overwritten volatile (@Volatile).
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 dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
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.
`A2uiRendererModule` declares 36 abstract methods: `bindColumnRenderer`, `bindRowRenderer`, `bindCardRenderer`, `bindListRenderer`, `bindButtonRenderer`, `bindTextFieldRenderer`, `bindCheckboxRenderer`, `bindChoicePickerRenderer`, `bindSliderRenderer`, `bindDateInputRenderer`, `bindTimeInputRenderer`, `bindTextRenderer`, `bindImageRenderer`, `bindIconRenderer`, `bindDividerRenderer`, `bindVideoRenderer`, `bindAudioPlayerRenderer`, `bindTabsRenderer`, `bindProgressRenderer`, `bindModalRenderer`, `bindSpacerRenderer`, `bindSwitchRenderer`, `bindStepperRenderer`, `bindRadioGroupRenderer`, `bindRowSelectorRenderer`, `bindColumnSelectorRenderer`, `bindGridSelectorRenderer`, `bindListSelectorRenderer`, `bindColorPickerRenderer`, `bindLocationPickerRenderer`, `bindImagePickerRenderer`, `bindFilePickerRenderer`, `bindFolderPickerRenderer`, `bindRangeSliderRenderer`, `bindRatingRenderer`, `bindBadgeRenderer`. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — core/a2ui/src/main/java/com/wanbaohe/a2ui/di/A2uiRendererModule.kt:67
`AppDatabase` declares 25 abstract methods: `blogArticleDao`, `searchResultDao`, `imageDao`, `aiEngineDao`, `aiModelDao`, `itemEntityDao`, `itemDataDao`, `messageDao`, `conversationDao`, `agentDao`, `chatPromptDao`, `categoryDao`, `activityLogDao`, `toolCallTaskDao`, `themePresetDao`, `toolCatalogDao`, `conversationToolPolicyDao`, `toolBindingDao`, `ttsAudioEntryDao`, `passwordVaultEntryDao`, `passwordVaultCategoryDao`, `authCodeDao`, `memoryEntryDao`, `skillDao`, `conversationMemoryPolicyDao`. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — core/database/src/main/java/com/shifenmiao/database/AppDatabase.kt:136
`FeatureDatabase` declares 46 abstract methods: `paddleOcrTaskDao`, `docConvertTaskDao`, `markTodoCategoryDao`, `markTodoTaskDao`, `markTodoDashboardDao`, `markTodoTagDao`, `scheduleEventDao`, `scheduleProviderBindingDao`, `scheduleSyncStateDao`, `frequencyEventDao`, `personalMilestoneDao`, `countdownEventDao`, `milestoneAiInsightDao`, `watermarkTemplateDao`, `idPhotoSizeDao`, `altitudeRecordDao`, `speedTestRecordDao`, `speedTestConfigDao`, `bookkeepingCategoryDao`, `bookkeepingRecordDao`, `teleprompterScriptDao`, `dataDraftDao`, `xiangqiGameDao`, `xiangqiPlyDao`, `xiangqiAiTaskDao`, `gomokuGameDao`, `gomokuPlyDao`, `gomokuAiTaskDao`, `chessGameDao`, `chessPlyDao`, `chessAiTaskDao`, `wheelDao`, `chatMessageDao`, `chatSessionDao`, `recentAccessDao`, `blessingRecordDao`, `blessingWishDao`, `blessingTabConfigDao`, `poemDao`, `habitDao`, and 6 more. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — core/database/src/main/java/com/shifenmiao/database/FeatureDatabase.kt:185
`AiEngineDao` declares 20 abstract methods: `getAllEngines`, `getAllEnginesList`, `getEnginesByUserLevel`, `getEnginesListByUserLevel`, `getEngineByName`, `getEnginesByName`, `getEngineById`, `getEngineByNameAndProtocol`, `updateEngineSelectedModelName`, `updateEnginesSelectedModelNameByNameAndCurrentModelName`, `insertEngine`, `insertEngines`, `insertEnginesIgnore`, `updateEngine`, `deleteEngine`, `deleteEngineByNameAndProtocol`, `renameEngineName`, `deleteAllEngines`, `getEngineCount`, `clearProxyRoutesByNames`. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — core/database/src/main/java/com/shifenmiao/database/ai/dao/AiEngineDao.kt:27
`AiModelDao` declares 19 abstract methods: `getAllModels`, `getAllModelsList`, `getModelById`, `getMaxSortOrderForEngine`, `getModelByNameAndEngineName`, `getModelByRemoteIdAndEngineName`, `getModelsByProvider`, `getModelsByEngineName`, `getModelsByEngineNameFlow`, `getFirstAvailableModel`, `getFirstAvailableModelForEngine`, `deleteModelsByEngineName`, `updateModelsEngineName`, `updateModelsProvider`, `insertModel`, `insertModels`, `updateModel`, `deleteModel`, `deleteAllModels`. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — core/database/src/main/java/com/shifenmiao/database/ai/dao/AiModelDao.kt:27
`ConversationDao` declares 16 abstract methods: `insertReplace`, `update`, `getConversationById`, `getConversationByConversationId`, `deleteConversationById`, `deleteConversationByConversationId`, `deleteAll`, `getLastConversationByType`, `getLastHiddenConversationByType`, `getConversationsByType`, `getVisibleConversationsByType`, `getLastConversationByEntry`, `observeConversation`, `observeAllConversations`, `observeHistoryConversations`, `updateTitle`. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — core/database/src/main/java/com/shifenmiao/database/ai/dao/ConversationDao.kt:31
`MessageDao` declares 40 abstract methods: `insertReplace`, `insertNew`, `delete`, `deleteMessagesByConversationId`, `deleteMessagesByCompletionId`, `updateTitlesByConversationId`, `getMessagesForConversation`, `getMessagesBeforeCurrentTime`, `insertAll`, `getMessagesByConversationId`, `getMessagesForPage`, `getEarliestMessagesForPage`, `getHistoryMessageList`, `getEarliestMessagesForPageFlow`, `deleteAll`, `getMessagesFlow`, `getMessagesFlowPaged`, `getMessageListOnce`, `getMessagesBeforeCurrentTimeFlow`, `getById`, `searchQuestionOrAnswer`, `updateMessageEntityExpiredByCompletionId`, `updateStreamDraft`, `getMessagesByFinishReason`, `updateMessageAnswerAndFinishReason`, `getMessageFinishReason`, `deleteMessagesByIds`, `queryQuestionAndAnswerByCompletionId`, `findLatestStreamAnswer`, `getActiveMessageCountsByConversationIds`, `getMessageWithImages`, `getMessagesWithImagesByConversationId`, `getMessageWithSearchResults`, `getMessagesWithSearchResultsByConversationId`, `getMessageWithAllRelations`, `getMessagesWithAllRelationsByConversationId`, `getRecentDistinctQuestions`, `getTokenUsageSummary`, `getTokenUsageByModel`, `getTopTokenQueries`. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — core/database/src/main/java/com/shifenmiao/database/ai/dao/MessageDao.kt:36
`PromptDao` declares 21 abstract methods: `getPromptById`, `getPromptByRemoteId`, `getPromptByDocumentId`, `backfillDocumentIdIfMissing`, `getAllPrompts`, `getAllPromptsFlow`, `getPromptsBySource`, `getPromptsBySourceFlow`, `getPromptBySource`, `getPromptLinkByItemId`, `getItemIdByPromptId`, `getItemIdsByPromptId`, `insertPromptLink`, `deletePromptLinkByItemId`, `deletePromptById`, `deleteBySource`, `deleteAll`, `insertPrompt`, `updatePromptPreservingRemoteFields`, `getSystemPromptByKey`, `getPromptsByCategoryId`. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — core/database/src/main/java/com/shifenmiao/database/chat_prompt/dao/PromptDao.kt:32
`WheelDao` declares 24 abstract methods: `insertWheel`, `updateWheel`, `deleteWheel`, `observeWheelsWithOptions`, `getWheelById`, `observeRecentWheelsWithOptions`, `updateWheelUsage`, `insertOption`, `insertOptions`, `updateOption`, `deleteOption`, `getOptionsByWheelId`, `getOptionsByWheelIdFlow`, `deleteOptionsByWheelId`, `updateOptionEnabled`, `resetOptionsEnabled`, `resetAllOptionsEnabled`, `insertHistory`, `getWheelHistory`, `getAllHistory`, `observeAllHistory`, `deleteHistoryByWheelId`, `deleteHistoryById`, `clearAllHistory`. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — core/database/src/main/java/com/shifenmiao/database/decision_wheel/dao/WheelDao.kt:30
`ItemDataDao` declares 16 abstract methods: `getByItemId`, `observeByItemId`, `getByRemoteId`, `getByDocumentId`, `getById`, `insertIgnore`, `insertOrReplace`, `updateContent`, `updateFromSync`, `insertLink`, `getDataLinkByItemId`, `deleteLinkByItemId`, `getItemIdsByDataId`, `getLinkedItemIds`, `deleteById`, `getBySource`. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — core/database/src/main/java/com/shifenmiao/database/item/dao/ItemDataDao.kt:33
`ItemEntityDao` declares 85 abstract methods: `updateItem`, `getItemEntityById`, `insertItem`, `insertItemIgnore`, `getItemByRemoteId`, `getItemByDocumentId`, `getItemByTitle`, `getItemsByTypeTitleAndSource`, `lastUpdated`, `getItemsByListType`, `updateItemFromSync`, `upsertUserState`, `getUserStateByItemId`, `setFavorited`, `setPinned`, `bumpPinnedAt`, `setCanEdit`, `setRequiresAuth`, `clearAllRequiresAuth`, `observeItemsRequiringAuth`, `ensureClickStat`, `updateClickStat`, `findItemIdByMiniProgramId`, `getCategoryByName`, `getCategoryByDocumentId`, `updateCategoryFromSync`, `updateCategory`, `insertCategory`, `insertItemCategoryCrossRef`, `insertAgent`, `getAgentByRemoteId`, `getAgentByDocumentId`, `getAgentById`, `updateAgentFromSync`, `getAgentLinkByItemId`, `getPromptLinkByItemId`, `getDataLinkByItemId`, `deleteItemDataById`, `insertPrompt`, `getPromptByRemoteId`, and 45 more. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — core/database/src/main/java/com/shifenmiao/database/item/dao/ItemEntityDao.kt:47
`MarkTodoTaskDao` declares 18 abstract methods: `getByCategoryId`, `getAll`, `search`, `observeAll`, `getById`, `getByIdIncludingDeleted`, `getSoftDeleted`, `getAllByCategoryIdIncludingDeleted`, `upsert`, `setCompleted`, `setStarred`, `updateSortOrder`, `getMaxSortOrder`, `softDeleteById`, `restoreByIdAndDeletedAt`, `purgeByIdAndDeletedAt`, `deleteAll`, `countByCategoryIdAndNormalizedTitle`. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — core/database/src/main/java/com/shifenmiao/database/marktodo/dao/MarkTodoTaskDao.kt:30
`BrowserAutomationService` declares 16 abstract methods: `attach`, `detach`, `navigateToUrl`, `goBack`, `goForward`, `reload`, `getPageInfo`, `extractPageText`, `extractDom`, `executeJavaScript`, `getTabsInfo`, `switchTab`, `createTab`, `closeTab`, `captureScreenshot`, `getSnapshot`. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — core/interfaces/src/main/java/com/shifenmiao/interfaces/browser/BrowserAutomationService.kt:32
`BrowserController` declares 16 abstract methods: `loadUrl`, `goBack`, `goForward`, `reload`, `stopLoading`, `addTab`, `closeTab`, `switchTab`, `getCurrentUrl`, `getCurrentTitle`, `canGoBack`, `canGoForward`, `isLoading`, `getTabs`, `evaluateJavascript`, `captureScreenshotBase64`. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — core/interfaces/src/main/java/com/shifenmiao/interfaces/browser/BrowserAutomationService.kt:82
`AgentFileService` declares 16 abstract methods: `workspaceRoots`, `browseFiles`, `locateFile`, `globFiles`, `grepFiles`, `statFile`, `readFile`, `readMultipleFiles`, `searchInFile`, `readSearchContext`, `editFile`, `applyTextPatch`, `applyRangePatch`, `manageFile`, `unzipFile`, `resolveContentUriToFile`. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — core/model/src/main/java/com/shifenmiao/model/file/AgentFileService.kt:22
`MarkTodoServiceInterface` declares 18 abstract methods: `getDashboardDto`, `getTaskDto`, `getInboxTasksDto`, `searchTasks`, `findCategoryByTitle`, `createCategory`, `updateCategory`, `deleteCategory`, `reorderCategories`, `createTask`, `updateTask`, `duplicateTask`, `deleteTask`, `undoDeleteTask`, `toggleTaskComplete`, `toggleTaskStar`, `reorderTasks`, `createTag`. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — core/model/src/main/java/com/shifenmiao/model/todo/MarkTodoServiceInterface.kt:32
`ApiService` declares 63 abstract methods: `fetchItemsSync`, `fetchBlogs`, `fetchBlog`, `fetchBlogTags`, `createFeedback`, `uploadFile`, `fetchAgent`, `updateAgent`, `fetchPrompt`, `updatePrompt`, `fetchAiConfig`, `submitAiModels`, `fetchAnnouncements`, `checkUpdate`, `fetchTextCardPapers`, `fetchCategories`, `fetchCategoriesSync`, `loginOut`, `sendCode`, `sendCodeNoCheck`, `bindPhone`, `loginByPhone`, `updateRemoteConfig`, `getVoiceAsrWsAuth`, `checkSensitiveWords`, `detectAiText`, `detectAiImage`, `wechatPublicAccountLogin`, `wechatLogin`, `googleLogin`, `login`, `register`, `loginUnified`, `forgotPassword`, `resetPassword`, `applyInvitationCode`, `updateNickname`, `changePassword`, `sendEmailCode`, `sendBindEmailCode`, and 23 more. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — core/network/src/main/java/com/shifenmiao/network/api/ApiService.kt:111
`SettingsInteractor` declares 113 abstract methods: `toggleAddSequenceNumber`, `toggleAddOriginalFilename`, `setEmojisCount`, `setImagePickerMode`, `toggleAddFileSize`, `setEmoji`, `setFilenamePrefix`, `toggleShowUpdateDialogOnStartup`, `setColorTuple`, `setPresets`, `toggleDynamicColors`, `setBorderWidth`, `toggleAllowImageMonet`, `toggleAmoledMode`, `setNightMode`, `setSaveFolderUri`, `setColorTuples`, `setAlignment`, `setScreenOrder`, `toggleClearCacheOnLaunch`, `toggleGroupOptionsByTypes`, `toggleRandomizeFilename`, `createBackupFile`, `restoreFromBackupFile`, `resetSettings`, `createBackupFilename`, `setFont`, `setFontScale`, `toggleAllowCrashlytics`, `toggleAllowAnalytics`, `toggleAllowBetas`, `toggleDrawContainerShadows`, `toggleLockDrawOrientation`, `setThemeStyle`, `setThemeContrast`, `setThemeColorSpec`, `setExpressiveTheme`, `toggleInvertColors`, `toggleScreensSearchEnabled`, `setCopyToClipboardMode`, and 73 more. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/domain/SettingsInteractor.kt:46
`ThemeSettingService` declares 19 abstract methods: `getCurrentTheme`, `listThemes`, `observeThemes`, `switchTheme`, `updateThemeColors`, `setGlassmorphism`, `setLiquidGlass`, `setMeshGradient`, `setGradientStyle`, `setGlassBaseAlpha`, `setGlassBorderAlpha`, `saveUserTheme`, `deleteUserTheme`, `applyThemePreset`, `previewThemePreset`, `setNightMode`, `getNightMode`, `getColorSystem`, `setColorSystem`. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/domain/ThemeSettingService.kt:38
`CloudStorageRepository` declares 26 abstract methods: `getConnections`, `getLastConnectionId`, `getLastBucket`, `getLastPrefix`, `getLastSearchQuery`, `getSort`, `saveSort`, `isGridMode`, `saveUiState`, `saveGridMode`, `saveConnection`, `deleteConnection`, `testConnection`, `listBuckets`, `listObjects`, `searchObjects`, `headObject`, `readBytes`, `uploadObject`, `uploadStream`, `createFolder`, `deleteObject`, `renameObject`, `moveObject`, `buildAuthHeaders`, `buildSignedGetUrl`. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/CloudStorageRepository.kt:27
`PdfManager` declares 29 abstract methods: `extractPages`, `createPdf`, `createSearchablePdf`, `mergePdfs`, `splitPdf`, `removePdfPages`, `rotatePdf`, `rearrangePdf`, `addPageNumbers`, `addWatermark`, `addSignature`, `protectPdf`, `unlockPdf`, `opensWithoutPassword`, `passwordMatches`, `extractPagesFromPdf`, `compressPdf`, `convertToGrayscale`, `repairPdf`, `changePdfMetadata`, `getPdfMetadata`, `stripText`, `cropPdf`, `flattenPdf`, `detectPdfAutoRotations`, `extractImagesFromPdf`, `convertToZip`, `printPdf`, `removeAnnotations`. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/domain/PdfManager.kt:41
`WebViewNavigator` declares 16 abstract methods: `attach`, `detach`, `isAttached`, `loadUrl`, `loadHtml`, `goBack`, `goForward`, `reload`, `stopLoading`, `canGoBack`, `canGoForward`, `captureBitmap`, `createPrintDocumentAdapter`, `evaluateJavascript`, `applySettings`, `clearCache`. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — feature/webview/src/main/java/com/shifenmiao/webview/browser/WebViewNavigator.kt:26
What to do
Split fat interfaces into focused role-interfaces so clients depend only on what they use.
Do you agree with this assessment?
AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified
Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.
Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.
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.
`PlayMoveUseCase.commitInternal` saves `PlyEntity`, `GameEntity` 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. — feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/PlayMoveUseCase.kt:95
`PlayMoveUseCase.commit` saves `PlyEntity`, `GameEntity` 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. (×2) — feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/PlayMoveUseCase.kt:53, feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/PlayMoveUseCase.kt:50
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 / an XException.ThrowIf* helper). C#: a static factory beside a public constructor does not exempt it, and a public parameterless constructor followed by public raw-primitive setters that refuse nothing is charged when the type also declares a validating way in (a guarded constructor or a guarding static method returning the type); TypeScript: a static Create/Of/From/New factory exempts the type. 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.
`ActivityLogEntity`'s public constructor takes `category`, `appTitle`, `title`, `description`, … 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `ActivityLogEntity` 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. — core/database/src/main/java/com/shifenmiao/database/activity/entity/ActivityLogEntity.kt:45
`ItemAgentEntity`'s public constructor takes `documentId`, `title`, `description`, `header`, … 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `ItemAgentEntity` 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. — core/database/src/main/java/com/shifenmiao/database/agent/entity/ItemAgentEntity.kt:38
`AiEngineEntity`'s public constructor takes `name`, `title`, `iconName`, `description`, … 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `AiEngineEntity` 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. — core/database/src/main/java/com/shifenmiao/database/ai/entity/AiEngineEntity.kt:46
`AiModelEntity`'s public constructor takes `name`, `title`, `description`, `temperature`, … 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `AiModelEntity` 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. — core/database/src/main/java/com/shifenmiao/database/ai/entity/AiModelEntity.kt:39
`ConversationEntity`'s public constructor takes `conversationId`, `entryType`, `entryRefId`, `appTitle`, … 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `ConversationEntity` 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. — core/database/src/main/java/com/shifenmiao/database/ai/entity/ConversationEntity.kt:44
`ConversationMemoryPolicyEntity`'s public constructor takes `conversationId` 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `ConversationMemoryPolicyEntity` 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. — core/database/src/main/java/com/shifenmiao/database/ai/entity/ConversationMemoryPolicyEntity.kt:32
`ConversationToolPolicyEntity`'s public constructor takes `conversationId`, `enabledToolNamesJson` 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `ConversationToolPolicyEntity` 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. — core/database/src/main/java/com/shifenmiao/database/ai/entity/ConversationToolPolicyEntity.kt:31
`MemoryEntryEntity`'s public constructor takes `kind`, `content`, `sourceConversationId` 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `MemoryEntryEntity` 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. — core/database/src/main/java/com/shifenmiao/database/ai/entity/MemoryEntryEntity.kt:38
`MessageEntity`'s public constructor takes `completionId`, `conversationId`, `role`, `question`, … 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `MessageEntity` 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. — core/database/src/main/java/com/shifenmiao/database/ai/entity/MessageEntity.kt:40
`SkillEntity`'s public constructor takes `id`, `name`, `description`, `body`, … 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `SkillEntity` 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. — core/database/src/main/java/com/shifenmiao/database/ai/entity/SkillEntity.kt:32
`ToolBindingEntity`'s public constructor takes `ownerType`, `toolName` 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `ToolBindingEntity` 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. — core/database/src/main/java/com/shifenmiao/database/ai/entity/ToolBindingEntity.kt:39
`ToolCallTaskEntity`'s public constructor takes `id`, `conversationId`, `completionId`, `toolName`, … 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `ToolCallTaskEntity` 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. — core/database/src/main/java/com/shifenmiao/database/ai/entity/ToolCallTaskEntity.kt:44
`ToolCatalogEntity`'s public constructor takes `name`, `title`, `summary`, `description`, … 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `ToolCatalogEntity` 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. — core/database/src/main/java/com/shifenmiao/database/ai/entity/ToolCatalogEntity.kt:54
`AiDetectRecordEntity`'s public constructor takes `type`, `inputSummary`, `verdict`, `detailJson` 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `AiDetectRecordEntity` 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. — core/database/src/main/java/com/shifenmiao/database/aidetect/entity/AiDetectRecordEntity.kt:31
`AltitudeRecordEntity`'s public constructor takes `source`, `latitude`, `longitude`, `title`, … 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `AltitudeRecordEntity` 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. — core/database/src/main/java/com/shifenmiao/database/altitude/entity/AltitudeRecordEntity.kt:30
`AuthCodeEntity`'s public constructor takes `id`, `codeHash`, `salt` 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `AuthCodeEntity` 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. — core/database/src/main/java/com/shifenmiao/database/authcode/entity/AuthCodeEntity.kt:38
`BlessingRecordEntity`'s public constructor takes `id`, `date`, `type` 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `BlessingRecordEntity` 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. — core/database/src/main/java/com/shifenmiao/database/blessing/entity/BlessingRecordEntity.kt:34
`BlessingTabConfigEntity`'s public constructor takes `date`, `type`, `title`, `subtitle` 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `BlessingTabConfigEntity` 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. — core/database/src/main/java/com/shifenmiao/database/blessing/entity/BlessingTabConfigEntity.kt:34
`BlessingWishEntity`'s public constructor takes `date`, `type`, `content` 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `BlessingWishEntity` 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. — core/database/src/main/java/com/shifenmiao/database/blessing/entity/BlessingWishEntity.kt:31
`BlogArticleEntity`'s public constructor takes `title`, `summary`, `content`, `authorName`, … 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `BlogArticleEntity` 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. — core/database/src/main/java/com/shifenmiao/database/blog/entity/BlogArticleEntity.kt:41
`BookkeepingCategoryEntity`'s public constructor takes `id`, `name`, `iconKey` 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `BookkeepingCategoryEntity` 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. — core/database/src/main/java/com/shifenmiao/database/bookkeeping/entity/BookkeepingCategoryEntity.kt:27
`BookkeepingRecordEntity`'s public constructor takes `id`, `categoryId`, `note` 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `BookkeepingRecordEntity` 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. — core/database/src/main/java/com/shifenmiao/database/bookkeeping/entity/BookkeepingRecordEntity.kt:45
`PromptEntity`'s public constructor takes `documentId`, `title`, `description`, `prompt`, … 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `PromptEntity` 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. — core/database/src/main/java/com/shifenmiao/database/chat_prompt/entity/PromptEntity.kt:42
`ChessGameEntity`'s public constructor takes `id`, `title`, `mode`, `redPlayerType`, … 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `ChessGameEntity` 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. — core/database/src/main/java/com/shifenmiao/database/chess/entity/ChessEntities.kt:28
`ChessPlyEntity`'s public constructor takes `id`, `gameId`, `moveUcci`, `moveCn`, … 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `ChessPlyEntity` 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. — core/database/src/main/java/com/shifenmiao/database/chess/entity/ChessEntities.kt:61
`ChessAiTaskEntity`'s public constructor takes `id`, `gameId`, `requestJson`, `status`, … 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `ChessAiTaskEntity` 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. — core/database/src/main/java/com/shifenmiao/database/chess/entity/ChessEntities.kt:85
`DataDraftEntity`'s public constructor takes `title`, `description`, `url`, `data`, … 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `DataDraftEntity` 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. — core/database/src/main/java/com/shifenmiao/database/data_draft/entity/DataDraftEntity.kt:43
`WheelEntity`'s public constructor takes `id`, `title` 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `WheelEntity` 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. — core/database/src/main/java/com/shifenmiao/database/decision_wheel/entity/WheelEntity.kt:30
`WheelOptionEntity`'s public constructor takes `id`, `wheelId`, `name`, `colorHex` 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `WheelOptionEntity` 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. — core/database/src/main/java/com/shifenmiao/database/decision_wheel/entity/WheelEntity.kt:46
`WheelHistoryEntity`'s public constructor takes `wheelId`, `wheelTitle`, `selectedOptionId`, `selectedOptionName` 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `WheelHistoryEntity` 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. — core/database/src/main/java/com/shifenmiao/database/decision_wheel/entity/WheelEntity.kt:64
`DocConvertTaskEntity`'s public constructor takes `taskId`, `fileName`, `sourcePath`, `status`, … 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `DocConvertTaskEntity` 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. — core/database/src/main/java/com/shifenmiao/database/docconvert/entity/DocConvertTaskEntity.kt:26
`GomokuGameEntity`'s public constructor takes `id`, `title`, `mode`, `redPlayerType`, … 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `GomokuGameEntity` 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. — core/database/src/main/java/com/shifenmiao/database/gomoku/entity/GomokuEntities.kt:28
`GomokuPlyEntity`'s public constructor takes `id`, `gameId`, `moveUcci`, `moveCn`, … 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `GomokuPlyEntity` 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. — core/database/src/main/java/com/shifenmiao/database/gomoku/entity/GomokuEntities.kt:61
`GomokuAiTaskEntity`'s public constructor takes `id`, `gameId`, `requestJson`, `status`, … 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `GomokuAiTaskEntity` 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. — core/database/src/main/java/com/shifenmiao/database/gomoku/entity/GomokuEntities.kt:84
`HabitCheckInEntity`'s public constructor takes `id`, `habitId` 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `HabitCheckInEntity` 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. — core/database/src/main/java/com/shifenmiao/database/habit/entity/HabitCheckInEntity.kt:44
`HabitEntity`'s public constructor takes `id`, `name`, `iconKey`, `repeatType`, … 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `HabitEntity` 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. — core/database/src/main/java/com/shifenmiao/database/habit/entity/HabitEntity.kt:29
`HouseholdItemEntity`'s public constructor takes `id`, `name`, `category`, `locationId`, … 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `HouseholdItemEntity` 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. — core/database/src/main/java/com/shifenmiao/database/household/entity/HouseholdItemEntity.kt:44
`HouseholdLocationEntity`'s public constructor takes `id`, `name`, `parentId`, `iconKey` 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `HouseholdLocationEntity` 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. — core/database/src/main/java/com/shifenmiao/database/household/entity/HouseholdLocationEntity.kt:43
`IdPhotoSizeEntity`'s public constructor takes `name`, `description` 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `IdPhotoSizeEntity` 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. — core/database/src/main/java/com/shifenmiao/database/idphoto/entity/IdPhotoSizeEntity.kt:29
`ImageEntity`'s public constructor takes `uri`, `format`, `base64Data`, `conversationId`, … 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `ImageEntity` 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. — core/database/src/main/java/com/shifenmiao/database/image/entity/ImageEntity.kt:44
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.
`Category.documentId` 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. — core/database/src/main/java/com/shifenmiao/database/item/entity/Category.kt:45
`ItemAgentLink.itemId` 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. — core/database/src/main/java/com/shifenmiao/database/item/entity/ItemAgentLink.kt:46
`ItemAgentLink.agentId` 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. — core/database/src/main/java/com/shifenmiao/database/item/entity/ItemAgentLink.kt:47
`ItemCategoryCrossRef.itemId` 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. — core/database/src/main/java/com/shifenmiao/database/item/entity/ItemCategoryCrossRef.kt:59
`ItemCategoryCrossRef.categoryId` 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. — core/database/src/main/java/com/shifenmiao/database/item/entity/ItemCategoryCrossRef.kt:60
`ItemDataLink.itemId` 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. — core/database/src/main/java/com/shifenmiao/database/item/entity/ItemDataLink.kt:42
`ItemDataLink.dataId` 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. — core/database/src/main/java/com/shifenmiao/database/item/entity/ItemDataLink.kt:43
`ItemPromptLink.itemId` 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. — core/database/src/main/java/com/shifenmiao/database/item/entity/ItemPromptLink.kt:43
`ItemPromptLink.promptId` 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. — core/database/src/main/java/com/shifenmiao/database/item/entity/ItemPromptLink.kt:44
`ItemUserState.itemId` 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. — core/database/src/main/java/com/shifenmiao/database/item/entity/ItemUserState.kt:55
`OnlineGameEvent.roomId` 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. (×2) — feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/OnlineGameSyncUseCase.kt:28, feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/OnlinePlayUseCase.kt:60
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.
`Category` 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. — core/database/src/main/java/com/shifenmiao/database/item/entity/Category.kt:40
`ItemAgentLink` 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. — core/database/src/main/java/com/shifenmiao/database/item/entity/ItemAgentLink.kt:45
`ItemCategoryCrossRef` 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. — core/database/src/main/java/com/shifenmiao/database/item/entity/ItemCategoryCrossRef.kt:58
`ItemDataLink` 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. — core/database/src/main/java/com/shifenmiao/database/item/entity/ItemDataLink.kt:41
`ItemPromptLink` 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. — core/database/src/main/java/com/shifenmiao/database/item/entity/ItemPromptLink.kt:42
`ItemUserState` 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. — core/database/src/main/java/com/shifenmiao/database/item/entity/ItemUserState.kt:53
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.
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 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 repository and its projects have a README, and whether it is substantive.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
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 repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.
Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.
Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.
Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.
Do you agree with this assessment?
P1 · CI/CD gates8.5 / 10Strong✓ Tool-verified
Readiness · Readiness — Whether an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
What to do
Run the test suite in CI via an explicit runner step (`./gradlew test` for the toolchain this pipeline already uses) and gate merges on it.
Do you agree with this assessment?
P2 · Observability6.2 / 10Adequate✓ Tool-verified
Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.
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 3 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner. — REDACTED:7
`REDACTED` schedules updates, but no `package-ecosystem` entry covers `npm`, which this tree depends on — so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entry to the `updates:` list. — REDACTED:6
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.
Dependabot is configured but does not watch `npm` — add that `package-ecosystem` entry to REDACTED so those dependencies get the same automatic update and advisory pressure as the ones it already covers.
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.
The release is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever the release trigger points at is published to users unreviewed, so a mistagged or unverified commit ships and the only remedy is a follow-up release. — REDACTED:433
What to do
Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.
Do you agree with this assessment?
P5 · DR & Backup4.0 / 10Weak✓ Tool-verified
Readiness · Readiness — Whether disaster recovery is planned and codified — backups, geo-recovery, RTO/RPO, persistence guarantees — from IaC + container manifests + docs, never the live cloud.
Method: Filesystem scan: disaster recovery, backup, geo-recovery, RTO/RPO, persistence guarantees from IaC, manifests, and docs. Exhaustive, deterministic, never a live environment.
What to do
Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).
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. (×4) — core/image-generation/src/overseas/java/com/shifenmiao/imagegeneration/di/OpenAiImageModule.kt:60, core/tts/src/main/java/com/shifenmiao/tts/di/TTSModule.kt:74, core/tts/src/main/java/com/shifenmiao/tts/di/TTSModule.kt:88, …
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.
A JMH/Jetpack Benchmark suite exists but nothing turns on its allocation measurement — allocations (the main way hot code pressures a garbage collector or allocator) aren't being measured.
What to do
Run JMH with the GC profiler (`-prof gc`, or addProfiler(GCProfiler.class)) so allocation rate regressions are visible, not just time.
Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.
Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from each language's code model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.
`playBeep` is async and calls Thread.sleep — a blocking call inside async code stalls the coroutine's thread, and every coroutine dispatched to it for as long as it runs. (×3) — feature/chess/src/main/java/com/wanbaohe/chess/data/AudioAdapter.kt:63, feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/AudioAdapter.kt:63, feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/AudioAdapter.kt:63
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).
Do you agree with this assessment?
R1 · Type Safety0.0 / 10Critical✓ Tool-verified
React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.
Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.
0 typed · 57 plain JS — the untyped files are web/build.js, web/code-editor/build.js, web/code-editor/editor.src.js, web/file_transfer/js/core/api.js, web/file_transfer/js/core/dom.js, web/file_transfer/js/core/i18n.js (+51 more).
What to do
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
React / JS · Code Health — The share of the scored frontend lines inside a near-exact copy-pasted block of substantial extent (the D4 clone algorithm over JS/TS tokens, D-386; each line once, 10 at none and 0 at a quarter of the lines, as D4): a block is reported only where its copies still agree on most of their own identifiers and literals, or were renamed as they were pasted but kept most of their constants, and where the copies carry enough code to stand on their own or the copied extent reaches 30 lines — so a re-implementation sharing neither names nor values, and a small pasted declaration, are both found and deliberately not reported, and a clean R10 is not a claim that nothing was copied.
Method: Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm run over JS/TS tokens). Masking finds the candidates; a block is reported when its copies still agree on most of their own identifiers and literals, or when a renamed copy still agrees on most of its constants, AND the copies carry enough code to stand on their own — or when the copied extent reaches 30 lines. So a re-implementation sharing neither names nor values, and a small pasted declaration, are deliberately not counted. Scored on the share of the scored frontend lines inside a reported copy, on the same curve as D4. Deterministic.
7 duplicated blocks under web/ have copies in at least two of the sibling directories code-editor, file_transfer, milkdown-editor — 6 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 7 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 7 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 7 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — web/code-editor/build.js:47
web/code-editor/editor.src.js:438 · web/code-editor/editor.src.js:474 — 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. — web/code-editor/editor.src.js:438
web/file_transfer/js/core/api.js:93 · web/file_transfer/js/features/chat/fileUpload.js:93 — the two spans are one implementation copied and then locally edited — 133 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — web/file_transfer/js/core/api.js:93
web/file_transfer/js/features/transfer/transfers.js:87 · web/file_transfer/js/features/upload/upload.js:381 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — web/file_transfer/js/features/transfer/transfers.js:87
web/code-editor/build.js:47 · web/milkdown-editor/build.js:57 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — web/code-editor/build.js:47
web/code-editor/editor.src.js:132 · web/milkdown-editor/editor.src.js:175 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — web/code-editor/editor.src.js:132
web/file_transfer/js/features/auth.js:22 · web/file_transfer/js/features/files/files.js:21 — the two spans are one implementation copied and then locally edited — 72 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — web/file_transfer/js/features/auth.js:22
web/milkdown-editor/editor.src.js:1909 · web/milkdown-editor/editor.src.js:1935 — 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. — web/milkdown-editor/editor.src.js:1909
web/code-editor/build.js:5 · web/milkdown-editor/build.js:5 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — web/code-editor/build.js:5
web/file_viewer/src/prose-doc.js:1729 · web/file_viewer/src/prose-rtf.js:489 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — web/file_viewer/src/prose-doc.js:1729
web/code-editor/editor.src.js:278 · web/milkdown-editor/editor.src.js:932 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — web/code-editor/editor.src.js:278
web/file_transfer/js/core/api.js:25 · web/file_transfer/js/core/api.js:66 — 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. — web/file_transfer/js/core/api.js:25
web/file_transfer/js/core/api.js:38 · web/file_transfer/js/core/api.js:49 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — web/file_transfer/js/core/api.js:38
web/file_transfer/js/features/files/ops.js:31 · web/file_transfer/js/features/files/ops.js:74 · web/file_transfer/js/features/files/ops.js:93 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — web/file_transfer/js/features/files/ops.js:31
web/file_transfer/js/features/upload/upload.js:551 · web/file_transfer/js/features/upload/upload.js:622 — the two spans are one implementation copied and then locally edited — 64 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — web/file_transfer/js/features/upload/upload.js:551
web/file_viewer/src/prose-doc.js:452 · web/file_viewer/src/prose-doc.js:462 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — web/file_viewer/src/prose-doc.js:452
web/file_viewer/src/prose-doc.js:1693 · web/file_viewer/src/prose-rtf.js:451 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — web/file_viewer/src/prose-doc.js:1693
web/milkdown-editor/editor.src.js:1496 · web/milkdown-editor/editor.src.js:1577 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — web/milkdown-editor/editor.src.js:1496
web/code-editor/editor.src.js:498 · web/code-editor/editor.src.js:620 · web/milkdown-editor/editor.src.js:1318 — the 3 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — web/code-editor/editor.src.js:498
web/file_transfer/js/features/files/render.js:101 · web/file_transfer/js/features/files/render.js:151 — the two spans are one implementation copied and then locally edited — 65 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — web/file_transfer/js/features/files/render.js:101
REDACTED:660 · REDACTED:697 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:660
web/file_viewer/src/prose-doc.js:1745 · web/file_viewer/src/prose-rtf.js:505 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — web/file_viewer/src/prose-doc.js:1745
web/code-editor/editor.src.js:268 · web/milkdown-editor/editor.src.js:916 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — web/code-editor/editor.src.js:268
web/file_viewer/src/docx.js:137 · web/file_viewer/src/prose-draw.js:123 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — web/file_viewer/src/docx.js:137
REDACTED:87 · REDACTED:162 — 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. — REDACTED:87
REDACTED:187 · REDACTED:239 · REDACTED:380 · REDACTED:413 — 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. — REDACTED:187
web/file_viewer/src/prose-doc.js:1135 · web/file_viewer/src/prose-doc.js:1187 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — web/file_viewer/src/prose-doc.js:1135
web/file_viewer/src/prose-doc.js:1454 · web/file_viewer/src/prose-odt.js:582 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — web/file_viewer/src/prose-doc.js:1454
web/file_viewer/src/prose-doc.js:1898 · web/file_viewer/src/prose-odt.js:918 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — web/file_viewer/src/prose-doc.js:1898
web/file_viewer/src/prose-odt.js:228 · web/file_viewer/src/prose-odt.js:263 · web/file_viewer/src/prose-odt.js:282 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — web/file_viewer/src/prose-odt.js:228
web/file_viewer/src/prose-odt.js:252 · web/file_viewer/src/prose-odt.js:270 — 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. — web/file_viewer/src/prose-odt.js:252
web/file_viewer/src/prose-odt.js:587 · web/file_viewer/src/prose-rtf.js:330 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — web/file_viewer/src/prose-odt.js:587
web/milkdown-editor/editor.src.js:475 · web/milkdown-editor/editor.src.js:487 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — web/milkdown-editor/editor.src.js:475
web/file_viewer/src/docx-night.js:122 · web/file_viewer/src/docx-night.js:133 — the two spans are one implementation copied and then locally edited — 51 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — web/file_viewer/src/docx-night.js:122
What to do
Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.
React / JS · Code Health — Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) — real branching, not a regex heuristic.
Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.
rtfWord has cyclomatic complexity 149 and cognitive complexity 58; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — web/file_viewer/src/prose-rtf.js:629
docApplyTap has cyclomatic complexity 85 and cognitive complexity 152; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — web/file_viewer/src/prose-doc.js:387
rewrite has cyclomatic complexity 81 and cognitive complexity 145; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:1417
vwReadRtf has cyclomatic complexity 74 and cognitive complexity 145; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — web/file_viewer/src/prose-rtf.js:1027
odtReadStyle has cyclomatic complexity 65 and cognitive complexity 116; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — web/file_viewer/src/prose-odt.js:164
docDrawTable has cyclomatic complexity 63 and cognitive complexity 141; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — web/file_viewer/src/prose-doc.js:1682
docDrawParagraph has cyclomatic complexity 55 and cognitive complexity 121; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — web/file_viewer/src/prose-doc.js:1445
docApplyPap has cyclomatic complexity 45 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — web/file_viewer/src/prose-doc.js:339
vwProseDeclare has cyclomatic complexity 44 and cognitive complexity 55; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — web/file_viewer/src/prose-draw.js:168
rtfBuildTable has cyclomatic complexity 41 and cognitive complexity 97; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — web/file_viewer/src/prose-rtf.js:431
readPackage has cyclomatic complexity 37 and cognitive complexity 45; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:527
docApplyChp has cyclomatic complexity 37 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — web/file_viewer/src/prose-doc.js:297
executeAction has cyclomatic complexity 34 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — web/milkdown-editor/editor.src.js:1341
docStyles has cyclomatic complexity 30 and cognitive complexity 42; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — web/file_viewer/src/prose-doc.js:785
(anonymous) has cyclomatic complexity 30 and cognitive complexity 36; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — web/file_viewer/src/docx-pages.js:306
docCompound has cyclomatic complexity 29 and cognitive complexity 35; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — web/file_viewer/src/prose-doc.js:67
odtLabel has cyclomatic complexity 28 and cognitive complexity 49; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — web/file_viewer/src/prose-odt.js:421
docPieces has cyclomatic complexity 27 and cognitive complexity 59; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — web/file_viewer/src/prose-doc.js:581
docDrawStory has cyclomatic complexity 25 and cognitive complexity 41; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — web/file_viewer/src/prose-doc.js:1622
docBlip has cyclomatic complexity 24 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — web/file_viewer/src/prose-doc.js:1074
docLists has cyclomatic complexity 23 and cognitive complexity 35; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — web/file_viewer/src/prose-doc.js:917
vwFormatJson has cyclomatic complexity 22 and cognitive complexity 32; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — web/file_viewer/src/app.js:471
odtInlineNode has cyclomatic complexity 22 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — web/file_viewer/src/prose-odt.js:838
rtfClosePara has cyclomatic complexity 22 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — web/file_viewer/src/prose-rtf.js:293
disarm has cyclomatic complexity 21 and cognitive complexity 30; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:802
tokens has cyclomatic complexity 21 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:1277
docChpBag has cyclomatic complexity 21 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — web/file_viewer/src/prose-doc.js:1399
rtfCharBag has cyclomatic complexity 21 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — web/file_viewer/src/prose-rtf.js:173
walk has cyclomatic complexity 20 and cognitive complexity 34; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — web/file_viewer/src/find.js:118
renderShape has cyclomatic complexity 20 and cognitive complexity 21; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — web/file_viewer/src/odp.js:225
vwNumberPages has cyclomatic complexity 19 and cognitive complexity 35; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — web/file_viewer/src/docx-pages.js:480
styleTheDesignGives has cyclomatic complexity 19 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:236
rtfTextOut has cyclomatic complexity 19 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — web/file_viewer/src/prose-rtf.js:973
docParagraph has cyclomatic complexity 19 and cognitive complexity 21; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — web/file_viewer/src/prose-doc.js:1285
linesLeftWhole has cyclomatic complexity 19 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:377
normalize has cyclomatic complexity 19 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — web/file_transfer/js/core/i18n.js:14
docPapBag has cyclomatic complexity 19 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — web/file_viewer/src/prose-doc.js:1419
docLabel has cyclomatic complexity 18 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — web/file_viewer/src/prose-doc.js:1019
addTransferItem has cyclomatic complexity 18 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — web/file_transfer/js/features/transfer/transfers.js:104
odtBag has cyclomatic complexity 18 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — web/file_viewer/src/prose-odt.js:307
Do you agree with this assessment?
R3 · Large Files1.6 / 10Critical✓ Tool-verified
React / JS · Code Health — How many source files exceed the large-file threshold.
Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.
REDACTED has 2644 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
web/file_viewer/src/prose-doc.js has 1808 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/file_viewer/src/prose-doc.js:1
web/milkdown-editor/editor.src.js has 1752 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/milkdown-editor/editor.src.js:1
web/file_viewer/src/prose-rtf.js has 1097 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/file_viewer/src/prose-rtf.js:1
web/file_viewer/src/prose-odt.js has 1013 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/file_viewer/src/prose-odt.js:1
web/code-editor/editor.src.js has 701 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/code-editor/editor.src.js:1
web/file_transfer/js/features/upload/upload.js has 586 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/file_transfer/js/features/upload/upload.js:1
REDACTED has 582 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
web/file_viewer/src/docx-pages.js has 564 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/file_viewer/src/docx-pages.js:1
web/file_viewer/src/app.js has 525 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/file_viewer/src/app.js:1
web/file_viewer/src/find.js has 433 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/file_viewer/src/find.js:1
web/file_viewer/src/prose-draw.js has 401 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/file_viewer/src/prose-draw.js:1
What to do
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
Do you agree with this assessment?
R6 · Tooling0.0 / 10Critical✓ Tool-verified
React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each package.json script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.
Method: package.json scanned for test/lint/typecheck script wiring. Deterministic presence check.
test ✗ · lint ✗ · typecheck ✗ — read from this repository's package.json scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.
What to do
Add a test runner (vitest / jest / playwright) and eslint and type checking (adopt TypeScript, or type-check the existing JavaScript with `checkJs`) as package.json scripts and run them in CI.
Do you agree with this assessment?
R7 · Dead Code9.9 / 10Exemplary✓ Tool-verified
React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).
Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.
This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it. (×3) — web/milkdown-editor/editor.src.js:1065, web/milkdown-editor/editor.src.js:1706, web/milkdown-editor/editor.src.js:1728
What to do
Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.
Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.
Imported but not declared in any reachable package.json — installs work only by hoisting accident. (×2) — web/build.js:223, web/code-editor/editor.src.js:33
Declared in web/code-editor/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. — web/code-editor/package.json:11
Declared in web/milkdown-editor/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. — web/milkdown-editor/package.json:22
What to do
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.
Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.
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 · 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 document1.8 / 10Critical✓ 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.
`SchemaToIrMapper.mapNode` is public and takes `node: JsonObject` from its caller, and it calls itself at line 100 with a piece of `node` — the function is not `tailrec`, so every call is a real frame — and nowhere in `SchemaToIrMapper.mapNode` 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 `SchemaToIrMapper.mapNode` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack or a `DeepRecursiveFunction`. — core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/parser/SchemaToIrMapper.kt:100
`SchemaToIrMapper.mapAction` is public and takes `action: JsonObject` from its caller, and it calls itself at line 156 with a piece of `action` (and at line 157, line 158) — the function is not `tailrec`, so every call is a real frame — and nowhere in `SchemaToIrMapper.mapAction` 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 `SchemaToIrMapper.mapAction` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack or a `DeepRecursiveFunction`. — core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/parser/SchemaToIrMapper.kt:156
`SchemaToIrMapper.mapNode` is public, takes a document from its caller (line 68) and hands it to `SchemaToIrMapper.jsonElementToPropValue`, which calls itself at line 188 with a piece of `el` (and at line 193) — the function is not `tailrec`, so every call is a real frame — and nowhere in `SchemaToIrMapper.jsonElementToPropValue` 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 `SchemaToIrMapper.jsonElementToPropValue` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack or a `DeepRecursiveFunction`. — core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/parser/SchemaToIrMapper.kt:188
`SchemaToIrMapper.map` is public, takes a document from its caller (line 57) and hands it to `SchemaToIrMapper.jsonElementToAny`, which calls itself at line 205 with a piece of `el` (and at line 206) — the function is not `tailrec`, so every call is a real frame — and nowhere in `SchemaToIrMapper.jsonElementToAny` 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 `SchemaToIrMapper.jsonElementToAny` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack or a `DeepRecursiveFunction`. — core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/parser/SchemaToIrMapper.kt:205
`MapUtils.flattenParams` is public, takes a document from its caller (line 48) and hands it to `MapUtils.flatten`, which calls itself at line 62 with a piece of `params` — the function is not `tailrec`, so every call is a real frame — and nowhere in `MapUtils.flatten` 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 `MapUtils.flatten` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack or a `DeepRecursiveFunction`. — core/base/src/main/java/com/shifenmiao/base/utils/MapUtils.kt:62
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.
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 functions that make a cancellable request accept or pass on an AbortSignal or 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/18 functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http; Ktor, OkHttp newCall, URL streams) accept an AbortSignal or the coroutine's cancellation or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, a cancelled request, a shutdown, an expired deadline. Take a `signal` () and hand it to the request; in a Kotlin 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.
`listFiles` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — web/file_transfer/js/core/api.js:17
`auth` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — web/file_transfer/js/core/api.js:25
`deviceInfo` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — web/file_transfer/js/core/api.js:36
`mkdir` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — web/file_transfer/js/core/api.js:44
`rename` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — web/file_transfer/js/core/api.js:55
`deletePaths` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — web/file_transfer/js/core/api.js:66
`downloadProbe` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — web/file_transfer/js/core/api.js:77
`chatHistory` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — web/file_transfer/js/core/api.js:138
`load` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — web/file_transfer/js/core/i18n.js:69
`downloadZip` suspends, but makes its request with `URL(…).openConnection()`, 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`. — feature/on-device-ocr/src/main/java/com/wanbaohe/ocr/data/OcrModelStore.kt:77
`load` 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`. — core/network/src/main/java/com/shifenmiao/network/service/CloudflareNetworkInfoService.kt:55
`request` 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`. — core/network/src/main/java/com/shifenmiao/network/service/HttpRequestService.kt:87
`check` 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`. — core/network/src/main/java/com/shifenmiao/network/service/UrlCheckService.kt:71
`downloadHtml` 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`. — core/network/src/main/java/com/shifenmiao/network/downloader/OkHttpHtmlDownloader.kt:42
`handle` 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`. — core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/action/handlers/BuiltinHandlers.kt:177
`downloadResources` suspends, but makes its request with `URL(…).openConnection()`, 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`. — core/data/src/main/java/com/t8rin/imagetoolbox/core/data/remote/AndroidRemoteResourcesStore.kt:82
`getResourceLinks` suspends, but makes its request with `URL(…).openConnection()`, 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`. — core/data/src/main/java/com/t8rin/imagetoolbox/core/data/remote/AndroidRemoteResourcesStore.kt:242
`getCachedFile` suspends, but makes its request with `URL(…).openStream()`, 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`. — core/base/src/main/java/com/shifenmiao/base/audio/NetworkAudioPlayer.kt:300
What to do
Thread an AbortSignal or the coroutine's cancellation through functions that make requests, so the work stops when its caller gives up.
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 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.
`catch (e)` 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, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included. (×3) — web/file_viewer/src/docx-night.js:88, REDACTED:1827, REDACTED:1980
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. (×29) — web/file_viewer/src/docx-night.js:175, REDACTED:429, REDACTED:430, …
`.catch(function(){})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it. — REDACTED:474
`.then(…, function(){})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it. — REDACTED:2648
`.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it. — web/file_transfer/js/features/chat/fileUpload.js:59
`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. (×3) — libs/markdown/src/upstream/java/com/hrm/markdown/renderer/inline/InlineRenderUtils.kt:93, libs/markdown/src/upstream/java/com/hrm/markdown/renderer/inline/InlineRenderUtils.kt:100, libs/markdown/src/upstream/java/com/hrm/markdown/renderer/inline/InlineRenderUtils.kt:109
`catch (_: 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. — feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/HeuristicMoveFallback.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. — feature/webview/src/main/java/com/shifenmiao/webview/utils/Utils.kt:51
What to do
Swallowed exception (caught, then discarded)
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 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?
WCAG coverage — what static analysis assessed
Statically assessed 15 of 55 WCAG 2.2 Level A/AA success criteria (27%; ≈30% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 40 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).
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 — 4 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.
SC1 Supply-chain hygiene — 3 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X10 Duplicated predicate — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X6 Hand-rolled structured-format parsing — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not included — 49 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.
AX1 Captive dependencies — Not applicable: Dagger rejects, at compile time, a component that holds a binding with a narrower scope than its own.
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
AXB1 Runtime evidence locked — no reproducible boot — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
C1 Data Protection — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a Room, JPA or MongoDB entity, an Exposed or Ktorm table, or in a SQL CREATE TABLE or ALTER TABLE — and no database or data-store client (Room, Exposed, SQLDelight, Realm, JPA, JDBC, MongoDB, Firebase, …) imported either, so this repository keeps no data at rest for these controls to protect.
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.
C3 Audit Trail — No personal data detected in a persisted data model — no PII-named column (email, first_name, date_of_birth, phone_number, …) or stored credential on a Room, JPA or MongoDB entity, an Exposed or Ktorm table, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store client (Room, Exposed, SQLDelight, Realm, JPA, JDBC, MongoDB, Firebase, …) imported either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a store configured outside this repository, for instance), the trail belongs to wherever that data is stored.
C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a Room, JPA or MongoDB entity, an Exposed or Ktorm table, or in a SQL CREATE TABLE or ALTER TABLE — and no database or data-store client (Room, Exposed, SQLDelight, Realm, JPA, JDBC, MongoDB, Firebase, …) imported either, so this repository keeps no personal data whose lifetime a retention limit would bound.
C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a Room, JPA or MongoDB entity, an Exposed or Ktorm table, or in a SQL CREATE TABLE or ALTER TABLE — and no database or data-store client (Room, Exposed, SQLDelight, Realm, JPA, JDBC, MongoDB, Firebase, …) imported either, so this repository keeps no personal data for a data subject to erase, export or consent over.
D10 Test Quality — ~8015 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 — Test reliability not included — the .kt suite was found but not re-run
D12 Dependency Hygiene — Not scored — 158 Maven/Gradle manifest(s) were read, stating a version for 195 dependency(ies) and leaving 2 to a parent or an imported BOM, but no build resolved the dependency graph, so the outdated signal was not established. NOT a finding that these dependencies are current or healthy.
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.
D20 ADR Quality — N/A — ADRs are expected on deployable products with a user-facing host, not consumed libraries; no ADR log is required here.
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+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D25 ADR Conformance — no ADRs to check
D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
D32 Data Compliance (PII/GDPR) — 253 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
D8 Code Coverage — Coverage not included — suite not readable by the collector
DM3 Integration-event coupling — no integration events detected — coupling check not applicable
DM7 Repository granularity — no repository abstraction detected (e.g. uses a document session)
DM8 Value-object opportunities — not scored — the deterministic rule found 0 candidate clump(s); its rows are withheld until it has a measured precision of 95 % (a sample of fewer than 10 rows cannot show one)
ED1 Event-Driven — not scored — this repository shows only 1 of the 3 signals this lens looks for (2 event handler(s))
ED5 Idempotency — Not assessed, and this one is on us: 2 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, Scala, Rust and Java, 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 — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
R4 Test Coverage — the JS/TS workspace (57 production file(s)) has no JavaScript/TypeScript test, but it is 2.45% of this repository's production source and the other 97.55% carries 8,015 line(s) of test code this pass cannot read — an incidental frontend's reachability is not the repository's test posture, so it is not scored as one
R5 Dependency Freshness — no package-lock.json — dependency freshness not measured (would require an npm lockfile); JS/npm CVEs are scored in D30 (Dependency Vulnerabilities), which answers every ecosystem
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.
X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X20 Mistyped argument guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X24 Document value interpolated into markup unescaped — X24 reached only 1% of this repository's production lines — kotlin (1,262,008 lines), cpp (6 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X4 Structured logging — This check asks whether log calls keep a message's values apart from its text, which needs a logger that can carry them as fields. This repository's Kotlin was read, and it logs through none that an assembled message defeats: Android's `Log` and Timber, java.util.logging and log4j-api-kotlin take one finished message (as log4net does in C#), or it makes no call through a named logger at all. Calls made through SLF4J, log4j 2 or kotlin-logging (`LoggerFactory.getLogger`, `KotlinLogging.logger {}`) would be judged.
X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
<html> without a lang web/file_viewer/src/docx.html:2— The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
<html> without a lang web/file_viewer/src/epub.html:2— The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
<html> without a lang web/file_viewer/src/imgweb.html:2— The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
<html> without a lang web/file_viewer/src/md.html:2— The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
<html> without a lang web/file_viewer/src/odp.html:2— The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
<html> without a lang web/file_viewer/src/ppt.html:2— The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
<html> without a lang web/file_viewer/src/pptx.html:2— The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
<html> without a lang web/file_viewer/src/prose.html:2— The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
<html> without a lang web/file_viewer/src/text.html:2— The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
<html> without a lang web/file_viewer/src/unsupported.html:2— The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
<html> without a lang web/file_viewer/src/xlsx.html:2— The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
AC2 · Forms & labels· <input> without a programmatic label · ×4
<input> without a programmatic label web/milkdown-editor/index.html:738— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
<input> without a programmatic label web/milkdown-editor/index.html:739— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
<input> without a programmatic label web/milkdown-editor/index.html:751— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
<input> without a programmatic label web/milkdown-editor/index.html:752— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
AC2 · Forms & labels· <button> with no accessible text · ×3
<button> with no accessible text web/file_transfer/index.html:211— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
<button> with no accessible text web/file_transfer/js/features/files/render.js:124— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
<button> with no accessible text web/file_transfer/js/features/files/render.js:184— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
AC4 · Keyboard semantics· Click handler on a non-interactive <span> · ×3
Click handler on a non-interactive <span> web/file_transfer/index.html:219— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
Click handler on a non-interactive <span> web/file_transfer/js/features/files/navigation.js:13— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
Click handler on a non-interactive <span> web/file_transfer/js/features/files/navigation.js:24— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
AC2 · Forms & labels· <label> that labels no control · ×2
<label> that labels no control feature/lifetime/protype/_1/code.html:121— This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control feature/lifetime/protype/_1/code.html:142— This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
AC1 · Text alternatives· <img> without a text alternative · ×1
<img> without a text alternative web/file_transfer/js/features/files/interactions.js:79— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
Viewport restricts zoom web/milkdown-editor/index.html:5— user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta.
Unlisted import '@codemirror/autocomplete' web/code-editor/editor.src.js:33— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
MethodTooLong: ChildProvider.createChild feature/app/src/main/java/com/t8rin/imagetoolbox/feature/root/presentation/components/navigation/ChildProvider.kt:215— MethodTooLong — createChild runs 964 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 864 over it, 9.64× 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: TextCardEditorScreenKt.TextCardEditorScreen feature/text-card/src/main/java/com/wanbaohe/textcard/presentation/editor/TextCardEditorScreen.kt:117— MethodTooLong — TextCardEditorScreen runs 543 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 443 over it, 5.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: LineIconsPreviewKt.LineIconsPreview core/resources/src/main/java/com/t8rin/imagetoolbox/core/resources/icons/line/LineIconsPreview.kt:52— MethodTooLong — LineIconsPreview runs 510 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 410 over it, 5.10× 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: AIEngineSettingsDetailScreenKt.AIEngineSettingsDetailScreen feature/settings/src/main/java/com/wanbaohe/setting/ai/screen/AIEngineSettingsDetailScreen.kt:125— MethodTooLong — AIEngineSettingsDetailScreen runs 471 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 371 over it, 4.71× 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: CloudStorageScreenKt.CloudStorageScreen feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/screen/CloudStorageScreen.kt:125— MethodTooLong — CloudStorageScreen runs 467 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 367 over it, 4.67× 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: ChatScreenKt.ChatScreen feature/dsh-client/src/main/java/com/wanbaohe/dsh/screen/ChatScreen.kt:153— MethodTooLong — ChatScreen runs 407 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 307 over it, 4.07× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: BoardGameGifExportDialogKt.BoardGameGifExportDialog feature/boardgame/src/main/java/com/wanbaohe/boardgame/export/BoardGameGifExportDialog.kt:124— MethodTooLong — BoardGameGifExportDialog runs 396 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 296 over it, 3.96× 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: EditorScaffoldKt.EditorScaffold feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/editor/EditorScaffold.kt:213— MethodTooLong — EditorScaffold runs 387 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 287 over it, 3.87× 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: MarqueeScreenKt.MarqueeScreen feature/marquee/src/main/java/com/shifenmiao/marquee/screen/MarqueeScreen.kt:83— MethodTooLong — MarqueeScreen runs 381 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 281 over it, 3.81× 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: CollageMakerContentKt.CollageMakerContent feature/collage-maker/src/main/java/com/t8rin/imagetoolbox/collage_maker/presentation/CollageMakerContent.kt:139— MethodTooLong — CollageMakerContent runs 377 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 277 over it, 3.77× 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: AppDatabase.itemDataDao core/database/src/main/java/com/shifenmiao/database/AppDatabase.kt:150— MethodTooLong — itemDataDao runs 363 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 263 over it, 3.63× 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: AppDatabase.messageDao core/database/src/main/java/com/shifenmiao/database/AppDatabase.kt:152— MethodTooLong — messageDao runs 362 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 262 over it, 3.62× 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: AppDatabase.conversationDao core/database/src/main/java/com/shifenmiao/database/AppDatabase.kt:154— MethodTooLong — conversationDao runs 361 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 261 over it, 3.61× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: AppDatabase.agentDao core/database/src/main/java/com/shifenmiao/database/AppDatabase.kt:156— MethodTooLong — agentDao runs 360 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 260 over it, 3.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: AppDatabase.chatPromptDao core/database/src/main/java/com/shifenmiao/database/AppDatabase.kt:158— MethodTooLong — chatPromptDao runs 359 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 259 over it, 3.59× 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: AppDatabase.categoryDao core/database/src/main/java/com/shifenmiao/database/AppDatabase.kt:160— MethodTooLong — categoryDao runs 358 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 258 over it, 3.58× 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: AppDatabase.activityLogDao core/database/src/main/java/com/shifenmiao/database/AppDatabase.kt:162— MethodTooLong — activityLogDao runs 357 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 257 over it, 3.57× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: AppDatabase.toolCallTaskDao core/database/src/main/java/com/shifenmiao/database/AppDatabase.kt:164— MethodTooLong — toolCallTaskDao runs 356 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 256 over it, 3.56× 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: FileBrowserScreenKt.FileBrowserScreen feature/file-browser/src/main/java/com/wanbaohe/file/browser/screen/FileBrowserScreen.kt:149— MethodTooLong — FileBrowserScreen runs 356 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 256 over it, 3.56× 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: AppDatabase.themePresetDao core/database/src/main/java/com/shifenmiao/database/AppDatabase.kt:166— MethodTooLong — themePresetDao runs 355 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 255 over it, 3.55× 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: AppDatabase.toolCatalogDao core/database/src/main/java/com/shifenmiao/database/AppDatabase.kt:168— MethodTooLong — toolCatalogDao runs 354 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 254 over it, 3.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: AppDatabase.conversationToolPolicyDao core/database/src/main/java/com/shifenmiao/database/AppDatabase.kt:170— MethodTooLong — conversationToolPolicyDao runs 353 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 253 over it, 3.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: AppDatabase.toolBindingDao core/database/src/main/java/com/shifenmiao/database/AppDatabase.kt:172— MethodTooLong — toolBindingDao runs 352 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 252 over it, 3.52× 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: AppDatabase.ttsAudioEntryDao core/database/src/main/java/com/shifenmiao/database/AppDatabase.kt:174— MethodTooLong — ttsAudioEntryDao runs 351 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 251 over it, 3.51× 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: AppDatabase.passwordVaultEntryDao core/database/src/main/java/com/shifenmiao/database/AppDatabase.kt:176— MethodTooLong — passwordVaultEntryDao runs 350 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 250 over it, 3.50× 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.
FileTooLong: screenLogic/MarkupLayersComponent.kt feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/screenLogic/MarkupLayersComponent.kt— FileTooLong — 1976 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: MarkupLayersComponent (153-2837). The bar is 500 significant lines; this is 1476 over it, 3.95× 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: icons/CoinFrontLi.kt feature/iching-divination/src/main/java/com/wanbaohe/iching/ui/icons/CoinFrontLi.kt— FileTooLong — 1970 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: CoinFrontLi (31-2307). The bar is 500 significant lines; this is 1470 over it, 3.94× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: navigation/Screen.kt core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/navigation/Screen.kt— FileTooLong — 1920 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: Screen (83-2522). The bar is 500 significant lines; this is 1420 over it, 3.84× 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: share/CalendarShareCardRenderer.kt feature/calendar/src/main/java/com/wanbaohe/calendar/share/CalendarShareCardRenderer.kt— FileTooLong — 1792 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1292 over it, 3.58× 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: frames/ThreeFrameImage.kt libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt— FileTooLong — 1536 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1036 over it, 3.07× 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: screen/AIDuelChatScreen.kt feature/ai/src/main/java/com/shifenmiao/ai/screen/AIDuelChatScreen.kt— FileTooLong — 1529 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1029 over it, 3.06× 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: line/LineBlurLinear.kt core/resources/src/main/java/com/t8rin/imagetoolbox/core/resources/icons/line/LineBlurLinear.kt— FileTooLong — 1489 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: Icons (36-1581). The bar is 500 significant lines; this is 989 over it, 2.98× 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: frames/FiveFrameImage.kt libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt— FileTooLong — 1484 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 984 over it, 2.97× 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: ui/CalendarTab.kt feature/calendar/src/main/java/com/wanbaohe/calendar/ui/CalendarTab.kt— FileTooLong — 1461 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 961 over it, 2.92× 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: icons/Ic1204.kt core/weather/src/main/java/com/weather/icons/Ic1204.kt— FileTooLong — 1413 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: QWeatherIcons (28-1868). The bar is 500 significant lines; this is 913 over it, 2.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: editor/EditorScaffold.kt feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/editor/EditorScaffold.kt— FileTooLong — 1381 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 881 over it, 2.76× 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/AIDuelChatComponent.kt feature/ai/src/main/java/com/shifenmiao/ai/component/AIDuelChatComponent.kt— FileTooLong — 1186 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: AIDuelChatComponent (106-1707). The bar is 500 significant lines; this is 686 over it, 2.37× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: screen/ThemeSettingsScreen.kt feature/settings/src/main/java/com/wanbaohe/setting/theme/screen/ThemeSettingsScreen.kt— FileTooLong — 1182 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 682 over it, 2.36× 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: screen/AIEngineSettingsDetailScreen.kt feature/settings/src/main/java/com/wanbaohe/setting/ai/screen/AIEngineSettingsDetailScreen.kt— FileTooLong — 1174 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 674 over it, 2.35× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: navigation/ChildProvider.kt feature/app/src/main/java/com/t8rin/imagetoolbox/feature/root/presentation/components/navigation/ChildProvider.kt— FileTooLong — 1158 significant lines (blank, comment-only and punctuation-only lines excluded), about 84% of them inside a single declaration: ChildProvider (202-1717). The bar is 500 significant lines; this is 658 over it, 2.32× 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: navigation/NavigationChild.kt feature/app/src/main/java/com/t8rin/imagetoolbox/feature/root/presentation/components/navigation/NavigationChild.kt— FileTooLong — 1144 significant lines (blank, comment-only and punctuation-only lines excluded), about 76% of them inside a single declaration: NavigationChild (298-1597). The bar is 500 significant lines; this is 644 over it, 2.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: icons/Ic2213.kt core/weather/src/main/java/com/weather/icons/Ic2213.kt— FileTooLong — 1105 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: QWeatherIcons (28-1521). The bar is 500 significant lines; this is 605 over it, 2.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: screen/ChatScreen.kt feature/dsh-client/src/main/java/com/wanbaohe/dsh/screen/ChatScreen.kt— FileTooLong — 1086 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 586 over it, 2.17× 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: components/MaterialComponents.kt core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt— FileTooLong — 1070 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 570 over it, 2.14× 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: navigation/AppNavigationRegistry.kt feature/common/src/main/java/com/shifenmiao/common/handle/navigation/AppNavigationRegistry.kt— FileTooLong — 1054 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 554 over it, 2.11× 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: screen/UnitConverterScreen.kt feature/unit-converter/src/main/java/com/wanbaohe/unitconverter/screen/UnitConverterScreen.kt— FileTooLong — 1054 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 554 over it, 2.11× 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: viewModel/LoginComponent.kt feature/login/src/main/java/com/shifenmiao/login/viewModel/LoginComponent.kt— FileTooLong — 1034 significant lines (blank, comment-only and punctuation-only lines excluded), about 89% of them inside a single declaration: LoginComponent (168-1762). The bar is 500 significant lines; this is 534 over it, 2.07× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: line/LineAsciiArt.kt core/resources/src/main/java/com/t8rin/imagetoolbox/core/resources/icons/line/LineAsciiArt.kt— FileTooLong — 1009 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: Icons (36-1193). The bar is 500 significant lines; this is 509 over it, 2.02× 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: line/LineBlurOn.kt core/resources/src/main/java/com/t8rin/imagetoolbox/core/resources/icons/line/LineBlurOn.kt— FileTooLong — 1003 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: Icons (36-1032). The bar is 500 significant lines; this is 503 over it, 2.01× 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: service/AgentFileServiceImpl.kt feature/ai/src/main/java/com/shifenmiao/ai/service/AgentFileServiceImpl.kt— FileTooLong — 992 significant lines (blank, comment-only and punctuation-only lines excluded), about 94% of them inside a single declaration: AgentFileServiceImpl (84-1333). The bar is 500 significant lines; this is 492 over it, 1.98× 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.
Hotspot: feature/app/src/main/java/com/t8rin/imagetoolbox/feature/root/presentation/components/navigation/ChildProvider.kt feature/app/src/main/java/com/t8rin/imagetoolbox/feature/root/presentation/components/navigation/ChildProvider.kt:215— feature/app/src/main/java/com/t8rin/imagetoolbox/feature/root/presentation/components/navigation/ChildProvider.kt changed 49 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 179 in ChildProvider.createChild at line 215. 3 of those changes were fix/bug commits, and the other 46 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 20:11:02 +08:00' --until='2026-11-16 20:11:02 +08:00' --full-history --no-merges -- feature/app/src/main/java/com/t8rin/imagetoolbox/feature/root/presentation/components/navigation/ChildProvider.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: feature/text-card/src/main/java/com/wanbaohe/textcard/presentation/editor/TextCardEditorScreen.kt feature/text-card/src/main/java/com/wanbaohe/textcard/presentation/editor/TextCardEditorScreen.kt:117— feature/text-card/src/main/java/com/wanbaohe/textcard/presentation/editor/TextCardEditorScreen.kt changed 27 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 70 in TextCardEditorScreenKt.TextCardEditorScreen at line 117. 2 of those changes were fix/bug commits, and the other 25 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 20:11:02 +08:00' --until='2026-11-16 20:11:02 +08:00' --full-history --no-merges -- feature/text-card/src/main/java/com/wanbaohe/textcard/presentation/editor/TextCardEditorScreen.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: feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/editor/EditorScaffold.kt feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/editor/EditorScaffold.kt:213— feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/editor/EditorScaffold.kt changed 33 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 53 in EditorScaffoldKt.EditorScaffold at line 213. 3 of those changes were fix/bug commits, and the other 30 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 20:11:02 +08:00' --until='2026-11-16 20:11:02 +08:00' --full-history --no-merges -- feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/editor/EditorScaffold.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: feature/settings/src/main/java/com/wanbaohe/setting/ai/screen/AIEngineSettingsDetailScreen.kt feature/settings/src/main/java/com/wanbaohe/setting/ai/screen/AIEngineSettingsDetailScreen.kt:125— feature/settings/src/main/java/com/wanbaohe/setting/ai/screen/AIEngineSettingsDetailScreen.kt changed 28 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 52 in AIEngineSettingsDetailScreenKt.AIEngineSettingsDetailScreen at line 125. 1 of those changes was a fix/bug commit, and the other 27 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 20:11:02 +08:00' --until='2026-11-16 20:11:02 +08:00' --full-history --no-merges -- feature/settings/src/main/java/com/wanbaohe/setting/ai/screen/AIEngineSettingsDetailScreen.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: core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/navigation/ScreenUtils.kt core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/navigation/ScreenUtils.kt:632— core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/navigation/ScreenUtils.kt changed 35 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in ScreenConstantsImpl.valueOf at line 632. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 20:11:02 +08:00' --until='2026-11-16 20:11:02 +08:00' --full-history --no-merges -- core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/navigation/ScreenUtils.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: feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/screen/CloudStorageScreen.kt feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/screen/CloudStorageScreen.kt:125— feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/screen/CloudStorageScreen.kt changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 56 in CloudStorageScreenKt.CloudStorageScreen at line 125. 4 of those changes were fix/bug commits, and the other 11 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 20:11:02 +08:00' --until='2026-11-16 20:11:02 +08:00' --full-history --no-merges -- feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/screen/CloudStorageScreen.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: feature/ai/src/main/java/com/shifenmiao/ai/component/AIChatComponent.kt feature/ai/src/main/java/com/shifenmiao/ai/component/AIChatComponent.kt:763— feature/ai/src/main/java/com/shifenmiao/ai/component/AIChatComponent.kt changed 27 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in AIChatComponent.executeStreamingChat at line 763. 8 of those changes were fix/bug commits, and the other 19 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 20:11:02 +08:00' --until='2026-11-16 20:11:02 +08:00' --full-history --no-merges -- feature/ai/src/main/java/com/shifenmiao/ai/component/AIChatComponent.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: core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassMaterial.kt core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassMaterial.kt:95— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassMaterial.kt changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 72 in GlassMaterialKt.glassVeil at line 95. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 20:11:02 +08:00' --until='2026-11-16 20:11:02 +08:00' --full-history --no-merges -- core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassMaterial.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: feature/settings/src/main/java/com/wanbaohe/setting/ai/screen/AIAddEngineScreen.kt feature/settings/src/main/java/com/wanbaohe/setting/ai/screen/AIAddEngineScreen.kt:99— feature/settings/src/main/java/com/wanbaohe/setting/ai/screen/AIAddEngineScreen.kt changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in AIAddEngineScreenKt.AIAddEngineScreen at line 99. 3 of those changes were fix/bug commits, and the other 15 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 20:11:02 +08:00' --until='2026-11-16 20:11:02 +08:00' --full-history --no-merges -- feature/settings/src/main/java/com/wanbaohe/setting/ai/screen/AIAddEngineScreen.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: feature/profile/src/main/java/com/wanbaohe/profile/settingItem/ProfileSettingItem.kt feature/profile/src/main/java/com/wanbaohe/profile/settingItem/ProfileSettingItem.kt:72— feature/profile/src/main/java/com/wanbaohe/profile/settingItem/ProfileSettingItem.kt changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 41 in ProfileSettingItemKt.ProfileSettingItem at line 72. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 20:11:02 +08:00' --until='2026-11-16 20:11:02 +08:00' --full-history --no-merges -- feature/profile/src/main/java/com/wanbaohe/profile/settingItem/ProfileSettingItem.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: feature/dsh-client/src/main/java/com/wanbaohe/dsh/screen/ChatScreen.kt feature/dsh-client/src/main/java/com/wanbaohe/dsh/screen/ChatScreen.kt:153— feature/dsh-client/src/main/java/com/wanbaohe/dsh/screen/ChatScreen.kt changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 46 in ChatScreenKt.ChatScreen at line 153. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 20:11:02 +08:00' --until='2026-11-16 20:11:02 +08:00' --full-history --no-merges -- feature/dsh-client/src/main/java/com/wanbaohe/dsh/screen/ChatScreen.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: feature/ai/src/main/java/com/shifenmiao/ai/component/AIDuelChatComponent.kt feature/ai/src/main/java/com/shifenmiao/ai/component/AIDuelChatComponent.kt:1086— feature/ai/src/main/java/com/shifenmiao/ai/component/AIDuelChatComponent.kt changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 39 in AIDuelChatComponent.streamWithTypewriter at line 1086. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 20:11:02 +08:00' --until='2026-11-16 20:11:02 +08:00' --full-history --no-merges -- feature/ai/src/main/java/com/shifenmiao/ai/component/AIDuelChatComponent.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: feature/file-browser/src/main/java/com/wanbaohe/file/browser/screen/FileBrowserScreen.kt feature/file-browser/src/main/java/com/wanbaohe/file/browser/screen/FileBrowserScreen.kt:149— feature/file-browser/src/main/java/com/wanbaohe/file/browser/screen/FileBrowserScreen.kt changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 40 in FileBrowserScreenKt.FileBrowserScreen at line 149. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 20:11:02 +08:00' --until='2026-11-16 20:11:02 +08:00' --full-history --no-merges -- feature/file-browser/src/main/java/com/wanbaohe/file/browser/screen/FileBrowserScreen.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: feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/ui/board/XiangqiBoard.kt feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/ui/board/XiangqiBoard.kt:72— feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/ui/board/XiangqiBoard.kt changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in XiangqiBoardKt.XiangqiBoard at line 72. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 20:11:02 +08:00' --until='2026-11-16 20:11:02 +08:00' --full-history --no-merges -- feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/ui/board/XiangqiBoard.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: feature/ai/src/main/java/com/shifenmiao/ai/screen/AIDuelChatScreen.kt feature/ai/src/main/java/com/shifenmiao/ai/screen/AIDuelChatScreen.kt:310— feature/ai/src/main/java/com/shifenmiao/ai/screen/AIDuelChatScreen.kt changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in AIDuelChatScreenKt.DuelChatContent at line 310. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 20:11:02 +08:00' --until='2026-11-16 20:11:02 +08:00' --full-history --no-merges -- feature/ai/src/main/java/com/shifenmiao/ai/screen/AIDuelChatScreen.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: feature/online/src/main/java/com/shifenmiao/online/screen/PagingDataItemScreen.kt feature/online/src/main/java/com/shifenmiao/online/screen/PagingDataItemScreen.kt:116— feature/online/src/main/java/com/shifenmiao/online/screen/PagingDataItemScreen.kt changed 24 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in PagingDataItemScreenKt.PagingDataItemScreen at line 116. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 20:11:02 +08:00' --until='2026-11-16 20:11:02 +08:00' --full-history --no-merges -- feature/online/src/main/java/com/shifenmiao/online/screen/PagingDataItemScreen.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: feature/settings/src/main/java/com/wanbaohe/setting/theme/screen/ThemeSettingsScreen.kt feature/settings/src/main/java/com/wanbaohe/setting/theme/screen/ThemeSettingsScreen.kt:151— feature/settings/src/main/java/com/wanbaohe/setting/theme/screen/ThemeSettingsScreen.kt changed 19 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in ThemeSettingsScreenKt.ThemeSettingsScreen at line 151. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 20:11:02 +08:00' --until='2026-11-16 20:11:02 +08:00' --full-history --no-merges -- feature/settings/src/main/java/com/wanbaohe/setting/theme/screen/ThemeSettingsScreen.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: core/database/src/main/java/com/shifenmiao/database/AppDatabase.kt core/database/src/main/java/com/shifenmiao/database/AppDatabase.kt:307— core/database/src/main/java/com/shifenmiao/database/AppDatabase.kt changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in AppDatabase.getInstanceOrCreate at line 307. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 20:11:02 +08:00' --until='2026-11-16 20:11:02 +08:00' --full-history --no-merges -- core/database/src/main/java/com/shifenmiao/database/AppDatabase.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: core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassOutlinedTextField.kt core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassOutlinedTextField.kt:696— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassOutlinedTextField.kt changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in GlassOutlinedTextFieldKt.modernGlassTextFieldContainer at line 696. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 20:11:02 +08:00' --until='2026-11-16 20:11:02 +08:00' --full-history --no-merges -- core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassOutlinedTextField.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: feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiGameScreen.kt feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiGameScreen.kt:809— feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiGameScreen.kt changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in XiangqiGameScreenKt.XiangqiPlayersRow at line 809. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 20:11:02 +08:00' --until='2026-11-16 20:11:02 +08:00' --full-history --no-merges -- feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiGameScreen.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: feature/ai/src/main/java/com/shifenmiao/ai/request/ProtocolRoutingAIRequestHandler.kt feature/ai/src/main/java/com/shifenmiao/ai/request/ProtocolRoutingAIRequestHandler.kt:686— feature/ai/src/main/java/com/shifenmiao/ai/request/ProtocolRoutingAIRequestHandler.kt changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in ProtocolRoutingAIRequestHandler.parseResponsesSsePayload at line 686. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 20:11:02 +08:00' --until='2026-11-16 20:11:02 +08:00' --full-history --no-merges -- feature/ai/src/main/java/com/shifenmiao/ai/request/ProtocolRoutingAIRequestHandler.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: feature/measurement/src/main/java/com/wanbaohe/measurement/screen/MeasurementScreen.kt feature/measurement/src/main/java/com/wanbaohe/measurement/screen/MeasurementScreen.kt:525— feature/measurement/src/main/java/com/wanbaohe/measurement/screen/MeasurementScreen.kt changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 40 in MeasurementScreenKt.FullScreenRulerBackground at line 525. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 20:11:02 +08:00' --until='2026-11-16 20:11:02 +08:00' --full-history --no-merges -- feature/measurement/src/main/java/com/wanbaohe/measurement/screen/MeasurementScreen.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: core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/HandleDeeplinks.kt core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/HandleDeeplinks.kt:54— core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/HandleDeeplinks.kt changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 51 in HandleDeeplinksKt.handleDeeplinks at line 54. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 20:11:02 +08:00' --until='2026-11-16 20:11:02 +08:00' --full-history --no-merges -- core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/HandleDeeplinks.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: feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/export/ExportSettingsSheet.kt feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/export/ExportSettingsSheet.kt:84— feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/export/ExportSettingsSheet.kt changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in ExportSettingsSheetKt.ExportSettingsSheet at line 84. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 20:11:02 +08:00' --until='2026-11-16 20:11:02 +08:00' --full-history --no-merges -- feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/export/ExportSettingsSheet.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: feature/marktodo/src/main/java/com/shifenmiao/marktodo/screen/MarkTodoScreen.kt feature/marktodo/src/main/java/com/shifenmiao/marktodo/screen/MarkTodoScreen.kt:109— feature/marktodo/src/main/java/com/shifenmiao/marktodo/screen/MarkTodoScreen.kt changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in MarkTodoScreenKt.MarkTodoScreen at line 109. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 20:11:02 +08:00' --until='2026-11-16 20:11:02 +08:00' --full-history --no-merges -- feature/marktodo/src/main/java/com/shifenmiao/marktodo/screen/MarkTodoScreen.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.
Duplicated block (9 lines × 2) core/a2ui/src/main/java/com/wanbaohe/a2ui/ui/A2uiDynamicContent.kt:104— core/a2ui/src/main/java/com/wanbaohe/a2ui/ui/A2uiDynamicContent.kt:104-112 | feature/ai/src/main/java/com/shifenmiao/ai/utils/PromptBuildUtils.kt:57-65 — 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: the declarations holding them bind `element` to `JsonElement?): String? = when (element` in one and `kotlinx.serialization.json.JsonElement?): String? = when (element` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (9 lines × 2) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SideFadeRelativeItem.kt:82— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SideFadeRelativeItem.kt:82-90 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/NumberBooleanPairItem.kt:68-76 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SideFadeRelativeItem.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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/NumberBooleanPairItem.kt:67` calls `onFilterChange` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SideFadeRelativeItem.kt:81` 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 (9 lines × 2) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/ColorModelPairItem.kt:56— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/ColorModelPairItem.kt:56-64 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/ColorModelTripleItem.kt:56-64 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/ColorModelPairItem.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/ColorModelTripleItem.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 `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/ColorModelPairItem.kt:56` 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, `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/ColorModelTripleItem.kt:65` calls `remember`, `mutableStateOf`, `toColor` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/ColorModelPairItem.kt:66` 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 (9 lines × 2) core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/presentation/model/UiFontFamily.kt:166— core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/presentation/model/UiFontFamily.kt:166-174 | core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/presentation/model/UiFontFamily.kt:182-190 — 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 `core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/presentation/model/UiFontFamily.kt:166` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassCheckbox.kt:69— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassCheckbox.kt:69-77 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassRadioButton.kt:79-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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassCheckbox.kt:69` 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) core/utils/src/main/java/com/wanbaohe/com/string/TimeFormatter.kt:156— core/utils/src/main/java/com/wanbaohe/com/string/TimeFormatter.kt:156-164 | core/utils/src/main/java/com/wanbaohe/com/string/TimeFormatter.kt:172-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 `core/utils/src/main/java/com/wanbaohe/com/string/TimeFormatter.kt:156` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (9 lines × 2) feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:280— feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:280-288 | feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIPromptComponent.kt:312-320 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIPromptComponent.kt` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 360 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 `feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.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 (9 lines × 2) feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:684— feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:684-692 | feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIPromptComponent.kt:712-720 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIPromptComponent.kt` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 360 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 `feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:684` 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) feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:378— feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:378-386 | feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt:367-375 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 625 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 `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:378` 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) feature/ai/src/main/java/com/shifenmiao/ai/ui/FullScreenChatInputSheet.kt:340— feature/ai/src/main/java/com/shifenmiao/ai/ui/FullScreenChatInputSheet.kt:340-348 | feature/ai/src/main/java/com/shifenmiao/ai/ui/NewChatInput.kt:818-826 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `feature/ai/src/main/java/com/shifenmiao/ai/ui/FullScreenChatInputSheet.kt:340` 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: `ArrowUpward` names `androidx.compose.material.icons.outlined.ArrowUpward` in one and `com.t8rin.imagetoolbox.core.resources.icons.ArrowUpward` 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 (9 lines × 2) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/data/AndroidApngConverter.kt:96— feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/data/AndroidApngConverter.kt:96-104 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/data/AndroidWebpConverter.kt:83-91 — 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 `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/data/AndroidApngConverter.kt:96` 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 (9 lines × 2) feature/boardgame/src/main/java/com/wanbaohe/boardgame/ui/StatusCards.kt:87— feature/boardgame/src/main/java/com/wanbaohe/boardgame/ui/StatusCards.kt:87-95 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiGameScreen.kt:945-953 — 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 `feature/boardgame/src/main/java/com/wanbaohe/boardgame/ui/StatusCards.kt:87` 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) feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/screen/tab/SettingsTab.kt:336— feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/screen/tab/SettingsTab.kt:336-344 | feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/screen/tab/SettingsTab.kt:358-366 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/screen/tab/SettingsTab.kt:336` 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) feature/calendar/src/main/java/com/wanbaohe/calendar/ui/AuspiciousDayTab.kt:522— feature/calendar/src/main/java/com/wanbaohe/calendar/ui/AuspiciousDayTab.kt:522-530 | feature/calendar/src/main/java/com/wanbaohe/calendar/ui/AuspiciousDayTab.kt:569-577 — 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/calendar/src/main/java/com/wanbaohe/calendar/ui/AuspiciousDayTab.kt:522` 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) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/GameQueryUseCase.kt:128— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/GameQueryUseCase.kt:128-136 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/GameQueryUseCase.kt:126-134 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/GameQueryUseCase.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/GameQueryUseCase.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/GameQueryUseCase.kt:128` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: `GameMode` names `com.wanbaohe.chess.domain.model.GameMode` in one and `com.wanbaohe.gomoku.domain.model.GameMode` 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 (9 lines × 2) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ImportGameUseCase.kt:156— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ImportGameUseCase.kt:156-164 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/ImportGameUseCase.kt:161-169 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ImportGameUseCase.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/ImportGameUseCase.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ImportGameUseCase.kt:156` 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) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/OnlinePlayUseCase.kt:195— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/OnlinePlayUseCase.kt:195-203 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/OnlinePlayUseCase.kt:160-168 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/OnlinePlayUseCase.kt` and `feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/OnlinePlayUseCase.kt` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 113 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 `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/OnlinePlayUseCase.kt:195` 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: `OnlineMessage` names `com.wanbaohe.chess.domain.model.OnlineMessage` in one and `com.wanbaohe.xiangqi.domain.model.OnlineMessage` 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 (9 lines × 2) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/PlayMoveUseCase.kt:111— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/PlayMoveUseCase.kt:111-119 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/PlayMoveUseCase.kt:57-65 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/PlayMoveUseCase.kt` and `feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/PlayMoveUseCase.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 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. Note first that the copies are not typed on the same thing: `FenCodec` names `com.wanbaohe.chess.domain.FenCodec` in one and `com.wanbaohe.xiangqi.domain.FenCodec` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/PlayMoveUseCase.kt:121` calls `statusAfterHistoryChange` and `feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/PlayMoveUseCase.kt:66` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 2) feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:921— feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:921-929 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiGameComponent.kt:848-856 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt` and `feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiGameComponent.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 121 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 `feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:921` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: `FenCodec` names `com.wanbaohe.chess.domain.FenCodec` in one and `com.wanbaohe.xiangqi.domain.FenCodec` 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 (9 lines × 2) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt:184— feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt:184-192 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiAnalysisScreen.kt:185-193 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt` and `feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiAnalysisScreen.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 211 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 `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt:184` 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) feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/AwsSigV4Signer.kt:55— feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/AwsSigV4Signer.kt:55-63 | feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/BaiduBosSigner.kt:58-66 — before extracting anything, compare `feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/AwsSigV4Signer.kt` and `feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/BaiduBosSigner.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 70 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 `feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/AwsSigV4Signer.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 × 2) feature/common/src/main/java/com/shifenmiao/common/components/category/CategoryManagementDialog.kt:501— feature/common/src/main/java/com/shifenmiao/common/components/category/CategoryManagementDialog.kt:501-509 | feature/common/src/main/java/com/shifenmiao/common/components/category/CategoryManagementDialog.kt:519-527 — 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/common/src/main/java/com/shifenmiao/common/components/category/CategoryManagementDialog.kt:501` 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) feature/common/src/main/java/com/shifenmiao/common/handle/UrlNavigator.kt:362— feature/common/src/main/java/com/shifenmiao/common/handle/UrlNavigator.kt:362-370 | feature/scan-qr-code/src/main/java/com/t8rin/imagetoolbox/feature/scan_qr_code/data/DefaultScanCodeResultResolver.kt:96-104 — 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) feature/compass/src/main/java/com/wanbaohe/compass/ui/CompassDial.kt:125— feature/compass/src/main/java/com/wanbaohe/compass/ui/CompassDial.kt:125-133 | feature/compass/src/main/java/com/wanbaohe/compass/ui/luopan/LuopanDial.kt:207-215 — 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 `feature/compass/src/main/java/com/wanbaohe/compass/ui/CompassDial.kt:125` 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) feature/dsh-client/src/main/java/com/wanbaohe/dsh/connection/CloudRelayApi.kt:224— feature/dsh-client/src/main/java/com/wanbaohe/dsh/connection/CloudRelayApi.kt:224-232 | REDACTED:171-179 — 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 `feature/dsh-client/src/main/java/com/wanbaohe/dsh/connection/CloudRelayApi.kt:224` 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) core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/DateInputRenderer.kt:61— core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/DateInputRenderer.kt:61-70 | core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/TimeInputRenderer.kt:58-67 — before extracting anything, compare `core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/DateInputRenderer.kt` and `core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/TimeInputRenderer.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/DateInputRenderer.kt:71` calls `mutableStateOf` and `core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/TimeInputRenderer.kt:69` 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) core/base/src/main/java/com/shifenmiao/base/utils/ColorBuilder.kt:114— core/base/src/main/java/com/shifenmiao/base/utils/ColorBuilder.kt:114-123 | core/utils/src/main/java/com/wanbaohe/com/color/ColorGenerator.kt:175-184 — 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 (10 lines × 2) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterTemplateCreationSheet.kt:281— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterTemplateCreationSheet.kt:281-290 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/addEditMaskSheet/AddEditMaskSheetControls.kt:323-332 — 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 `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterTemplateCreationSheet.kt:281` 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, `feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/addEditMaskSheet/AddEditMaskSheetControls.kt:322` calls `padding` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterTemplateCreationSheet.kt:280` 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 (10 lines × 2) core/network/src/main/java/com/shifenmiao/network/service/FileDownloadService.kt:77— core/network/src/main/java/com/shifenmiao/network/service/FileDownloadService.kt:77-86 | core/network/src/main/java/com/shifenmiao/network/service/FileDownloadService.kt:118-127 — 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 `core/network/src/main/java/com/shifenmiao/network/service/FileDownloadService.kt:77` 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) core/ui/src/main/java/com/wanbaohe/base/ui/icon/Icons.kt:150— core/ui/src/main/java/com/wanbaohe/base/ui/icon/Icons.kt:150-159 | core/ui/src/main/java/com/wanbaohe/base/ui/icon/Icons.kt:162-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. 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) core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/SaveResultHandler.kt:167— core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/SaveResultHandler.kt:167-176 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/SaveResultHandler.kt:196-205 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/SaveResultHandler.kt:167` 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) feature/ai-detect/src/main/java/com/wanbaohe/aidetect/service/AiDetectService.kt:179— feature/ai-detect/src/main/java/com/wanbaohe/aidetect/service/AiDetectService.kt:179-188 | feature/household-items/src/main/java/com/wanbaohe/householditems/service/HouseholdService.kt:341-350 — 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) feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/visual/ActOnUiTool.kt:155— feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/visual/ActOnUiTool.kt:155-164 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/visual/AutomateUiTaskTool.kt:148-157 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (10 lines × 2) feature/ai/src/main/java/com/shifenmiao/ai/screen/AIDuelChatScreen.kt:1136— feature/ai/src/main/java/com/shifenmiao/ai/screen/AIDuelChatScreen.kt:1136-1145 | feature/ai/src/main/java/com/shifenmiao/ai/screen/AIDuelChatScreen.kt:1215-1224 — 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/ai/src/main/java/com/shifenmiao/ai/screen/AIDuelChatScreen.kt:1136` 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) feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:1173— feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:1173-1182 | feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt:1170-1179 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 625 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 `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:1173` 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: `Refresh` names `androidx.compose.material.icons.outlined.Refresh` in one and `com.t8rin.imagetoolbox.core.resources.icons.Refresh` 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 (10 lines × 2) feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/service/BookkeepingService.kt:183— feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/service/BookkeepingService.kt:183-192 | feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/service/BookkeepingService.kt:630-639 — 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/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/service/BookkeepingService.kt:183` 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) feature/calendar/src/main/java/com/wanbaohe/calendar/ui/AuspiciousDayTab.kt:505— feature/calendar/src/main/java/com/wanbaohe/calendar/ui/AuspiciousDayTab.kt:505-514 | feature/calendar/src/main/java/com/wanbaohe/calendar/ui/AuspiciousDayTab.kt:552-561 — 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/calendar/src/main/java/com/wanbaohe/calendar/ui/AuspiciousDayTab.kt:505` 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 × 2) feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/presentation/components/StyleCustomizer.kt:151— feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/presentation/components/StyleCustomizer.kt:151-160 | feature/id-photo/src/main/java/com/wanbaohe/idphoto/presentation/components/SizeCustomizer.kt:113-122 — 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 `feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/presentation/components/StyleCustomizer.kt:151` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: `Refresh` names `androidx.compose.material.icons.filled.Refresh` in one and `com.t8rin.imagetoolbox.core.resources.icons.Refresh` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `feature/id-photo/src/main/java/com/wanbaohe/idphoto/presentation/components/SizeCustomizer.kt:126` calls `Spacer`, `width` and `feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/presentation/components/StyleCustomizer.kt:165` 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 (10 lines × 2) feature/chess/src/main/java/com/wanbaohe/chess/application/port/outbound/ChessAiSource.kt:81— feature/chess/src/main/java/com/wanbaohe/chess/application/port/outbound/ChessAiSource.kt:81-90 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/port/outbound/GomokuAiSource.kt:81-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. 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) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/CreateGameUseCase.kt:119— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/CreateGameUseCase.kt:119-128 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/CreateGameUseCase.kt:130-139 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/CreateGameUseCase.kt` and `feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/CreateGameUseCase.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 50 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 `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/CreateGameUseCase.kt:119` 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: `GameAiPlayerConfig` names `com.wanbaohe.chess.application.dto.GameAiPlayerConfig` in one and `com.wanbaohe.xiangqi.application.dto.GameAiPlayerConfig` 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 (10 lines × 2) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ImportGameUseCase.kt:129— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ImportGameUseCase.kt:129-138 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/ImportGameUseCase.kt:134-143 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ImportGameUseCase.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/ImportGameUseCase.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ImportGameUseCase.kt:129` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: `FenCodec` names `com.wanbaohe.chess.domain.FenCodec` in one and `com.wanbaohe.gomoku.domain.FenCodec` 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 (10 lines × 2) feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:844— feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:844-853 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiGameComponent.kt:702-711 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt` and `feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiGameComponent.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 121 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 `feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:844` 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: `EngineSlot` names `com.wanbaohe.chess.application.port.outbound.EngineSlot` in one and `com.wanbaohe.xiangqi.application.port.outbound.EngineSlot` 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 (10 lines × 2) feature/chess/src/main/java/com/wanbaohe/chess/domain/GameInteraction.kt:83— feature/chess/src/main/java/com/wanbaohe/chess/domain/GameInteraction.kt:83-92 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/domain/GameInteraction.kt:72-81 — 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 (10 lines × 2) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessSettingsScreen.kt:93— feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessSettingsScreen.kt:93-102 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuSettingsScreen.kt:90-99 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessSettingsScreen.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuSettingsScreen.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 138 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. Note first that the copies are not typed on the same thing: `EngineSlot` names `com.wanbaohe.chess.application.port.outbound.EngineSlot` in one and `com.wanbaohe.gomoku.application.port.outbound.EngineSlot` 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 (10 lines × 2) feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/screen/components/ConnectionSheet.kt:386— feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/screen/components/ConnectionSheet.kt:386-395 | feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/screen/components/ConnectionSheet.kt:456-465 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/screen/components/ConnectionSheet.kt:386` 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 `draft` to `androidx.compose.runtime.MutableState<WebDavFormDraft>` in one and `androidx.compose.runtime.MutableState<SmbFormDraft>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (10 lines × 2) feature/common/src/main/java/com/shifenmiao/common/backup/BackupCenterScreen.kt:300— feature/common/src/main/java/com/shifenmiao/common/backup/BackupCenterScreen.kt:300-309 | feature/common/src/main/java/com/shifenmiao/common/backup/BackupCenterScreen.kt:740-749 — 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/common/src/main/java/com/shifenmiao/common/backup/BackupCenterScreen.kt:300` 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 × 2) feature/common/src/main/java/com/shifenmiao/common/components/AutoBackupSettingRow.kt:114— feature/common/src/main/java/com/shifenmiao/common/components/AutoBackupSettingRow.kt:114-123 | feature/common/src/main/java/com/shifenmiao/common/components/BackupCenterSettingRow.kt:65-74 — 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 `feature/common/src/main/java/com/shifenmiao/common/components/AutoBackupSettingRow.kt:114` 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 × 2) feature/common/src/main/java/com/shifenmiao/common/editor/NativeMarkdownEditorActionBar.kt:434— feature/common/src/main/java/com/shifenmiao/common/editor/NativeMarkdownEditorActionBar.kt:434-443 | feature/common/src/main/java/com/shifenmiao/common/editor/NativeMarkdownEditorActionBar.kt:542-553 — 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/common/src/main/java/com/shifenmiao/common/editor/NativeMarkdownEditorActionBar.kt:434` 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 (10 lines × 2) feature/compass/src/main/java/com/wanbaohe/compass/ui/ClassicCompassPage.kt:141— feature/compass/src/main/java/com/wanbaohe/compass/ui/ClassicCompassPage.kt:141-150 | feature/compass/src/main/java/com/wanbaohe/compass/ui/luopan/LuopanPage.kt:143-152 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (10 lines × 2) feature/compass/src/main/java/com/wanbaohe/compass/ui/CompassDial.kt:235— feature/compass/src/main/java/com/wanbaohe/compass/ui/CompassDial.kt:235-244 | feature/compass/src/main/java/com/wanbaohe/compass/ui/luopan/LuopanDial.kt:443-452 — 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 `feature/compass/src/main/java/com/wanbaohe/compass/ui/CompassDial.kt:235` 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 (11 lines × 2) core/base/src/main/java/com/wanbaohe/base/ui/Loading.kt:70— core/base/src/main/java/com/wanbaohe/base/ui/Loading.kt:70-80 | core/base/src/main/java/com/wanbaohe/base/ui/Loading.kt:81-91 — 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) core/data/src/main/java/com/t8rin/imagetoolbox/core/data/utils/UriUtils.kt:75— core/data/src/main/java/com/t8rin/imagetoolbox/core/data/utils/UriUtils.kt:75-85 | core/utils/src/main/java/com/t8rin/imagetoolbox/core/utils/UriUtils.kt:288-298 — before extracting anything, compare `core/data/src/main/java/com/t8rin/imagetoolbox/core/data/utils/UriUtils.kt` and `core/utils/src/main/java/com/t8rin/imagetoolbox/core/utils/UriUtils.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 77 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 `core/data/src/main/java/com/t8rin/imagetoolbox/core/data/utils/UriUtils.kt:75` 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) core/data/src/main/java/com/t8rin/imagetoolbox/core/data/utils/UriUtils.kt:178— core/data/src/main/java/com/t8rin/imagetoolbox/core/data/utils/UriUtils.kt:178-188 | core/data/src/main/java/com/t8rin/imagetoolbox/core/data/utils/UriUtils.kt:199-209 — 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 `core/data/src/main/java/com/t8rin/imagetoolbox/core/data/utils/UriUtils.kt:178` 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) core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/LayoutComponents.kt:170— core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/LayoutComponents.kt:170-180 | core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/LayoutComponents.kt:202-212 — 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 `core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/LayoutComponents.kt:170` 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) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterTemplateCreationSheet.kt:438— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterTemplateCreationSheet.kt:438-448 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/addEditMaskSheet/AddMaskSheetComponent.kt:177-187 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterTemplateCreationSheet.kt:452` calls `updatePreview` and `feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/addEditMaskSheet/AddMaskSheetComponent.kt:191` 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 × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/confetti/Particles.kt:189— core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/confetti/Particles.kt:189-199 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/confetti/Particles.kt:201-211 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/confetti/Particles.kt:189` 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) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/selection/DataSelector.kt:176— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/selection/DataSelector.kt:176-186 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/selection/FontSelector.kt:126-136 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/selection/DataSelector.kt:176` 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) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedFloatingActionButton.kt:92— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedFloatingActionButton.kt:92-102 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedIconButton.kt:81-92 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedFloatingActionButton.kt:92` 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) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassIconButton.kt:151— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassIconButton.kt:151-161 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassIconButton.kt:220-230 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassProgressIndicator.kt:94— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassProgressIndicator.kt:94-104 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassProgressIndicator.kt:173-183 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassProgressIndicator.kt:94` 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) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/sliders/custom_slider/CustomSliderDefaults.kt:221— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/sliders/custom_slider/CustomSliderDefaults.kt:221-231 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/sliders/custom_slider/CustomSliderDefaults.kt:262-272 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/sliders/custom_slider/CustomSliderDefaults.kt:221` 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) feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/AppNavigationCatalogRepository.kt:150— feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/AppNavigationCatalogRepository.kt:150-160 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/AppNavigationCatalogRepository.kt:257-267 — 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) feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/AddBookkeepingRecordTool.kt:103— feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/AddBookkeepingRecordTool.kt:103-113 | feature/record-center/src/main/java/com/wanbaohe/recordcenter/ai/tool/AddHealthRecordTool.kt:115-125 — 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 `feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/AddBookkeepingRecordTool.kt:103` 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) feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:213— feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:213-223 | feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIPromptComponent.kt:245-255 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIPromptComponent.kt` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 360 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 `feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:213` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) feature/ai/src/main/java/com/shifenmiao/ai/screen/AIDuelChatScreen.kt:1758— feature/ai/src/main/java/com/shifenmiao/ai/screen/AIDuelChatScreen.kt:1758-1768 | feature/ai/src/main/java/com/shifenmiao/ai/screen/AIDuelChatScreen.kt:1791-1801 — 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/ai/src/main/java/com/shifenmiao/ai/screen/AIDuelChatScreen.kt:1758` 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, `feature/ai/src/main/java/com/shifenmiao/ai/screen/AIDuelChatScreen.kt:1756` calls `onNavigate`, `EditPromptItem` and `feature/ai/src/main/java/com/shifenmiao/ai/screen/AIDuelChatScreen.kt:1789` 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) feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:1069— feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:1069-1079 | feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt:1065-1075 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 625 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 `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:1069` 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) feature/ai/src/main/java/com/shifenmiao/ai/service/AgentFileServiceImpl.kt:764— feature/ai/src/main/java/com/shifenmiao/ai/service/AgentFileServiceImpl.kt:764-774 | feature/ai/src/main/java/com/shifenmiao/ai/service/AgentFileServiceImpl.kt:794-804 — 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/ai/src/main/java/com/shifenmiao/ai/service/AgentFileServiceImpl.kt:764` 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) feature/ai/src/main/java/com/shifenmiao/ai/ui/ToolCenterBottomSheet.kt:507— feature/ai/src/main/java/com/shifenmiao/ai/ui/ToolCenterBottomSheet.kt:507-517 | feature/common/src/main/java/com/shifenmiao/common/ui/CreationMetaConfigSheet.kt:1051-1061 — 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 `feature/ai/src/main/java/com/shifenmiao/ai/ui/ToolCenterBottomSheet.kt:507` 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) feature/ai/src/main/java/com/shifenmiao/ai/upload/FileUploadRouter.kt:187— feature/ai/src/main/java/com/shifenmiao/ai/upload/FileUploadRouter.kt:187-197 | feature/ai/src/main/java/com/shifenmiao/ai/upload/FileUploadRouter.kt:274-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 `feature/ai/src/main/java/com/shifenmiao/ai/upload/FileUploadRouter.kt:187` 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) feature/boardgame/src/main/java/com/wanbaohe/boardgame/ui/GameCard.kt:191— feature/boardgame/src/main/java/com/wanbaohe/boardgame/ui/GameCard.kt:191-201 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiLibraryScreen.kt:304-314 — 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 `feature/boardgame/src/main/java/com/wanbaohe/boardgame/ui/GameCard.kt:191` 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) feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/component/StatsAggregator.kt:87— feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/component/StatsAggregator.kt:87-97 | feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/component/StatsAggregator.kt:103-113 — 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/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/component/StatsAggregator.kt:87` 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) feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/presentation/components/StyleCustomizer.kt:171— feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/presentation/components/StyleCustomizer.kt:171-181 | feature/id-photo/src/main/java/com/wanbaohe/idphoto/presentation/components/SizeCustomizer.kt:133-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 `feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/presentation/components/StyleCustomizer.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. Note first that the copies are not typed on the same thing: `Delete` names `androidx.compose.material.icons.filled.Delete` in one and `com.t8rin.imagetoolbox.core.resources.icons.Delete` 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 lines × 2) feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/presentation/components/StyleSelector.kt:104— feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/presentation/components/StyleSelector.kt:104-114 | feature/id-photo/src/main/java/com/wanbaohe/idphoto/presentation/components/SizeSelector.kt:98-108 — 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 `feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/presentation/components/StyleSelector.kt:104` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/presentation/screen/CameraWatermarkScreen.kt:232— feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/presentation/screen/CameraWatermarkScreen.kt:232-242 | feature/id-photo/src/main/java/com/wanbaohe/idphoto/presentation/screen/IdPhotoScreen.kt:323-333 — 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) feature/chess/src/main/java/com/wanbaohe/chess/data/LlmMoveChooser.kt:93— feature/chess/src/main/java/com/wanbaohe/chess/data/LlmMoveChooser.kt:93-103 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/LlmMoveChooser.kt:93-103 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/data/LlmMoveChooser.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/LlmMoveChooser.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 47 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.
TooManyMethods: MarkupLayersComponent feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/screenLogic/MarkupLayersComponent.kt:153— TooManyMethods — 148 methods. The bar is 30 methods; this is 118 over it, 4.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: AndroidSettingsManager feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/data/AndroidSettingsManager.kt:206— TooManyMethods — 134 methods. The bar is 30 methods; this is 104 over it, 4.47× the bar. Most of these members implement domain.SettingsInteractor (113 of 134 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: ExtendedFrameImage libs/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:30— TooManyMethods — 133 methods. The bar is 30 methods; this is 103 over it, 4.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: SettingsComponent feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/screenLogic/SettingsComponent.kt:78— TooManyMethods — 104 methods. The bar is 30 methods; this is 74 over it, 3.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: AppSharedStorage core/storage/src/main/java/com/shifenmiao/storage/AppSharedStorage.kt:31— TooManyMethods — 97 methods. The bar is 30 methods; this is 67 over it, 3.23× 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: DatabaseModule core/database/src/main/java/com/shifenmiao/database/di/DatabaseModule.kt:114— TooManyMethods — 85 methods. The bar is 30 methods; this is 55 over it, 2.83× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: TextCardComponent feature/text-card/src/main/java/com/wanbaohe/textcard/presentation/screenLogic/TextCardComponent.kt:105— 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: ChessGameComponent feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:135— TooManyMethods — 66 methods. The bar is 30 methods; this is 36 over it, 2.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: BuiltinToolModule feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/BuiltinToolModule.kt:60— TooManyMethods — 65 methods. The bar is 30 methods; this is 35 over it, 2.17× 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: AppComponent feature/common/src/main/java/com/shifenmiao/common/logic/AppComponent.kt:92— TooManyMethods — 65 methods. The bar is 30 methods; this is 35 over it, 2.17× 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: ChessRouterComponent feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt:97— 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: GomokuGameComponent feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuGameComponent.kt:138— 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: LoginComponent feature/login/src/main/java/com/shifenmiao/login/viewModel/LoginComponent.kt:168— 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: XiangqiGameComponent feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiGameComponent.kt:136— 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: PlantUmlComponentSubPipeline libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:39— 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: DshRootComponent feature/dsh-client/src/main/java/com/wanbaohe/dsh/component/DshRootComponent.kt:95— TooManyMethods — 60 methods. The bar is 30 methods; this is 30 over it, 2.00× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: XiangqiRouterComponent feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/router/screenLogic/XiangqiRouterComponent.kt:97— TooManyMethods — 60 methods. The bar is 30 methods; this is 30 over it, 2.00× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: GomokuRouterComponent feature/gomoku/src/main/java/com/wanbaohe/gomoku/router/screenLogic/GomokuRouterComponent.kt:94— 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: ContextUtils core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/ContextUtils.kt:98— 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: AIDuelChatComponent feature/ai/src/main/java/com/shifenmiao/ai/component/AIDuelChatComponent.kt:106— 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: BrowserComponent feature/webview/src/main/java/com/shifenmiao/webview/browser/BrowserComponent.kt:63— TooManyMethods — 56 methods. The bar is 30 methods; this is 26 over it, 1.87× 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: AgentFileServiceImpl feature/ai/src/main/java/com/shifenmiao/ai/service/AgentFileServiceImpl.kt:84— TooManyMethods — 55 methods. The bar is 30 methods; this is 25 over it, 1.83× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: MediaPlayerComponent feature/media-player/src/main/java/com/wanbaohe/media/component/MediaPlayerComponent.kt:67— TooManyMethods — 53 methods. The bar is 30 methods; this is 23 over it, 1.77× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: PlantUmlArchimateSubPipeline libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlArchimateSubPipeline.kt:38— TooManyMethods — 49 methods. The bar is 30 methods; this is 19 over it, 1.63× 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: CalendarShareCardRenderer feature/calendar/src/main/java/com/wanbaohe/calendar/share/CalendarShareCardRenderer.kt:106— TooManyMethods — 48 methods. The bar is 30 methods; this is 18 over it, 1.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
Duplicated block (12 lines × 2) core/base/src/main/java/com/shifenmiao/base/utils/FileUtils.kt:395— core/base/src/main/java/com/shifenmiao/base/utils/FileUtils.kt:395-406 | core/base/src/main/java/com/shifenmiao/base/utils/FileUtils.kt:435-446 — 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) core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:491— core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:491-502 | core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:560-571 — 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 `core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:491` 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) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterTemplateAddingGroup.kt:91— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterTemplateAddingGroup.kt:91-102 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterTemplateAddingGroup.kt:113-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 `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterTemplateAddingGroup.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 (12 lines × 2) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ChannelMixParamsItem.kt:82— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ChannelMixParamsItem.kt:82-93 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RubberStampParamsItem.kt:83-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 `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ChannelMixParamsItem.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 (12 lines × 2) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/EnhancedZoomBlurParamsItem.kt:62— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/EnhancedZoomBlurParamsItem.kt:62-73 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/LinearTiltShiftParamsItem.kt:62-73 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/EnhancedZoomBlurParamsItem.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/LinearTiltShiftParamsItem.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 91 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 `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/EnhancedZoomBlurParamsItem.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 (12 lines × 2) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ToneCurvesParamsItem.kt:89— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ToneCurvesParamsItem.kt:89-100 | feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/components/ToneCurvesEditOption.kt:177-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.
Duplicated block (12 lines × 2) core/ui/src/main/java/com/wanbaohe/base/ui/icon/Icons.kt:174— core/ui/src/main/java/com/wanbaohe/base/ui/icon/Icons.kt:174-185 | core/ui/src/main/java/com/wanbaohe/base/ui/icon/Icons.kt:200-211 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (12 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedCircularProgressIndicator.kt:65— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedCircularProgressIndicator.kt:65-76 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedCircularProgressIndicator.kt:112-123 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassOutlinedButton.kt:91— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassOutlinedButton.kt:91-102 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassTonalButton.kt:79-90 — before extracting anything, compare `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassOutlinedButton.kt` and `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassTonalButton.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 41 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassOutlinedButton.kt:91` 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) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassProgressIndicator.kt:56— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassProgressIndicator.kt:56-67 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassProgressIndicator.kt:135-146 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassProgressIndicator.kt:56` 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) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/setting/GlassmorphismSettingItem.kt:174— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/setting/GlassmorphismSettingItem.kt:174-186 | feature/ai/src/main/java/com/shifenmiao/ai/ui/MoreInputSection.kt:527-538 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/setting/GlassmorphismSettingItem.kt: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. Note first that the copies are not typed on the same thing: `Check` names `androidx.compose.material.icons.filled.Check` in one and `com.t8rin.imagetoolbox.core.resources.icons.Check` 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) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/switches/FluentSwitch.kt:157— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/switches/FluentSwitch.kt:157-168 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/switches/PixelSwitch.kt:75-86 — 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) feature/ai/src/main/java/com/shifenmiao/ai/screen/AIChatScreen.kt:155— feature/ai/src/main/java/com/shifenmiao/ai/screen/AIChatScreen.kt:155-166 | feature/ai/src/main/java/com/shifenmiao/ai/screen/AgentDetailScreen.kt:90-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. Read the line range as the matched WINDOW rather than a finished unit: at `feature/ai/src/main/java/com/shifenmiao/ai/screen/AIChatScreen.kt:155` 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 × 2) feature/ai/src/main/java/com/shifenmiao/ai/screen/AIDuelChatScreen.kt:657— feature/ai/src/main/java/com/shifenmiao/ai/screen/AIDuelChatScreen.kt:657-668 | feature/ai/src/main/java/com/shifenmiao/ai/screen/AIDuelChatScreen.kt:767-778 — 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/ai/src/main/java/com/shifenmiao/ai/screen/AIDuelChatScreen.kt:657` 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 × 2) feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:551— feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:551-562 | feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt:534-545 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 625 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 `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:551` 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 × 2) feature/ai/src/main/java/com/shifenmiao/ai/service/AgentCreationService.kt:156— feature/ai/src/main/java/com/shifenmiao/ai/service/AgentCreationService.kt:156-167 | feature/ai/src/main/java/com/shifenmiao/ai/service/PromptCreationService.kt:150-161 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/service/AgentCreationService.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/service/PromptCreationService.kt` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 107 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 (12 lines × 2) feature/ai/src/main/java/com/shifenmiao/ai/ui/NewChatInput.kt:767— feature/ai/src/main/java/com/shifenmiao/ai/ui/NewChatInput.kt:767-778 | feature/ai/src/main/java/com/shifenmiao/ai/ui/NewChatInput.kt:789-800 — 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/ai/src/main/java/com/shifenmiao/ai/ui/NewChatInput.kt:767` 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, `feature/ai/src/main/java/com/shifenmiao/ai/ui/NewChatInput.kt:766` calls `padding` and `feature/ai/src/main/java/com/shifenmiao/ai/ui/NewChatInput.kt:788` 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 (12 lines × 2) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/data/AndroidApngConverter.kt:125— feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/data/AndroidApngConverter.kt:125-136 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/data/AndroidWebpConverter.kt:106-117 — 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 `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/data/AndroidApngConverter.kt:125` 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) feature/calendar/src/main/java/com/wanbaohe/calendar/ui/ConversionTab.kt:562— feature/calendar/src/main/java/com/wanbaohe/calendar/ui/ConversionTab.kt:562-573 | feature/calendar/src/main/java/com/wanbaohe/calendar/ui/ConversionTab.kt:716-727 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/calendar/src/main/java/com/wanbaohe/calendar/ui/ConversionTab.kt:562` 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) feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/presentation/components/ExportConfigPanel.kt:72— feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/presentation/components/ExportConfigPanel.kt:72-83 | feature/id-photo/src/main/java/com/wanbaohe/idphoto/presentation/components/IdPhotoExportConfigPanel.kt:99-110 — before extracting anything, compare `feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/presentation/components/ExportConfigPanel.kt` and `feature/id-photo/src/main/java/com/wanbaohe/idphoto/presentation/components/IdPhotoExportConfigPanel.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 49 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 `feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/presentation/components/ExportConfigPanel.kt:72` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `feature/id-photo/src/main/java/com/wanbaohe/idphoto/presentation/components/IdPhotoExportConfigPanel.kt:113` calls `Column`, `fillMaxWidth` and `feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/presentation/components/ExportConfigPanel.kt:86` 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) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/AiOrchestrationUseCase.kt:155— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/AiOrchestrationUseCase.kt:155-166 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/AiOrchestrationUseCase.kt:140-152 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/AiOrchestrationUseCase.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/AiOrchestrationUseCase.kt` as WHOLE FILES: this scan already matched 5 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 `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/AiOrchestrationUseCase.kt:155` 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) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ManageGameUseCase.kt:84— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ManageGameUseCase.kt:84-95 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/ManageGameUseCase.kt:71-82 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ManageGameUseCase.kt` and `feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/ManageGameUseCase.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 81 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: `GameStatus` names `com.wanbaohe.chess.domain.model.GameStatus` in one and `com.wanbaohe.xiangqi.domain.model.GameStatus` 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) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/OnlinePlayUseCase.kt:443— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/OnlinePlayUseCase.kt:443-454 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/OnlinePlayUseCase.kt:364-375 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/OnlinePlayUseCase.kt` and `feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/OnlinePlayUseCase.kt` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 113 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. Note first that the copies are not typed on the same thing: `BoardPoint` names `com.wanbaohe.chess.domain.model.BoardPoint` in one and `com.wanbaohe.xiangqi.domain.model.BoardPoint` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/OnlinePlayUseCase.kt:455` calls `enqueueOpponentEvent`, `Move` and `feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/OnlinePlayUseCase.kt:376` 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) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessGameScreen.kt:385— feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessGameScreen.kt:385-396 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuGameScreen.kt:383-394 — 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: `GameStatus` names `com.wanbaohe.chess.domain.model.GameStatus` in one and `com.wanbaohe.gomoku.domain.model.GameStatus` 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) feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/adapter/SmbFileSystemAdapter.kt:172— feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/adapter/SmbFileSystemAdapter.kt:172-183 | feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/adapter/SmbFileSystemAdapter.kt:207-218 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/adapter/SmbFileSystemAdapter.kt:172` 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.
ClassTooLong: Screen core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/navigation/Screen.kt:83— ClassTooLong — 1859 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 1459 over it, 4.65× 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: MarkupLayersComponent feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/screenLogic/MarkupLayersComponent.kt:153— ClassTooLong — 1843 significant lines (blank, comment-only and punctuation-only lines excluded), 148 methods. The bar is 400 significant lines; this is 1443 over it, 4.61× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: AIDuelChatComponent feature/ai/src/main/java/com/shifenmiao/ai/component/AIDuelChatComponent.kt:106— ClassTooLong — 1102 significant lines (blank, comment-only and punctuation-only lines excluded), 58 methods. The bar is 400 significant lines; this is 702 over it, 2.76× 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: ChildProvider feature/app/src/main/java/com/t8rin/imagetoolbox/feature/root/presentation/components/navigation/ChildProvider.kt:202— ClassTooLong — 972 significant lines (blank, comment-only and punctuation-only lines excluded), 2 methods. The bar is 400 significant lines; this is 572 over it, 2.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: AgentFileServiceImpl feature/ai/src/main/java/com/shifenmiao/ai/service/AgentFileServiceImpl.kt:84— ClassTooLong — 930 significant lines (blank, comment-only and punctuation-only lines excluded), 55 methods. The bar is 400 significant lines; this is 530 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.
ClassTooLong: LoginComponent feature/login/src/main/java/com/shifenmiao/login/viewModel/LoginComponent.kt:168— ClassTooLong — 921 significant lines (blank, comment-only and punctuation-only lines excluded), 62 methods. The bar is 400 significant lines; this is 521 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: ProtocolRoutingAIRequestHandler feature/ai/src/main/java/com/shifenmiao/ai/request/ProtocolRoutingAIRequestHandler.kt:102— ClassTooLong — 887 significant lines (blank, comment-only and punctuation-only lines excluded), 38 methods. The bar is 400 significant lines; this is 487 over it, 2.22× 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: TextCardComponent feature/text-card/src/main/java/com/wanbaohe/textcard/presentation/screenLogic/TextCardComponent.kt:105— ClassTooLong — 882 significant lines (blank, comment-only and punctuation-only lines excluded), 70 methods. The bar is 400 significant lines; this is 482 over it, 2.21× 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: AIChatComponent feature/ai/src/main/java/com/shifenmiao/ai/component/AIChatComponent.kt:111— ClassTooLong — 875 significant lines (blank, comment-only and punctuation-only lines excluded), 46 methods. The bar is 400 significant lines; this is 475 over it, 2.19× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: NavigationChild feature/app/src/main/java/com/t8rin/imagetoolbox/feature/root/presentation/components/navigation/NavigationChild.kt:298— ClassTooLong — 875 significant lines (blank, comment-only and punctuation-only lines excluded), 0 methods. The bar is 400 significant lines; this is 475 over it, 2.19× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: PlantUmlComponentSubPipeline libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:39— ClassTooLong — 821 significant lines (blank, comment-only and punctuation-only lines excluded), 61 methods. The bar is 400 significant lines; this is 421 over it, 2.05× 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: GomokuGameComponent feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuGameComponent.kt:138— ClassTooLong — 775 significant lines (blank, comment-only and punctuation-only lines excluded), 62 methods. The bar is 400 significant lines; this is 375 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: FileTransferServer feature/file-transfer/src/main/java/com/wanbaohe/file_transfer/server/FileTransferServer.kt:66— ClassTooLong — 731 significant lines (blank, comment-only and punctuation-only lines excluded), 39 methods. The bar is 400 significant lines; this is 331 over it, 1.83× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ChessGameComponent feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:135— ClassTooLong — 695 significant lines (blank, comment-only and punctuation-only lines excluded), 66 methods. The bar is 400 significant lines; this is 295 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: ItemEntityDao core/database/src/main/java/com/shifenmiao/database/item/dao/ItemEntityDao.kt:47— ClassTooLong — 673 significant lines (blank, comment-only and punctuation-only lines excluded), 100 methods. The bar is 400 significant lines; this is 273 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: ManageTodoTool feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageTodoTool.kt:45— ClassTooLong — 660 significant lines (blank, comment-only and punctuation-only lines excluded), 24 methods. The bar is 400 significant lines; this is 260 over it, 1.65× 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: PlantUmlActivitySubPipeline libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlActivitySubPipeline.kt:43— ClassTooLong — 659 significant lines (blank, comment-only and punctuation-only lines excluded), 41 methods. The bar is 400 significant lines; this is 259 over it, 1.65× 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: ThemeSettingTool feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ThemeSettingTool.kt:54— ClassTooLong — 644 significant lines (blank, comment-only and punctuation-only lines excluded), 24 methods. The bar is 400 significant lines; this is 244 over it, 1.61× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: AndroidPdfManager feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/data/AndroidPdfManager.kt:118— ClassTooLong — 628 significant lines (blank, comment-only and punctuation-only lines excluded), 32 methods. The bar is 400 significant lines; this is 228 over it, 1.57× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: XiangqiGameComponent feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiGameComponent.kt:136— ClassTooLong — 623 significant lines (blank, comment-only and punctuation-only lines excluded), 61 methods. The bar is 400 significant lines; this is 223 over it, 1.56× 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: FrameImageView libs/collages/src/main/java/com/t8rin/collages/view/FrameImageView.kt:52— ClassTooLong — 620 significant lines (blank, comment-only and punctuation-only lines excluded), 21 methods. The bar is 400 significant lines; this is 220 over it, 1.55× 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: CreateAIPromptComponent feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIPromptComponent.kt:84— ClassTooLong — 582 significant lines (blank, comment-only and punctuation-only lines excluded), 38 methods. The bar is 400 significant lines; this is 182 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: AndroidSettingsManager feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/data/AndroidSettingsManager.kt:206— ClassTooLong — 572 significant lines (blank, comment-only and punctuation-only lines excluded), 134 methods. The bar is 400 significant lines; this is 172 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: DshRootComponent feature/dsh-client/src/main/java/com/wanbaohe/dsh/component/DshRootComponent.kt:95— ClassTooLong — 567 significant lines (blank, comment-only and punctuation-only lines excluded), 60 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: BookkeepingService feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/service/BookkeepingService.kt:68— ClassTooLong — 567 significant lines (blank, comment-only and punctuation-only lines excluded), 32 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.
Duplicated block (14 lines × 2) core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:417— core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:417-430 | core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:439-452 — 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 `core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:417` 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) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterReorderSheet.kt:81— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterReorderSheet.kt:81-94 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/MaskReorderSheet.kt:81-94 — 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 `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterReorderSheet.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 (14 lines × 2) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionCubeLutBottomContent.kt:254— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionCubeLutBottomContent.kt:254-267 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheet.kt:487-500 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionCubeLutBottomContent.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheet.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 108 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 `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionCubeLutBottomContent.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. Note first that the copies are not typed on the same thing: `Close` names `androidx.compose.material.icons.rounded.Close` in one and `com.t8rin.imagetoolbox.core.resources.icons.Close` 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 (14 lines × 2) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionItem.kt:160— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionItem.kt:160-173 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/TemplateFilterSelectionItem.kt:125-138 — 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 `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionItem.kt:160` 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) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterTemplateInfoSheet.kt:327— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterTemplateInfoSheet.kt:327-340 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterTemplateInfoSheet.kt:354-367 — 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 `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterTemplateInfoSheet.kt:327` 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) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ClaheParamsItem.kt:71— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ClaheParamsItem.kt:71-84 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SmearParamsItem.kt:75-88 — 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 `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ClaheParamsItem.kt:71` 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) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/quad_components/NumberQuadItem.kt:70— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/quad_components/NumberQuadItem.kt:70-83 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberTripleItem.kt:65-78 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/quad_components/NumberQuadItem.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberTripleItem.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 54 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 `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/quad_components/NumberQuadItem.kt:70` 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) core/network/src/main/java/com/shifenmiao/network/utils/NetworkUtils.kt:244— core/network/src/main/java/com/shifenmiao/network/utils/NetworkUtils.kt:244-257 | core/network/src/main/java/com/shifenmiao/network/utils/NetworkUtils.kt:265-278 — 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 `core/network/src/main/java/com/shifenmiao/network/utils/NetworkUtils.kt:244` 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) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/selection/FontItem.kt:97— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/selection/FontItem.kt:97-110 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/dialogs/OneTimeSaveLocationSelectionDialog.kt:244-257 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/selection/FontItem.kt:97` 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) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedButton.kt:85— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedButton.kt:85-98 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedIconButton.kt:82-95 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedButton.kt:85` 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, `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedButton.kt:99` calls `clearFocus` and `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedIconButton.kt:96` 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 (14 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/ColoredGlass.kt:51— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/ColoredGlass.kt:51-64 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/ColoredGlass.kt:83-96 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/ColoredGlass.kt:51` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassTextButton.kt:82— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassTextButton.kt:82-95 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassTonalButton.kt:73-86 — before extracting anything, compare `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassTextButton.kt` and `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassTonalButton.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. 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassTextButton.kt:82` 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) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/image/ImagesPreviewWithSelection.kt:486— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/image/ImagesPreviewWithSelection.kt:486-499 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/components/PdfPage.kt:220-234 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/image/ImagesPreviewWithSelection.kt:486` 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: `Icons` names `androidx.compose.material.icons.Icons` in one and `com.t8rin.imagetoolbox.core.resources.Icons` 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 (14 lines × 2) core/utils/src/main/java/com/t8rin/imagetoolbox/core/utils/QrType.kt:101— core/utils/src/main/java/com/t8rin/imagetoolbox/core/utils/QrType.kt:101-114 | feature/scan-qr-code/src/main/java/com/t8rin/imagetoolbox/feature/scan_qr_code/presentation/components/QrTypeUtils.kt:386-399 — 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 `core/utils/src/main/java/com/t8rin/imagetoolbox/core/utils/QrType.kt:101` 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) feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:656— feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:656-669 | feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIPromptComponent.kt:684-697 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIPromptComponent.kt` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 360 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 `feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:656` 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) feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:566— feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:566-579 | feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt:549-562 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 625 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 `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:566` 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) feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:605— feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:605-618 | feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt:588-601 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 625 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 `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:605` 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) feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:1024— feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:1024-1037 | feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt:1020-1033 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 625 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 `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:1024` 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) feature/ai/src/main/java/com/shifenmiao/ai/service/AgentCreationService.kt:184— feature/ai/src/main/java/com/shifenmiao/ai/service/AgentCreationService.kt:184-197 | feature/ai/src/main/java/com/shifenmiao/ai/service/PromptCreationService.kt:178-191 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/service/AgentCreationService.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/service/PromptCreationService.kt` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 107 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 `feature/ai/src/main/java/com/shifenmiao/ai/service/AgentCreationService.kt:184` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) feature/ai/src/main/java/com/shifenmiao/ai/ui/AIPromptsPickerBottomSheet.kt:117— feature/ai/src/main/java/com/shifenmiao/ai/ui/AIPromptsPickerBottomSheet.kt:117-130 | feature/ai/src/main/java/com/shifenmiao/ai/ui/RecentQuestionsBottomSheet.kt:82-95 — 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 `feature/ai/src/main/java/com/shifenmiao/ai/ui/AIPromptsPickerBottomSheet.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 (14 lines × 2) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:291— feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:291-304 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt:291-304 — before extracting anything, compare `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt` and `feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 239 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 (14 lines × 2) feature/audio-cover-extractor/src/main/java/com/t8rin/imagetoolbox/feature/audio_cover_extractor/ui/AudioCoverExtractorContent.kt:245— feature/audio-cover-extractor/src/main/java/com/t8rin/imagetoolbox/feature/audio_cover_extractor/ui/AudioCoverExtractorContent.kt:245-258 | feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:222-235 — 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 `feature/audio-cover-extractor/src/main/java/com/t8rin/imagetoolbox/feature/audio_cover_extractor/ui/AudioCoverExtractorContent.kt:245` 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) feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/screen/tab/DetailTab.kt:277— feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/screen/tab/DetailTab.kt:277-290 | feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/screen/tab/StatsTab.kt:290-303 — 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 `feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/screen/tab/DetailTab.kt:277` 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) feature/calendar/src/main/java/com/wanbaohe/calendar/ui/CalendarTab.kt:564— feature/calendar/src/main/java/com/wanbaohe/calendar/ui/CalendarTab.kt:564-577 | feature/calendar/src/main/java/com/wanbaohe/calendar/ui/CalendarTab.kt:738-751 — 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/calendar/src/main/java/com/wanbaohe/calendar/ui/CalendarTab.kt:564` 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) feature/chess/src/main/java/com/wanbaohe/chess/data/GameDaoAdapter.kt:75— feature/chess/src/main/java/com/wanbaohe/chess/data/GameDaoAdapter.kt:75-88 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/GameDaoAdapter.kt:74-87 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/data/GameDaoAdapter.kt` and `feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/GameDaoAdapter.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 54 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 `feature/chess/src/main/java/com/wanbaohe/chess/data/GameDaoAdapter.kt:75` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: `GameStatus` names `com.wanbaohe.chess.domain.model.GameStatus` in one and `com.wanbaohe.xiangqi.domain.model.GameStatus` 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) core/domain/src/main/kotlin/com/t8rin/imagetoolbox/core/domain/content/ContentTypeResolver.kt:150— core/domain/src/main/kotlin/com/t8rin/imagetoolbox/core/domain/content/ContentTypeResolver.kt:150-156 | feature/zip/src/main/java/com/t8rin/imagetoolbox/feature/zip/data/AndroidZipManager.kt:392-400 — 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 `core/domain/src/main/kotlin/com/t8rin/imagetoolbox/core/domain/content/ContentTypeResolver.kt:150` 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 (7 lines × 2) core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/DynamicUi.kt:489— core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/DynamicUi.kt:489-495 | feature/app/src/main/java/com/wanbaohe/app/ui/AISpecializedQuestionField.kt:395-401 — 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 (7 lines × 2) core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:629— core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:629-635 | core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:882-888 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedModalBottomSheet.kt:414— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedModalBottomSheet.kt:414-420 | libs/modalsheet/src/main/java/com/t8rin/modalsheet/ModalSheet.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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedModalBottomSheet.kt:414` 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, `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedModalBottomSheet.kt:413` calls `delay` and `libs/modalsheet/src/main/java/com/t8rin/modalsheet/ModalSheet.kt:119` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/other/TopAppBarEmoji.kt:272— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/other/TopAppBarEmoji.kt:272-278 | feature/settings/src/main/java/com/wanbaohe/setting/display/screen/DisplaySettingsScreen.kt:838-849 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/other/TopAppBarEmoji.kt:272` 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 (7 lines × 2) feature/ai/src/main/java/com/shifenmiao/ai/component/SearchResultsComponent.kt:168— feature/ai/src/main/java/com/shifenmiao/ai/component/SearchResultsComponent.kt:168-174 | feature/ai/src/main/java/com/shifenmiao/ai/execution/component/AiExecutionTimelineCard.kt:516-522 — 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 `feature/ai/src/main/java/com/shifenmiao/ai/component/SearchResultsComponent.kt:168` 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) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ImportGameUseCase.kt:110— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ImportGameUseCase.kt:110-116 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/ImportGameUseCase.kt:113-119 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ImportGameUseCase.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/ImportGameUseCase.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ImportGameUseCase.kt:110` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: `GamePreparation` names `com.wanbaohe.chess.application.dto.GamePreparation` in one and `com.wanbaohe.gomoku.application.dto.GamePreparation` 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) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ImportGameUseCase.kt:145— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ImportGameUseCase.kt:145-151 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/ImportGameUseCase.kt:150-156 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ImportGameUseCase.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/ImportGameUseCase.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ImportGameUseCase.kt:145` 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) feature/chess/src/main/java/com/wanbaohe/chess/router/ChessRouterScreen.kt:101— feature/chess/src/main/java/com/wanbaohe/chess/router/ChessRouterScreen.kt:101-109 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/router/XiangqiRouterScreen.kt:119-125 — 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 `feature/chess/src/main/java/com/wanbaohe/chess/router/ChessRouterScreen.kt:101` 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) feature/common/src/main/java/com/shifenmiao/common/components/comments/CommentsBottomSheet.kt:559— feature/common/src/main/java/com/shifenmiao/common/components/comments/CommentsBottomSheet.kt:559-565 | feature/common/src/main/java/com/shifenmiao/common/components/comments/CommentsBottomSheet.kt:703-709 — 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/common/src/main/java/com/shifenmiao/common/components/comments/CommentsBottomSheet.kt:559` 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) feature/dsh-client/src/main/java/com/wanbaohe/dsh/session/SubagentStore.kt:410— feature/dsh-client/src/main/java/com/wanbaohe/dsh/session/SubagentStore.kt:410-416 | feature/dsh-client/src/main/java/com/wanbaohe/dsh/session/SubagentStore.kt:435-441 — 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/dsh-client/src/main/java/com/wanbaohe/dsh/session/SubagentStore.kt:410` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) feature/gomoku/src/main/java/com/wanbaohe/gomoku/ui/board/GomokuBoard.kt:180— feature/gomoku/src/main/java/com/wanbaohe/gomoku/ui/board/GomokuBoard.kt:180-186 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/ui/board/XiangqiBoard.kt:257-263 — 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 `feature/gomoku/src/main/java/com/wanbaohe/gomoku/ui/board/GomokuBoard.kt:180` 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) feature/iching-divination/src/main/java/com/wanbaohe/iching/domain/IChingInterpretationService.kt:131— feature/iching-divination/src/main/java/com/wanbaohe/iching/domain/IChingInterpretationService.kt:131-137 | feature/poem/src/main/java/com/wanbaohe/poem/service/PoemInsightService.kt:148-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 `feature/iching-divination/src/main/java/com/wanbaohe/iching/domain/IChingInterpretationService.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. 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) feature/marktodo/src/main/java/com/shifenmiao/marktodo/service/MarkTodoServiceImpl.kt:97— feature/marktodo/src/main/java/com/shifenmiao/marktodo/service/MarkTodoServiceImpl.kt:97-103 | feature/marktodo/src/main/java/com/shifenmiao/marktodo/service/MarkTodoServiceImpl.kt:130-136 — 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/marktodo/src/main/java/com/shifenmiao/marktodo/service/MarkTodoServiceImpl.kt:97` 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) feature/ocr-document/src/main/java/com/shifenmiao/feature/document/component/OcrTaskListComponent.kt:307— feature/ocr-document/src/main/java/com/shifenmiao/feature/document/component/OcrTaskListComponent.kt:307-313 | feature/ocr-document/src/main/java/com/shifenmiao/feature/document/domain/PointsCost.kt:26-32 — before extracting anything, compare `feature/ocr-document/src/main/java/com/shifenmiao/feature/document/component/OcrTaskListComponent.kt` and `feature/ocr-document/src/main/java/com/shifenmiao/feature/document/domain/PointsCost.kt` as WHOLE FILES: 85% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 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 (7 lines × 2) feature/text-card/src/main/java/com/wanbaohe/textcard/presentation/editor/PaperTexturePreview.kt:51— feature/text-card/src/main/java/com/wanbaohe/textcard/presentation/editor/PaperTexturePreview.kt:51-57 | feature/text-card/src/main/java/com/wanbaohe/textcard/presentation/editor/PaperTexturePreview.kt:62-68 — 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) libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1469— libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1469-1475 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1484-1490 — 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) libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1569— libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1569-1575 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1593-1599 — 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) libs/cropper/src/main/java/com/t8rin/cropper/state/DynamicCropState.kt:416— libs/cropper/src/main/java/com/t8rin/cropper/state/DynamicCropState.kt:416-422 | libs/cropper/src/main/java/com/t8rin/cropper/state/DynamicCropState.kt:456-462 — 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) libs/cropper/src/main/java/com/t8rin/cropper/state/DynamicCropState.kt:436— libs/cropper/src/main/java/com/t8rin/cropper/state/DynamicCropState.kt:436-442 | libs/cropper/src/main/java/com/t8rin/cropper/state/DynamicCropState.kt:476-482 — 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) libs/diagram/src/upstream/java/com/hrm/diagram/render/export/FamilyOneShotRenderers.kt:130— libs/diagram/src/upstream/java/com/hrm/diagram/render/export/FamilyOneShotRenderers.kt:130-136 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidMindmapSubPipeline.kt:72-78 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (7 lines × 2) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidErSubPipeline.kt:587— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidErSubPipeline.kt:587-593 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlErdSubPipeline.kt:669-675 — before extracting anything, compare `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidErSubPipeline.kt` and `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlErdSubPipeline.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 144 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) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidMindmapSubPipeline.kt:112— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidMindmapSubPipeline.kt:112-118 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidRequirementSubPipeline.kt:139-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 `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidMindmapSubPipeline.kt:112` 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) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidSequenceSubPipeline.kt:132— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidSequenceSubPipeline.kt:132-138 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlSequenceSubPipeline.kt:213-219 — 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 `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidSequenceSubPipeline.kt:132` 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) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlPieSubPipeline.kt:205— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlPieSubPipeline.kt:205-211 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlTimeSeriesSubPipeline.kt:618-624 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (13 lines × 2) core/camera/src/main/java/com/wanbaohe/camera/CameraCaptureScreen.kt:221— core/camera/src/main/java/com/wanbaohe/camera/CameraCaptureScreen.kt:221-233 | core/camera/src/main/java/com/wanbaohe/camera/CameraCaptureScreen.kt:240-252 — 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 `core/camera/src/main/java/com/wanbaohe/camera/CameraCaptureScreen.kt:221` 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) core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:1243— core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:1243-1255 | core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:1365-1377 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:1256` calls `propInt` and `core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:1378` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (13 lines × 2) core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDatePickerDialog.kt:346— core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDatePickerDialog.kt:346-358 | core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseTimeRangePickerDialog.kt:181-193 — 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 `core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDatePickerDialog.kt:346` 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) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/FileReorderVerticalList.kt:329— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/FileReorderVerticalList.kt:329-341 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/common/PdfPreviewItem.kt:118-130 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/FileReorderVerticalList.kt:329` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/page/PagesSelectionParser.kt:48— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/page/PagesSelectionParser.kt:48-60 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/components/PagesSelectionParser.kt:47-59 — before extracting anything, compare `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/page/PagesSelectionParser.kt` and `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/components/PagesSelectionParser.kt` as WHOLE FILES: 93% 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/page/PagesSelectionParser.kt:48` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/page/PagesSelectionParser.kt:47` calls `sorted` and `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/components/PagesSelectionParser.kt:46` 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) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassCustomSlider.kt:263— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassCustomSlider.kt:263-275 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/sliders/custom_slider/CustomSliderDefaults.kt:165-177 — 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 (13 lines × 2) feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:911— feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:911-923 | feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIPromptComponent.kt:946-958 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIPromptComponent.kt` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 360 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 `feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:911` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIPromptComponent.kt:960` calls `orEmpty` and `feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:925` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (13 lines × 2) feature/ai/src/main/java/com/shifenmiao/ai/export/DuelHtmlExporter.kt:684— feature/ai/src/main/java/com/shifenmiao/ai/export/DuelHtmlExporter.kt:684-696 | feature/ai/src/main/java/com/shifenmiao/ai/export/HtmlExporter.kt:759-771 — 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) feature/ai/src/main/java/com/shifenmiao/ai/screen/AIDuelChatScreen.kt:701— feature/ai/src/main/java/com/shifenmiao/ai/screen/AIDuelChatScreen.kt:701-713 | feature/ai/src/main/java/com/shifenmiao/ai/screen/AIDuelChatScreen.kt:734-746 — 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 (13 lines × 2) feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:1121— feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:1121-1133 | feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt:1115-1127 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 625 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 `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:1121` 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 (13 lines × 2) feature/ai/src/main/java/com/shifenmiao/ai/service/AgentFileServiceImpl.kt:310— feature/ai/src/main/java/com/shifenmiao/ai/service/AgentFileServiceImpl.kt:310-322 | feature/ai/src/main/java/com/shifenmiao/ai/service/AgentFileServiceImpl.kt:339-351 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/ai/src/main/java/com/shifenmiao/ai/service/AgentFileServiceImpl.kt:310` 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) feature/ai/src/main/java/com/shifenmiao/ai/ui/AIPromptsPickerBottomSheet.kt:159— feature/ai/src/main/java/com/shifenmiao/ai/ui/AIPromptsPickerBottomSheet.kt:159-171 | feature/ai/src/main/java/com/shifenmiao/ai/ui/RecentQuestionsBottomSheet.kt:107-119 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `feature/ai/src/main/java/com/shifenmiao/ai/ui/AIPromptsPickerBottomSheet.kt:159` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) feature/ai/src/main/java/com/shifenmiao/ai/upload/FileUploadRouter.kt:382— feature/ai/src/main/java/com/shifenmiao/ai/upload/FileUploadRouter.kt:382-394 | feature/ai/src/main/java/com/shifenmiao/ai/upload/FileUploadRouter.kt:459-471 — 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/ai/src/main/java/com/shifenmiao/ai/upload/FileUploadRouter.kt:382` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `feature/ai/src/main/java/com/shifenmiao/ai/upload/FileUploadRouter.kt:458` calls `emit`, `Started` and `feature/ai/src/main/java/com/shifenmiao/ai/upload/FileUploadRouter.kt:380` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (13 lines × 2) feature/calendar/src/main/java/com/wanbaohe/calendar/ui/CalendarTab.kt:550— feature/calendar/src/main/java/com/wanbaohe/calendar/ui/CalendarTab.kt:550-562 | feature/calendar/src/main/java/com/wanbaohe/calendar/ui/CalendarTab.kt:724-736 — 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/calendar/src/main/java/com/wanbaohe/calendar/ui/CalendarTab.kt:550` 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 (13 lines × 2) feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/presentation/components/StyleCustomizer.kt:193— feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/presentation/components/StyleCustomizer.kt:193-205 | feature/id-photo/src/main/java/com/wanbaohe/idphoto/presentation/components/SizeCustomizer.kt:165-177 — 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 `feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/presentation/components/StyleCustomizer.kt:193` 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: `Edit` names `androidx.compose.material.icons.filled.Edit` in one and `com.t8rin.imagetoolbox.core.resources.icons.Edit` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `feature/id-photo/src/main/java/com/wanbaohe/idphoto/presentation/components/SizeCustomizer.kt:181` calls `Spacer`, `width` and `feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/presentation/components/StyleCustomizer.kt:209` 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) feature/chess/src/main/java/com/wanbaohe/chess/component/ChessLibraryComponent.kt:125— feature/chess/src/main/java/com/wanbaohe/chess/component/ChessLibraryComponent.kt:125-137 | feature/chess/src/main/java/com/wanbaohe/chess/component/ChessLibraryComponent.kt:143-155 — 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/chess/src/main/java/com/wanbaohe/chess/component/ChessLibraryComponent.kt:125` 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) feature/chess/src/main/java/com/wanbaohe/chess/data/EngineMoveChooser.kt:57— feature/chess/src/main/java/com/wanbaohe/chess/data/EngineMoveChooser.kt:57-69 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/EngineMoveChooser.kt:58-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. Read the line range as the matched WINDOW rather than a finished unit: at `feature/chess/src/main/java/com/wanbaohe/chess/data/EngineMoveChooser.kt:57` 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 (13 lines × 2) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt:175— feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt:175-187 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuAnalysisScreen.kt:184-196 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuAnalysisScreen.kt` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 187 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 `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt:175` 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: `NotationRows` names `com.wanbaohe.chess.application.dto.NotationRows` in one and `com.wanbaohe.gomoku.application.dto.NotationRows` 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 (13 lines × 2) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt:382— feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt:382-394 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiAnalysisScreen.kt:384-396 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt` and `feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiAnalysisScreen.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 211 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 `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt:382` 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) feature/chess/src/main/java/com/wanbaohe/chess/screen/NewGameDropMenu.kt:240— feature/chess/src/main/java/com/wanbaohe/chess/screen/NewGameDropMenu.kt:240-253 | feature/chess/src/main/java/com/wanbaohe/chess/screen/NewGameDropMenu.kt:256-268 — 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/chess/src/main/java/com/wanbaohe/chess/screen/NewGameDropMenu.kt:240` 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, `feature/chess/src/main/java/com/wanbaohe/chess/screen/NewGameDropMenu.kt:236` calls `Spacer`, `height` and `feature/chess/src/main/java/com/wanbaohe/chess/screen/NewGameDropMenu.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 (13 lines × 2) feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/screen/components/CloudFileGrid.kt:267— feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/screen/components/CloudFileGrid.kt:267-279 | feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/screen/components/CloudFileGrid.kt:430-442 — 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/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/screen/components/CloudFileGrid.kt:267` 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) feature/common/src/main/java/com/shifenmiao/common/voice/FunAsrClient.kt:82— feature/common/src/main/java/com/shifenmiao/common/voice/FunAsrClient.kt:82-94 | feature/common/src/main/java/com/shifenmiao/common/voice/IFlytekAsrClient.kt:94-106 — 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 `feature/common/src/main/java/com/shifenmiao/common/voice/FunAsrClient.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 (13 lines × 2) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/data/AndroidImageDrawApplier.kt:146— feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/data/AndroidImageDrawApplier.kt:146-158 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/data/AndroidImageDrawApplier.kt:178-190 — 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/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/data/AndroidImageDrawApplier.kt:146` 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) feature/dsh-client/src/main/java/com/wanbaohe/dsh/connection/CloudRelayApi.kt:88— feature/dsh-client/src/main/java/com/wanbaohe/dsh/connection/CloudRelayApi.kt:88-100 | feature/dsh-client/src/main/java/com/wanbaohe/dsh/connection/CloudRelayApi.kt:162-174 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/dsh-client/src/main/java/com/wanbaohe/dsh/connection/CloudRelayApi.kt:88` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) REDACTED:302— REDACTED:302-314 | REDACTED:351-363 — 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 `REDACTED:302` 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) core/network/src/main/java/com/shifenmiao/network/di/NetworkModule.kt:85— core/network/src/main/java/com/shifenmiao/network/di/NetworkModule.kt:85-92 | core/network/src/main/java/com/shifenmiao/network/di/NetworkModule.kt:100-107 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/network/src/main/java/com/shifenmiao/network/di/NetworkModule.kt:85` 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, `core/network/src/main/java/com/shifenmiao/network/di/NetworkModule.kt:108` calls `addInterceptor`, `ErrorHandlingInterceptor` and `core/network/src/main/java/com/shifenmiao/network/di/NetworkModule.kt:93` 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 lines × 2) core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDatePickerDialog.kt:104— core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDatePickerDialog.kt:104-111 | core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDateRangePickerDialog.kt:98-105 — before extracting anything, compare `core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDatePickerDialog.kt` and `core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDateRangePickerDialog.kt` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 147 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 `core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDatePickerDialog.kt:104` 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) core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/blessing/BlessingEffectHost.kt:346— core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/blessing/BlessingEffectHost.kt:346-353 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/blessing/BlessingEffectHost.kt:463-471 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/blessing/BlessingEffectHost.kt:346` 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) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassSearchTextField.kt:66— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassSearchTextField.kt:66-73 | feature/ai/src/main/java/com/shifenmiao/ai/ui/AiBottomSheetCommon.kt:74-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. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassSearchTextField.kt:66` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassSearchTextField.kt:65` calls `size` and `feature/ai/src/main/java/com/shifenmiao/ai/ui/AiBottomSheetCommon.kt:73` 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 lines × 2) core/weather/src/nonfoss/java/com/wanbaohe/core/weather/data/source/QWeatherDataSource.kt:82— core/weather/src/nonfoss/java/com/wanbaohe/core/weather/data/source/QWeatherDataSource.kt:82-89 | core/weather/src/nonfoss/java/com/wanbaohe/core/weather/data/source/QWeatherDataSource.kt:128-135 — 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 `core/weather/src/nonfoss/java/com/wanbaohe/core/weather/data/source/QWeatherDataSource.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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `core/weather/src/nonfoss/java/com/wanbaohe/core/weather/data/source/QWeatherDataSource.kt:126` calls `number` and `core/weather/src/nonfoss/java/com/wanbaohe/core/weather/data/source/QWeatherDataSource.kt:80` 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) feature/ai/src/main/java/com/shifenmiao/ai/component/AIDuelChatComponent.kt:734— feature/ai/src/main/java/com/shifenmiao/ai/component/AIDuelChatComponent.kt:734-741 | feature/ai/src/main/java/com/shifenmiao/ai/component/AIDuelChatComponent.kt:942-949 — 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/ai/src/main/java/com/shifenmiao/ai/component/AIDuelChatComponent.kt:734` 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) feature/ai/src/main/java/com/shifenmiao/ai/component/AIDuelChatComponent.kt:792— feature/ai/src/main/java/com/shifenmiao/ai/component/AIDuelChatComponent.kt:792-799 | feature/ai/src/main/java/com/shifenmiao/ai/component/AIDuelChatComponent.kt:809-816 — 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/ai/src/main/java/com/shifenmiao/ai/component/AIDuelChatComponent.kt:792` 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 (8 lines × 2) feature/ai/src/main/java/com/shifenmiao/ai/service/AgentFileServiceImpl.kt:366— feature/ai/src/main/java/com/shifenmiao/ai/service/AgentFileServiceImpl.kt:366-373 | feature/ai/src/main/java/com/shifenmiao/ai/service/AgentFileServiceImpl.kt:395-402 — 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/ai/src/main/java/com/shifenmiao/ai/service/AgentFileServiceImpl.kt:366` 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) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:367— feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:367-374 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/screenLogic/WebpToolsComponent.kt:359-366 — before extracting anything, compare `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt` and `feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/screenLogic/WebpToolsComponent.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 53 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 (8 lines × 2) feature/app/src/main/java/com/wanbaohe/app/ui/VerifyContactSheet.kt:84— feature/app/src/main/java/com/wanbaohe/app/ui/VerifyContactSheet.kt:84-91 | feature/profile/src/main/java/com/wanbaohe/profile/screen/BindEmailSheet.kt:72-79 — before extracting anything, compare `feature/app/src/main/java/com/wanbaohe/app/ui/VerifyContactSheet.kt` and `feature/profile/src/main/java/com/wanbaohe/profile/screen/BindEmailSheet.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 75 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 `feature/app/src/main/java/com/wanbaohe/app/ui/VerifyContactSheet.kt:84` 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) feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/service/BookkeepingService.kt:529— feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/service/BookkeepingService.kt:529-536 | feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/service/BookkeepingService.kt:565-572 — 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/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/service/BookkeepingService.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 (8 lines × 2) feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:356— feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:356-363 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiGameComponent.kt:342-349 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt` and `feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiGameComponent.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 121 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. Note first that the copies are not typed on the same thing: `BoardPoint` names `com.wanbaohe.chess.domain.model.BoardPoint` in one and `com.wanbaohe.xiangqi.domain.model.BoardPoint` 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) feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt:427— feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt:427-434 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/router/screenLogic/XiangqiRouterComponent.kt:403-410 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt` and `feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/router/screenLogic/XiangqiRouterComponent.kt` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 131 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 (8 lines × 2) feature/common/src/main/java/com/shifenmiao/common/export/DataSyncScreen.kt:315— feature/common/src/main/java/com/shifenmiao/common/export/DataSyncScreen.kt:315-322 | feature/common/src/main/java/com/shifenmiao/common/export/DataSyncScreen.kt:453-460 — 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/common/src/main/java/com/shifenmiao/common/export/DataSyncScreen.kt:315` 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) feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/screenLogic/FormatConversionComponent.kt:260— feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/screenLogic/FormatConversionComponent.kt:260-267 | feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/screenLogic/LimitsResizeComponent.kt:204-211 — 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 `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/screenLogic/FormatConversionComponent.kt:260` 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) feature/marktodo/src/main/java/com/shifenmiao/marktodo/components/TaskMetadataSelectors.kt:124— feature/marktodo/src/main/java/com/shifenmiao/marktodo/components/TaskMetadataSelectors.kt:124-131 | feature/marktodo/src/main/java/com/shifenmiao/marktodo/components/TaskMetadataSelectors.kt:147-154 — 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/marktodo/src/main/java/com/shifenmiao/marktodo/components/TaskMetadataSelectors.kt:124` 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) feature/marktodo/src/main/java/com/shifenmiao/marktodo/screenLogic/AddTodoComponent.kt:275— feature/marktodo/src/main/java/com/shifenmiao/marktodo/screenLogic/AddTodoComponent.kt:275-282 | feature/marktodo/src/main/java/com/shifenmiao/marktodo/screenLogic/TodoDetailComponent.kt:188-195 — 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 `feature/marktodo/src/main/java/com/shifenmiao/marktodo/screenLogic/AddTodoComponent.kt:275` 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) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupDocumentCodec.kt:640— feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupDocumentCodec.kt:640-647 | feature/text-card/src/main/java/com/wanbaohe/textcard/data/project/TextCardDocumentCodec.kt:208-215 — 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) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/tools/ai/AiRectSelectOverlay.kt:144— feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/tools/ai/AiRectSelectOverlay.kt:144-151 | feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/tools/crop/CropToolScreen.kt:411-418 — before extracting anything, compare `feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/tools/ai/AiRectSelectOverlay.kt` and `feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/tools/crop/CropToolScreen.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 58 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 `feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/tools/ai/AiRectSelectOverlay.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. 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) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/tools/ai/AiRectSelectOverlay.kt:206— feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/tools/ai/AiRectSelectOverlay.kt:206-213 | feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/tools/crop/CropToolScreen.kt:482-489 — before extracting anything, compare `feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/tools/ai/AiRectSelectOverlay.kt` and `feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/tools/crop/CropToolScreen.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 58 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) feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/components/PdfPage.kt:108— feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/components/PdfPage.kt:108-115 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/root/components/viewer/LegacyPdfViewer.kt:263-270 — 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 `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/components/PdfPage.kt:108` 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 (8 lines × 2) feature/visual-automation/src/main/java/com/wanbaohe/visual/automation/VisualAutomationController.kt:233— feature/visual-automation/src/main/java/com/wanbaohe/visual/automation/VisualAutomationController.kt:233-240 | feature/visual-automation/src/main/java/com/wanbaohe/visual/automation/VisualAutomationController.kt:249-256 — 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/visual-automation/src/main/java/com/wanbaohe/visual/automation/VisualAutomationController.kt:233` 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) libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:837— libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:837-844 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:574-581 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt` as WHOLE FILES: this scan already matched 46 separate duplicated blocks between them, totalling at least 481 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 `libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:837` 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) core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:791— core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:791-798 | core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:805-812 — 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 `core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:791` 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) feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiSettingsScreen.kt:736— feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiSettingsScreen.kt:736-743 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/ui/XiangqiAiPickerBottomSheet.kt:201-208 — 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 (6 lines × 2) core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:284— core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:284-289 | core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:321-326 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/editor/EditorLayerBox.kt:546— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/editor/EditorLayerBox.kt:546-551 | feature/text-card/src/main/java/com/wanbaohe/textcard/presentation/editor/TextBlockTransformHandles.kt:293-298 — before extracting anything, compare `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/editor/EditorLayerBox.kt` and `feature/text-card/src/main/java/com/wanbaohe/textcard/presentation/editor/TextBlockTransformHandles.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 74 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 (6 lines × 2) feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:806— feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:806-811 | feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIPromptComponent.kt:831-836 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIPromptComponent.kt` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 360 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 `feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:806` 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) feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/component/BookkeepingComponent.kt:336— feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/component/BookkeepingComponent.kt:336-341 | feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/screen/tab/DetailTab.kt:574-579 — 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 `feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/component/BookkeepingComponent.kt:336` 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) feature/calendar/src/main/java/com/wanbaohe/calendar/ai/tool/LunarCalendarTool.kt:97— feature/calendar/src/main/java/com/wanbaohe/calendar/ai/tool/LunarCalendarTool.kt:97-102 | feature/calendar/src/main/java/com/wanbaohe/calendar/ai/tool/LunarConvertTool.kt:106-111 — 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 `feature/calendar/src/main/java/com/wanbaohe/calendar/ai/tool/LunarCalendarTool.kt:97` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 2) feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:406— feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:406-411 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiGameComponent.kt:384-390 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt` and `feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiGameComponent.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 121 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 `feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:406` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: `InteractionState` names `com.wanbaohe.chess.domain.InteractionState` in one and `com.wanbaohe.xiangqi.domain.InteractionState` 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) feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:420— feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:420-425 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiGameComponent.kt:399-405 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt` and `feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiGameComponent.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 121 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 `feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:420` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: `InteractionState` names `com.wanbaohe.chess.domain.InteractionState` in one and `com.wanbaohe.xiangqi.domain.InteractionState` 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) feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:844— feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:844-849 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuGameComponent.kt:972-977 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuGameComponent.kt` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 106 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. Note first that the copies are not typed on the same thing: `EngineSlot` names `com.wanbaohe.chess.application.port.outbound.EngineSlot` in one and `com.wanbaohe.gomoku.application.port.outbound.EngineSlot` 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) feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt:196— feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt:196-201 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/router/screenLogic/XiangqiRouterComponent.kt:220-226 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt` and `feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/router/screenLogic/XiangqiRouterComponent.kt` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 131 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: `EngineSlot` names `com.wanbaohe.chess.application.port.outbound.EngineSlot` in one and `com.wanbaohe.xiangqi.application.port.outbound.EngineSlot` 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) REDACTED:279— REDACTED:279-286 | REDACTED:339-344 — 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 `REDACTED:279` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (6 lines × 2) feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/ManageGameUseCase.kt:48— feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/ManageGameUseCase.kt:48-53 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/ManageGameUseCase.kt:49-54 — before extracting anything, compare `feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/ManageGameUseCase.kt` and `feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/ManageGameUseCase.kt` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 92 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. Note first that the copies are not typed on the same thing: `FenCodec` names `com.wanbaohe.gomoku.domain.FenCodec` in one and `com.wanbaohe.xiangqi.domain.FenCodec` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/ManageGameUseCase.kt:54` calls `getById` and `feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/ManageGameUseCase.kt:55` 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 (6 lines × 2) feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuAnalysisComponent.kt:322— feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuAnalysisComponent.kt:322-327 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuGameComponent.kt:780-785 — 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) feature/household-items/src/main/java/com/wanbaohe/householditems/service/HouseholdService.kt:100— feature/household-items/src/main/java/com/wanbaohe/householditems/service/HouseholdService.kt:100-105 | feature/household-items/src/main/java/com/wanbaohe/householditems/service/HouseholdService.kt:139-144 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `feature/household-items/src/main/java/com/wanbaohe/householditems/service/HouseholdService.kt:145` calls `currentTimeMillis` and `feature/household-items/src/main/java/com/wanbaohe/householditems/service/HouseholdService.kt:106` 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 (6 lines × 2) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupDocumentCodec.kt:399— feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupDocumentCodec.kt:399-404 | feature/text-card/src/main/java/com/wanbaohe/textcard/data/project/TextCardDocumentCodec.kt:362-368 — 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 `feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupDocumentCodec.kt:399` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: `LayerTransform` names `com.shifenmiao.model.editor.LayerTransform` in one and `com.wanbaohe.markuplayers.domain.model.LayerTransform` 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) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupProjectStore.kt:348— feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupProjectStore.kt:348-353 | feature/text-card/src/main/java/com/wanbaohe/textcard/data/project/AndroidTextCardProjectStore.kt:276-281 — before extracting anything, compare `feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupProjectStore.kt` and `feature/text-card/src/main/java/com/wanbaohe/textcard/data/project/AndroidTextCardProjectStore.kt` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 256 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) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/domain/model/LayerBaseRemap.kt:106— feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/domain/model/LayerBaseRemap.kt:106-111 | feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/domain/model/LayerBaseRemap.kt:320-325 — 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/markup-layers/src/main/java/com/wanbaohe/markuplayers/domain/model/LayerBaseRemap.kt:106` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaImage.kt:259— feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaImage.kt:259-264 | feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaImagePager.kt:354-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. Note first that the copies are not typed on the same thing: `CheckCircle` names `androidx.compose.material.icons.filled.CheckCircle` in one and `com.t8rin.imagetoolbox.core.resources.icons.CheckCircle` 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) feature/media-player/src/main/java/com/wanbaohe/media/ui/MediaLibraryContent.kt:459— feature/media-player/src/main/java/com/wanbaohe/media/ui/MediaLibraryContent.kt:459-464 | feature/media-player/src/main/java/com/wanbaohe/media/ui/VideoPlayerContent.kt:567-572 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (6 lines × 2) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidPieSubPipeline.kt:75— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidPieSubPipeline.kt:75-80 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlPieSubPipeline.kt:79-84 — before extracting anything, compare `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidPieSubPipeline.kt` and `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlPieSubPipeline.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidPieSubPipeline.kt:75` 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) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidTimelineSubPipeline.kt:134— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidTimelineSubPipeline.kt:134-139 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidTimelineSubPipeline.kt:144-150 — 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 `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidTimelineSubPipeline.kt:144` 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) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidXYChartSubPipeline.kt:177— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidXYChartSubPipeline.kt:177-182 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlXYChartSubPipeline.kt:121-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 `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidXYChartSubPipeline.kt:177` 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) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/block/HeadingRenderer.kt:30— libs/markdown/src/upstream/java/com/hrm/markdown/renderer/block/HeadingRenderer.kt:30-35 | libs/markdown/src/upstream/java/com/hrm/markdown/renderer/block/HeadingRenderer.kt:54-59 — 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 `libs/markdown/src/upstream/java/com/hrm/markdown/renderer/block/HeadingRenderer.kt:30` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `Heading` in one and `SetextHeading` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (6 lines × 2) core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:642— core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:642-647 | core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:897-902 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/content_pickers/ImagePicker.kt:216— core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/content_pickers/ImagePicker.kt:216-221 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/content_pickers/ImagePicker.kt:282-287 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/content_pickers/ImagePicker.kt:282` 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) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ManageGameUseCase.kt:193— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ManageGameUseCase.kt:193-198 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/ManageGameUseCase.kt:168-173 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ManageGameUseCase.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/ManageGameUseCase.kt` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 94 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 (5 lines × 2) core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:482— core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:482-486 | core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:946-950 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/UriUtils.kt:101— core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/UriUtils.kt:101-105 | core/utils/src/main/java/com/t8rin/imagetoolbox/core/utils/UriUtils.kt:387-391 — before extracting anything, compare `core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/UriUtils.kt` and `core/utils/src/main/java/com/t8rin/imagetoolbox/core/utils/UriUtils.kt` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 61 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/UriUtils.kt:101` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/UriUtils.kt:109— core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/UriUtils.kt:109-113 | core/utils/src/main/java/com/t8rin/imagetoolbox/core/utils/UriUtils.kt:395-399 — before extracting anything, compare `core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/UriUtils.kt` and `core/utils/src/main/java/com/t8rin/imagetoolbox/core/utils/UriUtils.kt` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 61 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/UriUtils.kt:109` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/editor/EditorLayerBox.kt:379— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/editor/EditorLayerBox.kt:379-383 | feature/text-card/src/main/java/com/wanbaohe/textcard/presentation/editor/TextBlockTransformHandles.kt:179-183 — before extracting anything, compare `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/editor/EditorLayerBox.kt` and `feature/text-card/src/main/java/com/wanbaohe/textcard/presentation/editor/TextBlockTransformHandles.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 74 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/editor/EditorLayerBox.kt:379` 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) feature/ai/src/main/java/com/shifenmiao/ai/screen/AIDuelChatScreen.kt:331— feature/ai/src/main/java/com/shifenmiao/ai/screen/AIDuelChatScreen.kt:331-335 | feature/ai/src/main/java/com/shifenmiao/ai/screen/AIDuelChatScreen.kt:337-341 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) feature/boardgame/src/main/java/com/wanbaohe/boardgame/ui/GameCard.kt:105— feature/boardgame/src/main/java/com/wanbaohe/boardgame/ui/GameCard.kt:105-109 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiLibraryScreen.kt:202-206 — 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 `feature/boardgame/src/main/java/com/wanbaohe/boardgame/ui/GameCard.kt:105` 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) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessSetupScreen.kt:191— feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessSetupScreen.kt:191-195 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuSetupScreen.kt:177-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 `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessSetupScreen.kt:191` 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: `SetupTool` names `com.wanbaohe.chess.domain.SetupTool` in one and `com.wanbaohe.gomoku.domain.SetupTool` 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 (5 lines × 2) feature/chess/src/main/java/com/wanbaohe/chess/ui/ChessOpponentPicker.kt:56— feature/chess/src/main/java/com/wanbaohe/chess/ui/ChessOpponentPicker.kt:56-61 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/ui/XiangqiOpponentPicker.kt:56-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. Read the line range as the matched WINDOW rather than a finished unit: at `feature/chess/src/main/java/com/wanbaohe/chess/ui/ChessOpponentPicker.kt:56` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) feature/common/src/main/java/com/shifenmiao/common/file/PngAigcInjector.kt:137— feature/common/src/main/java/com/shifenmiao/common/file/PngAigcInjector.kt:137-141 | feature/common/src/main/java/com/shifenmiao/common/file/PngAigcInjector.kt:151-155 — 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/common/src/main/java/com/shifenmiao/common/file/PngAigcInjector.kt:137` 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 (5 lines × 2) feature/lifetime/src/main/java/com/wanbaohe/lifetime/ai/tool/AddCountdownEventTool.kt:96— feature/lifetime/src/main/java/com/wanbaohe/lifetime/ai/tool/AddCountdownEventTool.kt:96-100 | feature/lifetime/src/main/java/com/wanbaohe/lifetime/ai/tool/AddLifeMilestoneTool.kt:96-100 — 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) feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/NewGameDropMenu.kt:85— feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/NewGameDropMenu.kt:85-89 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiPlayHomeScreen.kt:78-82 — 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) libs/diagram/src/upstream/java/com/hrm/diagram/render/export/FamilyOneShotRenderers.kt:123— libs/diagram/src/upstream/java/com/hrm/diagram/render/export/FamilyOneShotRenderers.kt:123-127 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidMindmapSubPipeline.kt:57-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 `libs/diagram/src/upstream/java/com/hrm/diagram/render/export/FamilyOneShotRenderers.kt:123` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (5 lines × 2) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidPieSubPipeline.kt:124— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidPieSubPipeline.kt:124-128 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlPieSubPipeline.kt:125-132 — before extracting anything, compare `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidPieSubPipeline.kt` and `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlPieSubPipeline.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidPieSubPipeline.kt:124` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (5 lines × 2) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlC4SubPipeline.kt:498— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlC4SubPipeline.kt:498-502 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlDitaaSubPipeline.kt:330-334 — 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 `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlC4SubPipeline.kt:498` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) core/base/src/main/java/com/shifenmiao/base/utils/ColorBuilder.kt:107— core/base/src/main/java/com/shifenmiao/base/utils/ColorBuilder.kt:107-111 | core/utils/src/main/java/com/wanbaohe/com/color/ColorGenerator.kt:168-172 — 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) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/switches/FluentSwitch.kt:211— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/switches/FluentSwitch.kt:211-215 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/switches/PixelSwitch.kt:175-179 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/switches/FluentSwitch.kt:211` 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) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/switches/FluentSwitch.kt:222— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/switches/FluentSwitch.kt:222-226 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/switches/PixelSwitch.kt:186-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 both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/switches/FluentSwitch.kt:222` 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) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/switches/FluentSwitch.kt:233— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/switches/FluentSwitch.kt:233-237 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/switches/PixelSwitch.kt:197-201 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/switches/FluentSwitch.kt:233` 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) feature/ai/src/main/java/com/shifenmiao/ai/component/AIDuelChatComponent.kt:179— feature/ai/src/main/java/com/shifenmiao/ai/component/AIDuelChatComponent.kt:179-183 | feature/ai/src/main/java/com/shifenmiao/ai/logic/ChatInputComponent.kt:111-115 — 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: the declarations holding them bind `categoryId` to `Int) = if (categoryId == 0` in one and `Int): Flow<List<PromptEntity>> = if (categoryId == 0` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (5 lines × 2) feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:902— feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:902-906 | feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIPromptComponent.kt:937-941 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIPromptComponent.kt` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 360 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) feature/chess/src/main/java/com/wanbaohe/chess/data/EngineMoveChooser.kt:112— feature/chess/src/main/java/com/wanbaohe/chess/data/EngineMoveChooser.kt:112-116 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/PikafishMoveChooser.kt:140-144 — 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) feature/chess/src/main/java/com/wanbaohe/chess/domain/GameResultResolver.kt:65— feature/chess/src/main/java/com/wanbaohe/chess/domain/GameResultResolver.kt:65-69 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/domain/GameResultResolver.kt:65-69 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/domain/GameResultResolver.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/domain/GameResultResolver.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 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. Note first that the copies are not typed on the same thing: `GameStatus` names `com.wanbaohe.chess.domain.model.GameStatus` in one and `com.wanbaohe.gomoku.domain.model.GameStatus` 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 (5 lines × 2) feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/protocol/ObjectStorageErrorParser.kt:40— feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/protocol/ObjectStorageErrorParser.kt:40-44 | feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/protocol/ObjectStorageXmlParser.kt:106-110 — 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 (5 lines × 2) feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/AwsSigV4Signer.kt:148— feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/AwsSigV4Signer.kt:148-152 | feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/BaiduBosSigner.kt:149-153 — before extracting anything, compare `feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/AwsSigV4Signer.kt` and `feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/BaiduBosSigner.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) feature/id-photo/src/main/java/com/wanbaohe/idphoto/presentation/components/IdPhotoExportConfigPanel.kt:328— feature/id-photo/src/main/java/com/wanbaohe/idphoto/presentation/components/IdPhotoExportConfigPanel.kt:328-332 | feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/export/ExportSettingsSheet.kt:762-766 — 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 (17 lines × 2) core/data/src/main/java/com/t8rin/imagetoolbox/core/data/image/AndroidImageScaler.kt:191— core/data/src/main/java/com/t8rin/imagetoolbox/core/data/image/AndroidImageScaler.kt:191-207 | core/data/src/main/java/com/t8rin/imagetoolbox/core/data/image/AndroidImageScaler.kt:269-285 — 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 (17 lines × 2) core/data/src/main/java/com/t8rin/imagetoolbox/core/data/image/AndroidImageScaler.kt:236— core/data/src/main/java/com/t8rin/imagetoolbox/core/data/image/AndroidImageScaler.kt:236-252 | core/data/src/main/java/com/t8rin/imagetoolbox/core/data/image/AndroidImageScaler.kt:317-333 — 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 `core/data/src/main/java/com/t8rin/imagetoolbox/core/data/image/AndroidImageScaler.kt:236` 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 (17 lines × 2) core/data/src/main/java/com/t8rin/imagetoolbox/core/data/utils/UriUtils.kt:135— core/data/src/main/java/com/t8rin/imagetoolbox/core/data/utils/UriUtils.kt:135-151 | core/utils/src/main/java/com/t8rin/imagetoolbox/core/utils/UriUtils.kt:168-184 — before extracting anything, compare `core/data/src/main/java/com/t8rin/imagetoolbox/core/data/utils/UriUtils.kt` and `core/utils/src/main/java/com/t8rin/imagetoolbox/core/utils/UriUtils.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 77 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 `core/data/src/main/java/com/t8rin/imagetoolbox/core/data/utils/UriUtils.kt:135` 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 × 2) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterItem.kt:286— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterItem.kt:286-302 | feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/components/StackImageItem.kt:153-169 — 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 `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterItem.kt:286` 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 × 2) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberColorModelColorModelTripleItem.kt:98— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberColorModelColorModelTripleItem.kt:98-114 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberColorModelColorModelTripleItem.kt:116-132 — 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 (17 lines × 2) core/model/src/main/java/com/shifenmiao/model/ai/AiModel.kt:282— core/model/src/main/java/com/shifenmiao/model/ai/AiModel.kt:282-298 | core/model/src/main/java/com/shifenmiao/model/ai/AiModel.kt:493-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 `core/model/src/main/java/com/shifenmiao/model/ai/AiModel.kt:282` 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 (17 lines × 2) core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseTimeRangePickerDialog.kt:127— core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseTimeRangePickerDialog.kt:127-143 | core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseTimeRangePickerDialog.kt:145-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 `core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseTimeRangePickerDialog.kt:127` 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) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedTimeFilterBar.kt:124— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedTimeFilterBar.kt:124-140 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedTimeFilterBar.kt:173-189 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedTimeFilterBar.kt:124` 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) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassIconButton.kt:60— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassIconButton.kt:60-76 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassIconButton.kt:128-144 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassIconButton.kt:60` 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) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassProgressIndicator.kt:57— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassProgressIndicator.kt:57-73 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassProgressIndicator.kt:94-110 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassProgressIndicator.kt:57` 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) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassProgressIndicator.kt:136— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassProgressIndicator.kt:136-152 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassProgressIndicator.kt:173-189 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassProgressIndicator.kt:136` 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) feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/AddWatermarkTool.kt:225— feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/AddWatermarkTool.kt:225-241 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ConvertImageFormatTool.kt:170-186 — 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 `feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/AddWatermarkTool.kt:225` 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) feature/ai/src/main/java/com/shifenmiao/ai/content/MessageComponents.kt:259— feature/ai/src/main/java/com/shifenmiao/ai/content/MessageComponents.kt:259-275 | feature/ai/src/main/java/com/shifenmiao/ai/screen/AIDuelChatScreen.kt:1990-2006 — 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 `feature/ai/src/main/java/com/shifenmiao/ai/content/MessageComponents.kt:259` 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) feature/ai/src/main/java/com/shifenmiao/ai/service/AgentCreationService.kt:251— feature/ai/src/main/java/com/shifenmiao/ai/service/AgentCreationService.kt:251-267 | feature/ai/src/main/java/com/shifenmiao/ai/service/PromptCreationService.kt:245-261 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/service/AgentCreationService.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/service/PromptCreationService.kt` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 107 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 `feature/ai/src/main/java/com/shifenmiao/ai/service/AgentCreationService.kt:251` 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 × 2) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:320— feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:320-336 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt:320-336 — before extracting anything, compare `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt` and `feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 239 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 `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:320` 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) feature/calendar/src/main/java/com/wanbaohe/calendar/ui/ConversionTab.kt:526— feature/calendar/src/main/java/com/wanbaohe/calendar/ui/ConversionTab.kt:526-542 | feature/calendar/src/main/java/com/wanbaohe/calendar/ui/ConversionTab.kt:680-696 — 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/calendar/src/main/java/com/wanbaohe/calendar/ui/ConversionTab.kt:526` 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) feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/presentation/components/ExportConfigPanel.kt:92— feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/presentation/components/ExportConfigPanel.kt:92-108 | feature/id-photo/src/main/java/com/wanbaohe/idphoto/presentation/components/IdPhotoExportConfigPanel.kt:120-136 — before extracting anything, compare `feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/presentation/components/ExportConfigPanel.kt` and `feature/id-photo/src/main/java/com/wanbaohe/idphoto/presentation/components/IdPhotoExportConfigPanel.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 49 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 `feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/presentation/components/ExportConfigPanel.kt:92` 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 (17 lines × 2) feature/chess/src/main/java/com/wanbaohe/chess/data/GameDaoAdapter.kt:108— feature/chess/src/main/java/com/wanbaohe/chess/data/GameDaoAdapter.kt:108-124 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/GameDaoAdapter.kt:106-122 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/data/GameDaoAdapter.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/GameDaoAdapter.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.
Duplicated block (17 lines × 2) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessPlayHomeScreen.kt:170— feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessPlayHomeScreen.kt:170-186 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiPlayHomeScreen.kt:185-201 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessPlayHomeScreen.kt` and `feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiPlayHomeScreen.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 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 `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessPlayHomeScreen.kt:170` 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) REDACTED:465— REDACTED:465-481 | REDACTED:612-628 — 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 `REDACTED:465` 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 × 2) feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/ImageCutterContent.kt:97— feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/ImageCutterContent.kt:97-113 | feature/image-splitting/src/main/java/com/t8rin/imagetoolbox/image_splitting/presentation/ImageSplitterContent.kt:90-106 — 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 `feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/ImageCutterContent.kt:97` 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 `component` to `ImageCutterComponent` in one and `ImageSplitterComponent` 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 (17 lines × 2) feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/screenLogic/ImageStackingComponent.kt:186— feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/screenLogic/ImageStackingComponent.kt:186-202 | feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/screenLogic/ImageStackingComponent.kt:243-259 — 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/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/screenLogic/ImageStackingComponent.kt:186` 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) feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/ImageStitchingContent.kt:278— feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/ImageStitchingContent.kt:278-294 | feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt:352-368 — 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 `feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/ImageStitchingContent.kt:278` 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 (17 lines × 2) feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/screenLogic/ImageStitchingComponent.kt:207— feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/screenLogic/ImageStitchingComponent.kt:207-223 | feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/screenLogic/ImageStitchingComponent.kt:310-326 — 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/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/screenLogic/ImageStitchingComponent.kt:207` 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) feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeAddCountdownScreen.kt:243— feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeAddCountdownScreen.kt:243-259 | feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeAddMilestoneScreen.kt:228-244 — before extracting anything, compare `feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeAddCountdownScreen.kt` and `feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeAddMilestoneScreen.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 125 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 `feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeAddCountdownScreen.kt:243` 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) core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/DateInputRenderer.kt:74— core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/DateInputRenderer.kt:74-88 | core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/TimeInputRenderer.kt:69-83 — before extracting anything, compare `core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/DateInputRenderer.kt` and `core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/TimeInputRenderer.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/DateInputRenderer.kt:74` 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) core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/GridSelectorRenderer.kt:70— core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/GridSelectorRenderer.kt:70-84 | core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/RowSelectorRenderer.kt:69-83 — before extracting anything, compare `core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/GridSelectorRenderer.kt` and `core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/RowSelectorRenderer.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 51 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 `core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/GridSelectorRenderer.kt:70` 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) core/base/src/main/java/com/wanbaohe/base/ui/TextFields.kt:154— core/base/src/main/java/com/wanbaohe/base/ui/TextFields.kt:154-169 | core/base/src/main/java/com/wanbaohe/base/ui/TextFields.kt:195-209 — 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 `core/base/src/main/java/com/wanbaohe/base/ui/TextFields.kt:195` 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 (15 lines × 2) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterTemplateInfoSheet.kt:395— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterTemplateInfoSheet.kt:395-409 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/TemplateFilterSelectionItem.kt:90-104 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (15 lines × 2) core/image-generation/src/main/java/com/shifenmiao/imagegeneration/provider/hunyuan/HunyuanImageProvider.kt:79— core/image-generation/src/main/java/com/shifenmiao/imagegeneration/provider/hunyuan/HunyuanImageProvider.kt:79-93 | core/image-generation/src/main/java/com/shifenmiao/imagegeneration/provider/qwen/QwenImageProvider.kt:79-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 `core/image-generation/src/main/java/com/shifenmiao/imagegeneration/provider/hunyuan/HunyuanImageProvider.kt:79` 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) core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/SaveResultHandler.kt:89— core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/SaveResultHandler.kt:89-103 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/SaveResultHandler.kt:117-131 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/SaveResultHandler.kt:89` 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) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassAssistChip.kt:107— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassAssistChip.kt:107-121 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassAssistChip.kt:188-202 — 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 (15 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/modifier/ObservePointersCount.kt:50— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/modifier/ObservePointersCount.kt:50-64 | libs/gesture/src/main/java/com/t8rin/gesture/TransformGesture.kt:349-363 — before extracting anything, compare `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/modifier/ObservePointersCount.kt` and `libs/gesture/src/main/java/com/t8rin/gesture/TransformGesture.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/modifier/ObservePointersCount.kt:50` 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) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/sliders/custom_slider/CustomRangeSlider.kt:483— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/sliders/custom_slider/CustomRangeSlider.kt:483-497 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/sliders/custom_slider/CustomRangeSlider.kt:542-556 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/sliders/custom_slider/CustomRangeSlider.kt:483` 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) feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/AgentToolRegistry.kt:382— feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/AgentToolRegistry.kt:382-396 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/AgentToolRegistry.kt:425-439 — 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/ai/src/main/java/com/shifenmiao/ai/agent/tool/AgentToolRegistry.kt:382` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (15 lines × 2) feature/ai/src/main/java/com/shifenmiao/ai/screen/AIChatScreen.kt:163— feature/ai/src/main/java/com/shifenmiao/ai/screen/AIChatScreen.kt:163-177 | feature/ai/src/main/java/com/shifenmiao/ai/screen/AITabChatScreen.kt:74-88 — 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 `feature/ai/src/main/java/com/shifenmiao/ai/screen/AIChatScreen.kt:163` 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) feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:174— feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:174-188 | feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt:174-188 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 625 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `component` to `CreateAIAgentComponent` in one and `CreateAIPromptComponent` 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 (15 lines × 2) feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:962— feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:962-976 | feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt:958-972 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 625 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 `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:962` 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) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:165— feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:165-179 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt:164-178 — before extracting anything, compare `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt` and `feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 239 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 `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:165` 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) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:181— feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:181-195 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt:180-194 — before extracting anything, compare `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt` and `feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 239 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 `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:181` 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) feature/chess/src/main/java/com/wanbaohe/chess/data/EngineMoveChooser.kt:73— feature/chess/src/main/java/com/wanbaohe/chess/data/EngineMoveChooser.kt:73-87 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/EngineMoveChooser.kt:74-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. Read the line range as the matched WINDOW rather than a finished unit: at `feature/chess/src/main/java/com/wanbaohe/chess/data/EngineMoveChooser.kt:73` 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) feature/chess/src/main/java/com/wanbaohe/chess/domain/FenCodec.kt:112— feature/chess/src/main/java/com/wanbaohe/chess/domain/FenCodec.kt:112-126 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/domain/FenCodec.kt:87-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: `BoardPoint` names `com.wanbaohe.chess.domain.model.BoardPoint` in one and `com.wanbaohe.xiangqi.domain.model.BoardPoint` 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) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt:111— feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt:111-125 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiAnalysisScreen.kt:111-125 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt` and `feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiAnalysisScreen.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 211 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 `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt:111` 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: the declarations holding them bind `component` to `ChessAnalysisComponent` in one and `XiangqiAnalysisComponent` 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 (15 lines × 2) feature/collage-maker/src/main/java/com/t8rin/imagetoolbox/collage_maker/presentation/screenLogic/CollageMakerComponent.kt:238— feature/collage-maker/src/main/java/com/t8rin/imagetoolbox/collage_maker/presentation/screenLogic/CollageMakerComponent.kt:238-252 | feature/collage-maker/src/main/java/com/t8rin/imagetoolbox/collage_maker/presentation/screenLogic/CollageMakerComponent.kt:267-281 — 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/collage-maker/src/main/java/com/t8rin/imagetoolbox/collage_maker/presentation/screenLogic/CollageMakerComponent.kt:238` 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) feature/common/src/main/java/com/shifenmiao/common/components/comments/CommentsComponent.kt:292— feature/common/src/main/java/com/shifenmiao/common/components/comments/CommentsComponent.kt:292-306 | feature/common/src/main/java/com/shifenmiao/common/components/comments/CommentsComponent.kt:323-337 — 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/common/src/main/java/com/shifenmiao/common/components/comments/CommentsComponent.kt:292` 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) feature/compare/src/main/java/com/t8rin/imagetoolbox/feature/compare/presentation/components/CompareScreenContentImpl.kt:175— feature/compare/src/main/java/com/t8rin/imagetoolbox/feature/compare/presentation/components/CompareScreenContentImpl.kt:175-189 | feature/compare/src/main/java/com/t8rin/imagetoolbox/feature/compare/presentation/components/CompareScreenContentImpl.kt:218-232 — 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/compare/src/main/java/com/t8rin/imagetoolbox/feature/compare/presentation/components/CompareScreenContentImpl.kt:175` 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) feature/compass/src/main/java/com/wanbaohe/compass/screen/CompassScreen.kt:189— feature/compass/src/main/java/com/wanbaohe/compass/screen/CompassScreen.kt:189-203 | feature/measurement/src/main/java/com/wanbaohe/measurement/screen/MeasurementScreen.kt:463-477 — 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 `feature/compass/src/main/java/com/wanbaohe/compass/screen/CompassScreen.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.
Duplicated block (15 lines × 2) feature/compass/src/main/java/com/wanbaohe/compass/ui/ClassicCompassPage.kt:63— feature/compass/src/main/java/com/wanbaohe/compass/ui/ClassicCompassPage.kt:63-77 | feature/compass/src/main/java/com/wanbaohe/compass/ui/luopan/LuopanPage.kt:70-84 — 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 `feature/compass/src/main/java/com/wanbaohe/compass/ui/ClassicCompassPage.kt:63` 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) feature/crop/src/main/java/com/t8rin/imagetoolbox/feature/crop/presentation/screenLogic/CropComponent.kt:292— feature/crop/src/main/java/com/t8rin/imagetoolbox/feature/crop/presentation/screenLogic/CropComponent.kt:292-306 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/screenLogic/DrawComponent.kt:432-446 — 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 `feature/crop/src/main/java/com/t8rin/imagetoolbox/feature/crop/presentation/screenLogic/CropComponent.kt:292` 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) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/data/AndroidImageDrawApplier.kt:179— feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/data/AndroidImageDrawApplier.kt:179-193 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/UiPathPaintCanvasAction.kt:148-163 — 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.
+ 16 more in this group — see findings.md.
DM11 · Constructible invalid state· Constructible in an invalid state · ×40
Constructible in an invalid state: ActivityLogEntity core/database/src/main/java/com/shifenmiao/database/activity/entity/ActivityLogEntity.kt:45— `ActivityLogEntity`'s public constructor takes `category`, `appTitle`, `title`, `description`, … 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `ActivityLogEntity` 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: ItemAgentEntity core/database/src/main/java/com/shifenmiao/database/agent/entity/ItemAgentEntity.kt:38— `ItemAgentEntity`'s public constructor takes `documentId`, `title`, `description`, `header`, … 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `ItemAgentEntity` 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: AiEngineEntity core/database/src/main/java/com/shifenmiao/database/ai/entity/AiEngineEntity.kt:46— `AiEngineEntity`'s public constructor takes `name`, `title`, `iconName`, `description`, … 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `AiEngineEntity` 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: AiModelEntity core/database/src/main/java/com/shifenmiao/database/ai/entity/AiModelEntity.kt:39— `AiModelEntity`'s public constructor takes `name`, `title`, `description`, `temperature`, … 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `AiModelEntity` 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: ConversationEntity core/database/src/main/java/com/shifenmiao/database/ai/entity/ConversationEntity.kt:44— `ConversationEntity`'s public constructor takes `conversationId`, `entryType`, `entryRefId`, `appTitle`, … 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `ConversationEntity` 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: ConversationMemoryPolicyEntity core/database/src/main/java/com/shifenmiao/database/ai/entity/ConversationMemoryPolicyEntity.kt:32— `ConversationMemoryPolicyEntity`'s public constructor takes `conversationId` 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `ConversationMemoryPolicyEntity` 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: ConversationToolPolicyEntity core/database/src/main/java/com/shifenmiao/database/ai/entity/ConversationToolPolicyEntity.kt:31— `ConversationToolPolicyEntity`'s public constructor takes `conversationId`, `enabledToolNamesJson` 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `ConversationToolPolicyEntity` 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: MemoryEntryEntity core/database/src/main/java/com/shifenmiao/database/ai/entity/MemoryEntryEntity.kt:38— `MemoryEntryEntity`'s public constructor takes `kind`, `content`, `sourceConversationId` 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `MemoryEntryEntity` 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: MessageEntity core/database/src/main/java/com/shifenmiao/database/ai/entity/MessageEntity.kt:40— `MessageEntity`'s public constructor takes `completionId`, `conversationId`, `role`, `question`, … 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `MessageEntity` 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: SkillEntity core/database/src/main/java/com/shifenmiao/database/ai/entity/SkillEntity.kt:32— `SkillEntity`'s public constructor takes `id`, `name`, `description`, `body`, … 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `SkillEntity` 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: ToolBindingEntity core/database/src/main/java/com/shifenmiao/database/ai/entity/ToolBindingEntity.kt:39— `ToolBindingEntity`'s public constructor takes `ownerType`, `toolName` 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `ToolBindingEntity` 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: ToolCallTaskEntity core/database/src/main/java/com/shifenmiao/database/ai/entity/ToolCallTaskEntity.kt:44— `ToolCallTaskEntity`'s public constructor takes `id`, `conversationId`, `completionId`, `toolName`, … 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `ToolCallTaskEntity` 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: ToolCatalogEntity core/database/src/main/java/com/shifenmiao/database/ai/entity/ToolCatalogEntity.kt:54— `ToolCatalogEntity`'s public constructor takes `name`, `title`, `summary`, `description`, … 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `ToolCatalogEntity` 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: AiDetectRecordEntity core/database/src/main/java/com/shifenmiao/database/aidetect/entity/AiDetectRecordEntity.kt:31— `AiDetectRecordEntity`'s public constructor takes `type`, `inputSummary`, `verdict`, `detailJson` 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `AiDetectRecordEntity` 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: AltitudeRecordEntity core/database/src/main/java/com/shifenmiao/database/altitude/entity/AltitudeRecordEntity.kt:30— `AltitudeRecordEntity`'s public constructor takes `source`, `latitude`, `longitude`, `title`, … 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `AltitudeRecordEntity` 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: AuthCodeEntity core/database/src/main/java/com/shifenmiao/database/authcode/entity/AuthCodeEntity.kt:38— `AuthCodeEntity`'s public constructor takes `id`, `codeHash`, `salt` 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `AuthCodeEntity` 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: BlessingRecordEntity core/database/src/main/java/com/shifenmiao/database/blessing/entity/BlessingRecordEntity.kt:34— `BlessingRecordEntity`'s public constructor takes `id`, `date`, `type` 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `BlessingRecordEntity` 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: BlessingTabConfigEntity core/database/src/main/java/com/shifenmiao/database/blessing/entity/BlessingTabConfigEntity.kt:34— `BlessingTabConfigEntity`'s public constructor takes `date`, `type`, `title`, `subtitle` 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `BlessingTabConfigEntity` 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: BlessingWishEntity core/database/src/main/java/com/shifenmiao/database/blessing/entity/BlessingWishEntity.kt:31— `BlessingWishEntity`'s public constructor takes `date`, `type`, `content` 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `BlessingWishEntity` 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: BlogArticleEntity core/database/src/main/java/com/shifenmiao/database/blog/entity/BlogArticleEntity.kt:41— `BlogArticleEntity`'s public constructor takes `title`, `summary`, `content`, `authorName`, … 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `BlogArticleEntity` 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: BookkeepingCategoryEntity core/database/src/main/java/com/shifenmiao/database/bookkeeping/entity/BookkeepingCategoryEntity.kt:27— `BookkeepingCategoryEntity`'s public constructor takes `id`, `name`, `iconKey` 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `BookkeepingCategoryEntity` 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: BookkeepingRecordEntity core/database/src/main/java/com/shifenmiao/database/bookkeeping/entity/BookkeepingRecordEntity.kt:45— `BookkeepingRecordEntity`'s public constructor takes `id`, `categoryId`, `note` 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `BookkeepingRecordEntity` 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: PromptEntity core/database/src/main/java/com/shifenmiao/database/chat_prompt/entity/PromptEntity.kt:42— `PromptEntity`'s public constructor takes `documentId`, `title`, `description`, `prompt`, … 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `PromptEntity` 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: ChessGameEntity core/database/src/main/java/com/shifenmiao/database/chess/entity/ChessEntities.kt:28— `ChessGameEntity`'s public constructor takes `id`, `title`, `mode`, `redPlayerType`, … 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `ChessGameEntity` 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: ChessPlyEntity core/database/src/main/java/com/shifenmiao/database/chess/entity/ChessEntities.kt:61— `ChessPlyEntity`'s public constructor takes `id`, `gameId`, `moveUcci`, `moveCn`, … 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`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `ChessPlyEntity` 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.
Swallowed exception (empty catch) web/file_viewer/src/docx-night.js:175— 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) REDACTED:429— 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) REDACTED:430— 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) REDACTED:474— `.catch(function(){})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
Swallowed exception (empty catch) REDACTED:1874— 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) REDACTED:1973— 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) REDACTED:2388— 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) REDACTED:2644— 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) REDACTED:2648— `.then(…, function(){})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
Swallowed exception (empty catch) REDACTED:2830— 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) web/file_viewer/src/find.js:424— 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) web/file_viewer/src/xlsx.js:20— 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) web/file_transfer/js/bootstrap.js:422— 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) web/file_transfer/js/features/upload/upload.js:345— 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) web/file_transfer/js/features/transfer/transfers.js:49— 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) web/file_transfer/js/features/transfer/transfers.js:72— 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) web/file_transfer/js/features/files/files.js:61— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) web/file_transfer/js/features/files/render.js:93— 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) web/file_transfer/js/features/chat/channel.js:19— 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) web/file_transfer/js/features/chat/channel.js:34— 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) web/file_transfer/js/features/chat/channel.js:40— 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) web/file_transfer/js/features/chat/fileUpload.js:59— `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
Swallowed exception (empty catch) web/file_transfer/js/features/chat/fileUpload.js:116— 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) web/file_transfer/js/features/chat/fileUpload.js:179— 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) web/file_transfer/js/features/chat/ui.js:42— 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.
Duplicated block (16 lines × 2) core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/display/TextRenderer.kt:75— core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/display/TextRenderer.kt:75-90 | core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:1479-1494 — 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 `core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/display/TextRenderer.kt:75` 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 `style` to `String?): TextStyle = when (style` in one and `String?) = when (style` 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 (16 lines × 2) core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/FilePickerRenderer.kt:91— core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/FilePickerRenderer.kt:91-106 | core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/ImagePickerRenderer.kt:76-91 — before extracting anything, compare `core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/FilePickerRenderer.kt` and `core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/ImagePickerRenderer.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/FilePickerRenderer.kt:91` 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 (16 lines × 2) core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDatePickerDialog.kt:361— core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDatePickerDialog.kt:361-376 | core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDatePickerDialog.kt:379-394 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDatePickerDialog.kt:361` 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 (16 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/color_picker/ColorTuplePicker.kt:233— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/color_picker/ColorTuplePicker.kt:233-248 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/color_picker/ColorTuplePicker.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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/color_picker/ColorTuplePicker.kt:233` 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 (16 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/page/PageInputField.kt:48— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/page/PageInputField.kt:48-63 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/components/PageInputField.kt:48-63 — before extracting anything, compare `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/page/PageInputField.kt` and `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/components/PageInputField.kt` as WHOLE FILES: 93% 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/page/PageInputField.kt:48` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/dialogs/DecisionWheelDialog.kt:173— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/dialogs/DecisionWheelDialog.kt:173-188 | feature/decision-wheel/src/main/java/com/wanbaohe/decisionwheel/screen/DecisionWheelSpinScreen.kt:426-441 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/dialogs/DecisionWheelDialog.kt:173` 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.t8rin.imagetoolbox.core.resources.R` in one and `com.wanbaohe.decisionwheel.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) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedModalBottomSheet.kt:210— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedModalBottomSheet.kt:210-225 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedModalBottomSheet.kt:293-308 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedModalBottomSheet.kt:210` 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) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/other/ToastHost.kt:291— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/other/ToastHost.kt:291-306 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/other/ToastHost.kt:359-374 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/other/ToastHost.kt:291` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) feature/ai/src/main/java/com/shifenmiao/ai/content/AIChatHistory.kt:124— feature/ai/src/main/java/com/shifenmiao/ai/content/AIChatHistory.kt:124-139 | feature/ai/src/main/java/com/shifenmiao/ai/content/AIChatHistory.kt:159-174 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/ai/src/main/java/com/shifenmiao/ai/content/AIChatHistory.kt:124` 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) feature/calendar/src/main/java/com/wanbaohe/calendar/share/CalendarShareCardRenderer.kt:456— feature/calendar/src/main/java/com/wanbaohe/calendar/share/CalendarShareCardRenderer.kt:456-472 | feature/calendar/src/main/java/com/wanbaohe/calendar/share/CalendarShareCardRenderer.kt:547-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. Read the line range as the matched WINDOW rather than a finished unit: at `feature/calendar/src/main/java/com/wanbaohe/calendar/share/CalendarShareCardRenderer.kt:456` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) feature/calendar/src/main/java/com/wanbaohe/calendar/ui/AuspiciousDayTab.kt:131— feature/calendar/src/main/java/com/wanbaohe/calendar/ui/AuspiciousDayTab.kt:131-146 | feature/calendar/src/main/java/com/wanbaohe/calendar/ui/AuspiciousDayTab.kt:148-163 — 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 (16 lines × 2) feature/calendar/src/main/java/com/wanbaohe/calendar/ui/CalendarTab.kt:527— feature/calendar/src/main/java/com/wanbaohe/calendar/ui/CalendarTab.kt:527-542 | feature/calendar/src/main/java/com/wanbaohe/calendar/ui/CalendarTab.kt:701-716 — 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/calendar/src/main/java/com/wanbaohe/calendar/ui/CalendarTab.kt:527` 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) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/PlayMoveUseCase.kt:123— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/PlayMoveUseCase.kt:123-138 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/PlayMoveUseCase.kt:66-81 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/PlayMoveUseCase.kt` and `feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/PlayMoveUseCase.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 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 `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/PlayMoveUseCase.kt:123` 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: `GameStatus` names `com.wanbaohe.chess.domain.model.GameStatus` in one and `com.wanbaohe.xiangqi.domain.model.GameStatus` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/PlayMoveUseCase.kt:121` calls `statusAfterHistoryChange` and `feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/PlayMoveUseCase.kt:65` 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 (16 lines × 2) feature/chess/src/main/java/com/wanbaohe/chess/data/GameDaoAdapter.kt:68— feature/chess/src/main/java/com/wanbaohe/chess/data/GameDaoAdapter.kt:68-83 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/GameDaoAdapter.kt:66-81 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/data/GameDaoAdapter.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/GameDaoAdapter.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 `feature/chess/src/main/java/com/wanbaohe/chess/data/GameDaoAdapter.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. Note first that the copies are not typed on the same thing: `GameEntity` names `com.wanbaohe.chess.application.port.outbound.GameEntity` in one and `com.wanbaohe.gomoku.application.port.outbound.GameEntity` 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) feature/code-editor/src/main/java/com/wanbaohe/code/editor/screen/CodeEditorScreen.kt:219— feature/code-editor/src/main/java/com/wanbaohe/code/editor/screen/CodeEditorScreen.kt:219-234 | feature/markdown-edit/src/main/java/com/wanbaohe/markdown/edit/screen/MarkdownEditorScreen.kt:210-225 — before extracting anything, compare `feature/code-editor/src/main/java/com/wanbaohe/code/editor/screen/CodeEditorScreen.kt` and `feature/markdown-edit/src/main/java/com/wanbaohe/markdown/edit/screen/MarkdownEditorScreen.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 101 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 `feature/code-editor/src/main/java/com/wanbaohe/code/editor/screen/CodeEditorScreen.kt:219` 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. Note first that the copies are not typed on the same thing: `Icons` names `androidx.compose.material.icons.Icons` in one and `com.t8rin.imagetoolbox.core.resources.Icons` 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) feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/DeleteExifContent.kt:282— feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/DeleteExifContent.kt:282-297 | feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt:404-419 — before extracting anything, compare `feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/DeleteExifContent.kt` and `feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 66 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 `feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/DeleteExifContent.kt:282` 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) feature/device-status/src/main/java/com/wanbaohe/devicestatus/screen/DeviceStatusScreen.kt:230— feature/device-status/src/main/java/com/wanbaohe/devicestatus/screen/DeviceStatusScreen.kt:230-245 | feature/device-status/src/main/java/com/wanbaohe/devicestatus/screen/DeviceStatusScreen.kt:261-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 `feature/device-status/src/main/java/com/wanbaohe/devicestatus/screen/DeviceStatusScreen.kt:230` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/NewGameDropMenu.kt:258— feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/NewGameDropMenu.kt:258-273 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/NewGameDropMenu.kt:255-270 — before extracting anything, compare `feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/NewGameDropMenu.kt` and `feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/NewGameDropMenu.kt` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 164 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 `feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/NewGameDropMenu.kt:258` 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) feature/image-splitting/src/main/java/com/t8rin/imagetoolbox/image_splitting/presentation/components/SplitParamsSelector.kt:71— feature/image-splitting/src/main/java/com/t8rin/imagetoolbox/image_splitting/presentation/components/SplitParamsSelector.kt:71-86 | feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/components/StitchModeSelector.kt:114-129 — 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 `feature/image-splitting/src/main/java/com/t8rin/imagetoolbox/image_splitting/presentation/components/SplitParamsSelector.kt:71` 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) feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeCountdownDetailScreen.kt:175— feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeCountdownDetailScreen.kt:175-190 | feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeMilestoneDetailScreen.kt:148-163 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeCountdownDetailScreen.kt:175` 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) feature/lifetime/src/main/java/com/wanbaohe/lifetime/ai/tool/AddCountdownEventTool.kt:114— feature/lifetime/src/main/java/com/wanbaohe/lifetime/ai/tool/AddCountdownEventTool.kt:114-129 | feature/lifetime/src/main/java/com/wanbaohe/lifetime/ai/tool/AddLifeMilestoneTool.kt:114-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. Read the line range as the matched WINDOW rather than a finished unit: at `feature/lifetime/src/main/java/com/wanbaohe/lifetime/ai/tool/AddCountdownEventTool.kt:114` 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) feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/screenLogic/LimitsResizeComponent.kt:355— feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/screenLogic/LimitsResizeComponent.kt:355-370 | feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/screenLogic/LimitsResizeComponent.kt:390-405 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/screenLogic/LimitsResizeComponent.kt:355` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) feature/markdown-edit/src/main/java/com/wanbaohe/markdown/edit/component/MarkdownEditorComponent.kt:330— feature/markdown-edit/src/main/java/com/wanbaohe/markdown/edit/component/MarkdownEditorComponent.kt:330-345 | feature/markdown-edit/src/main/java/com/wanbaohe/markdown/edit/component/MarkdownEditorComponent.kt:392-407 — 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/markdown-edit/src/main/java/com/wanbaohe/markdown/edit/component/MarkdownEditorComponent.kt:330` 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 (16 lines × 2) feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/components/PdfPage.kt:161— feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/components/PdfPage.kt:161-176 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/root/components/viewer/LegacyPdfViewer.kt:313-328 — 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 `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/components/PdfPage.kt:161` 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, `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/components/PdfPage.kt:177` calls `padding`, `clip`, `RoundedCornerShape` and `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/root/components/viewer/LegacyPdfViewer.kt:329` 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 (16 lines × 2) feature/settings/src/main/java/com/wanbaohe/setting/ai/screen/TTSSettingsScreen.kt:604— feature/settings/src/main/java/com/wanbaohe/setting/ai/screen/TTSSettingsScreen.kt:604-619 | feature/settings/src/main/java/com/wanbaohe/setting/image/screen/ImageGenerationSettingsScreen.kt:349-364 — 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 (18 lines × 2) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SparkleParamsItem.kt:88— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SparkleParamsItem.kt:88-105 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/VoronoiCrystallizeParamsItem.kt:96-113 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SparkleParamsItem.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/VoronoiCrystallizeParamsItem.kt` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 92 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 `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SparkleParamsItem.kt:88` 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 (18 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/dialogs/LoadingDialog.kt:146— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/dialogs/LoadingDialog.kt:146-163 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/dialogs/LoadingDialog.kt:192-209 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/dialogs/LoadingDialog.kt:146` 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, `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/dialogs/LoadingDialog.kt:164` calls `progress` and `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/dialogs/LoadingDialog.kt:210` 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 (18 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassCard.kt:78— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassCard.kt:78-95 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassCard.kt:140-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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassCard.kt:78` 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 (18 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/utils/FullscreenPopup.kt:167— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/utils/FullscreenPopup.kt:167-184 | libs/modalsheet/src/main/java/com/t8rin/modalsheet/FullscreenPopup.kt:193-210 — before extracting anything, compare `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/utils/FullscreenPopup.kt` and `libs/modalsheet/src/main/java/com/t8rin/modalsheet/FullscreenPopup.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 47 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `libs/modalsheet/src/main/java/com/t8rin/modalsheet/FullscreenPopup.kt:212` calls `dispatchTouchEvent` and `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/utils/FullscreenPopup.kt:186` 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 lines × 2) feature/ai/src/main/java/com/shifenmiao/ai/screen/AIDuelChatScreen.kt:926— feature/ai/src/main/java/com/shifenmiao/ai/screen/AIDuelChatScreen.kt:926-943 | feature/ai/src/main/java/com/shifenmiao/ai/screen/AIDuelChatScreen.kt:1089-1106 — 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/ai/src/main/java/com/shifenmiao/ai/screen/AIDuelChatScreen.kt:926` 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) feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:1143— feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:1143-1160 | feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt:1142-1159 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 625 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 `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:1143` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:1142` calls `verticalScroll`, `rememberScrollState`, `padding` and `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt:1142` 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 (18 lines × 2) feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/screen/tab/StatsTab.kt:108— feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/screen/tab/StatsTab.kt:108-125 | feature/household-items/src/main/java/com/wanbaohe/householditems/screen/HouseholdStatsTab.kt:97-114 — 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 (18 lines × 2) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/OnlinePlayUseCase.kt:345— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/OnlinePlayUseCase.kt:345-362 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/OnlinePlayUseCase.kt:267-284 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/OnlinePlayUseCase.kt` and `feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/OnlinePlayUseCase.kt` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 113 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: `OnlineMessage` names `com.wanbaohe.chess.domain.model.OnlineMessage` in one and `com.wanbaohe.xiangqi.domain.model.OnlineMessage` 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) feature/chess/src/main/java/com/wanbaohe/chess/data/ChessMoveFallback.kt:47— feature/chess/src/main/java/com/wanbaohe/chess/data/ChessMoveFallback.kt:47-64 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/HeuristicMoveFallback.kt:45-62 — 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 `feature/chess/src/main/java/com/wanbaohe/chess/data/ChessMoveFallback.kt:47` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: `MoveDecision` names `com.wanbaohe.chess.application.port.outbound.MoveDecision` in one and `com.wanbaohe.xiangqi.application.port.outbound.MoveDecision` 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) feature/code-editor/src/main/java/com/wanbaohe/code/editor/screen/CodeEditorScreen.kt:357— feature/code-editor/src/main/java/com/wanbaohe/code/editor/screen/CodeEditorScreen.kt:357-374 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/pdf_preview/PdfPreviewScreen.kt:131-148 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `feature/code-editor/src/main/java/com/wanbaohe/code/editor/screen/CodeEditorScreen.kt:357` 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) feature/common/src/main/java/com/shifenmiao/common/ui/ai/AIModelPickerSheet.kt:416— feature/common/src/main/java/com/shifenmiao/common/ui/ai/AIModelPickerSheet.kt:416-433 | feature/common/src/main/java/com/shifenmiao/common/ui/ai/AIModelPickerSheet.kt:659-676 — 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/common/src/main/java/com/shifenmiao/common/ui/ai/AIModelPickerSheet.kt:416` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 2) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/PolygonParamsSelector.kt:77— feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/PolygonParamsSelector.kt:77-94 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/StarParamsSelector.kt:79-96 — before extracting anything, compare `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/PolygonParamsSelector.kt` and `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/StarParamsSelector.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. 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/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/PolygonParamsSelector.kt:77` 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) feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/PlayMoveUseCase.kt:105— feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/PlayMoveUseCase.kt:105-122 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/PlayMoveUseCase.kt:83-100 — 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 `feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/PlayMoveUseCase.kt:105` 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: `GameResultResolver` names `com.wanbaohe.gomoku.domain.GameResultResolver` in one and `com.wanbaohe.xiangqi.domain.GameResultResolver` 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) feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuGameComponent.kt:1074— feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuGameComponent.kt:1074-1091 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiGameComponent.kt:881-898 — before extracting anything, compare `feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuGameComponent.kt` and `feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiGameComponent.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 97 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 `feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuGameComponent.kt:1074` 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: `FenCodec` names `com.wanbaohe.gomoku.domain.FenCodec` in one and `com.wanbaohe.xiangqi.domain.FenCodec` 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) feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/presentation/components/ColorStopSelection.kt:255— feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/presentation/components/ColorStopSelection.kt:255-272 | feature/palette-tools/src/main/java/com/t8rin/imagetoolbox/feature/palette_tools/presentation/components/MaterialYouPaletteControls.kt:258-275 — 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 `feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/presentation/components/ColorStopSelection.kt:255` 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) feature/household-items/src/main/java/com/wanbaohe/householditems/screen/HouseholdItemsScreen.kt:565— feature/household-items/src/main/java/com/wanbaohe/householditems/screen/HouseholdItemsScreen.kt:565-582 | feature/household-items/src/main/java/com/wanbaohe/householditems/screen/HouseholdItemsScreen.kt:735-752 — 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/household-items/src/main/java/com/wanbaohe/householditems/screen/HouseholdItemsScreen.kt:565` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 2) feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt:265— feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt:265-282 | feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/ImageStitchingContent.kt:247-264 — before extracting anything, compare `feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt` and `feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/ImageStitchingContent.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 131 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 `feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt:265` 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 (18 lines × 2) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupProjectStore.kt:454— feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupProjectStore.kt:454-471 | feature/text-card/src/main/java/com/wanbaohe/textcard/data/project/AndroidTextCardProjectStore.kt:389-406 — before extracting anything, compare `feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupProjectStore.kt` and `feature/text-card/src/main/java/com/wanbaohe/textcard/data/project/AndroidTextCardProjectStore.kt` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 256 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 `feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupProjectStore.kt:454` 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 (18 lines × 2) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/render/InPlaceTextLayerEditor.kt:180— feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/render/InPlaceTextLayerEditor.kt:180-197 | feature/text-card/src/main/java/com/wanbaohe/textcard/presentation/editor/CardCanvasPreview.kt:519-536 — 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 `feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/render/InPlaceTextLayerEditor.kt:180` 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) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/tools/ai/AiRectSelectOverlay.kt:71— feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/tools/ai/AiRectSelectOverlay.kt:71-88 | feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/tools/crop/CropToolScreen.kt:318-335 — before extracting anything, compare `feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/tools/ai/AiRectSelectOverlay.kt` and `feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/tools/crop/CropToolScreen.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 58 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 (18 lines × 2) feature/password-vault/src/main/java/com/wanbaohe/passwordvault/detail/PasswordVaultDetailScreen.kt:328— feature/password-vault/src/main/java/com/wanbaohe/passwordvault/detail/PasswordVaultDetailScreen.kt:328-345 | feature/password-vault/src/main/java/com/wanbaohe/passwordvault/detail/PasswordVaultDetailScreen.kt:380-397 — 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/password-vault/src/main/java/com/wanbaohe/passwordvault/detail/PasswordVaultDetailScreen.kt:380` 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) feature/translator/src/main/java/com/wanbaohe/translator/screen/TranslationPane.kt:422— feature/translator/src/main/java/com/wanbaohe/translator/screen/TranslationPane.kt:422-439 | feature/translator/src/main/java/com/wanbaohe/translator/screen/TranslationPane.kt:510-527 — 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/translator/src/main/java/com/wanbaohe/translator/screen/TranslationPane.kt:422` 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 `selected` to `color = if (mode ==` in one and `color = if (language ==` 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) feature/watermarking/src/main/java/com/shifenmiao/app/watermarking/presentation/canvas/WatermarkCanvas.kt:282— feature/watermarking/src/main/java/com/shifenmiao/app/watermarking/presentation/canvas/WatermarkCanvas.kt:282-299 | feature/watermarking/src/main/java/com/shifenmiao/app/watermarking/presentation/canvas/WatermarkCanvas.kt:307-324 — 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/watermarking/src/main/java/com/shifenmiao/app/watermarking/presentation/canvas/WatermarkCanvas.kt:282` 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) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidErSubPipeline.kt:321— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidErSubPipeline.kt:321-338 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlErdSubPipeline.kt:466-483 — before extracting anything, compare `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidErSubPipeline.kt` and `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlErdSubPipeline.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 144 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 `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidErSubPipeline.kt:321` 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) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:972— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:972-989 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlUsecaseSubPipeline.kt:356-373 — 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 `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:972` 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.
+ 4 more in this group — see findings.md.
D4 · Code Duplication· Edited copy of a member (8 corresponding lines) · ×28
Edited copy of a member (8 corresponding lines) fastlane/push_images.py:144— fastlane/push_images.py:144-151 | fastlane/push_listing.py:75-82 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlArchimateSubPipeline.kt:180— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlArchimateSubPipeline.kt:180-192 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlDitaaSubPipeline.kt:116-123 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:277— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:277-284 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlDeploymentSubPipeline.kt:159-167 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/FilePickerRenderer.kt:124— core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/FilePickerRenderer.kt:124-131 | feature/app/src/main/java/com/wanbaohe/app/ui/AIGlobalActionOverlay.kt:51-58 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) feature/period/src/main/java/com/wanbaohe/period/model/PeriodCalculations.kt:41— feature/period/src/main/java/com/wanbaohe/period/model/PeriodCalculations.kt:41-48 | feature/period/src/main/java/com/wanbaohe/period/model/PeriodCalculations.kt:125-133 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidC4SubPipeline.kt:133— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidC4SubPipeline.kt:133-143 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlC4SubPipeline.kt:121-128 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) feature/on-device-ocr/src/main/java/com/wanbaohe/ocr/data/MmkvOcrHistoryRepository.kt:114— feature/on-device-ocr/src/main/java/com/wanbaohe/ocr/data/MmkvOcrHistoryRepository.kt:114-121 | feature/translator/src/main/java/com/wanbaohe/translator/data/MmkvTranslationHistoryRepository.kt:88-95 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) feature/ocr-document/src/main/java/com/shifenmiao/feature/document/component/OcrTaskListComponent.kt:306— feature/ocr-document/src/main/java/com/shifenmiao/feature/document/component/OcrTaskListComponent.kt:306-313 | feature/ocr-document/src/main/java/com/shifenmiao/feature/document/domain/PointsCost.kt:25-32 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/export/FamilyOneShotRenderers.kt:518— libs/diagram/src/upstream/java/com/hrm/diagram/render/export/FamilyOneShotRenderers.kt:518-525 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlSequenceSubPipeline.kt:345-352 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/DynamicUi.kt:488— core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/DynamicUi.kt:488-495 | feature/app/src/main/java/com/wanbaohe/app/ui/AISpecializedQuestionField.kt:394-401 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/DynamicUi.kt:472— core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/DynamicUi.kt:472-479 | feature/app/src/main/java/com/wanbaohe/app/ui/AISpecializedQuestionField.kt:370-377 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuGameComponent.kt:1135— feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuGameComponent.kt:1135-1142 | feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:1017-1024 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) feature/settings/src/main/java/com/wanbaohe/setting/theme/component/ThemeSettingsComponent.kt:329— feature/settings/src/main/java/com/wanbaohe/setting/theme/component/ThemeSettingsComponent.kt:329-336 | feature/settings/src/main/java/com/wanbaohe/setting/theme/component/ThemeSettingsComponent.kt:343-351 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) feature/lifetime/src/main/java/com/shifenmiao/lifetime/component/LifeTimeCountdownDetailComponent.kt:71— feature/lifetime/src/main/java/com/shifenmiao/lifetime/component/LifeTimeCountdownDetailComponent.kt:71-78 | feature/lifetime/src/main/java/com/shifenmiao/lifetime/component/LifeTimeMilestoneDetailComponent.kt:124-131 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/ColorPickerRenderer.kt:96— core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/ColorPickerRenderer.kt:96-105 | core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/RadioGroupRenderer.kt:97-104 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) core/model/src/main/java/com/shifenmiao/model/ai/unified/LlmProtocolModels.kt:93— core/model/src/main/java/com/shifenmiao/model/ai/unified/LlmProtocolModels.kt:93-101 | core/model/src/main/java/com/shifenmiao/model/ai/RequestContent.kt:76-83 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/inline/InlineRenderUtils.kt:15— libs/markdown/src/upstream/java/com/hrm/markdown/renderer/inline/InlineRenderUtils.kt:15-22 | libs/markdown/src/upstream/java/com/hrm/markdown/renderer/internal/core/compile/InlineCompiler.kt:418-427 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuAnalysisComponent.kt:384— feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuAnalysisComponent.kt:384-391 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiAnalysisComponent.kt:332-339 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/utils/AiUtils.kt:103— feature/ai/src/main/java/com/shifenmiao/ai/utils/AiUtils.kt:103-111 | feature/common/src/main/java/com/shifenmiao/common/utils/BaseUtils.kt:60-67 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) feature/mahjong/src/main/java/com/wanbaohe/mahjong/data/local/LocalMahjongAi.kt:160— feature/mahjong/src/main/java/com/wanbaohe/mahjong/data/local/LocalMahjongAi.kt:160-167 | feature/mahjong/src/main/java/com/wanbaohe/mahjong/domain/rules/MahjongEngine.kt:456-463 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/component/AgentComponent.kt:184— feature/ai/src/main/java/com/shifenmiao/ai/component/AgentComponent.kt:184-193 | feature/ai/src/main/java/com/shifenmiao/ai/component/AgentDetailComponent.kt:241-248 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/model/LinearTiltShiftFilter.kt:40— feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/model/LinearTiltShiftFilter.kt:40-48 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/model/RadialTiltShiftFilter.kt:40-47 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/agent/AgentLoopExecutor.kt:525— feature/ai/src/main/java/com/shifenmiao/ai/agent/AgentLoopExecutor.kt:525-532 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/ConversationToolPolicyRepository.kt:89-96 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupProjectStore.kt:554— feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupProjectStore.kt:554-561 | feature/text-card/src/main/java/com/wanbaohe/textcard/data/project/AndroidTextCardProjectStore.kt:456-463 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/screenLogic/DrawComponent.kt:399— feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/screenLogic/DrawComponent.kt:399-406 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/addEditMaskSheet/AddMaskSheetComponent.kt:228-235 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Off the main sequence: WanBaoHe:core:camera-api — WanBaoHe:core:camera-api: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
Off the main sequence: WanBaoHe:core:resources — WanBaoHe:core:resources: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 17 project(s), so it's rigid to change.
Off the main sequence: WanBaoHe:libs:dynamic-theme — WanBaoHe:libs:dynamic-theme: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 3 project(s), so it's rigid to change.
Off the main sequence: WanBaoHe:libs:gesture — WanBaoHe:libs:gesture: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 5 project(s), so it's rigid to change.
Off the main sequence: WanBaoHe:feature:watermark-template — WanBaoHe:feature:watermark-template: abstractness 0.03, instability 0.00, distance 0.97 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Off the main sequence: WanBaoHe:libs:diagram — WanBaoHe:libs:diagram: abstractness 0.03, instability 0.00, distance 0.97 — zone of pain — concrete and depended on by 3 project(s), so it's rigid to change.
Off the main sequence: WanBaoHe:libs:rich-text-editor — WanBaoHe:libs:rich-text-editor: abstractness 0.05, instability 0.00, distance 0.95 — zone of pain — concrete and depended on by 3 project(s), so it's rigid to change.
Off the main sequence: WanBaoHe:core:r — WanBaoHe:core:r: abstractness 0.07, instability 0.00, distance 0.93 — zone of pain — concrete and depended on by 18 project(s), so it's rigid to change.
Off the main sequence: WanBaoHe:libs:modalsheet — WanBaoHe:libs:modalsheet: abstractness 0.07, instability 0.00, distance 0.93 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Off the main sequence: WanBaoHe:libs:collages — WanBaoHe:libs:collages: abstractness 0.08, instability 0.00, distance 0.92 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Off the main sequence: WanBaoHe:feature:noise-generation — WanBaoHe:feature:noise-generation: abstractness 0.08, instability 0.00, distance 0.92 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Off the main sequence: WanBaoHe:core:model — WanBaoHe:core:model: abstractness 0.04, instability 0.04, distance 0.92 — zone of pain — concrete and depended on by 64 project(s), so it's rigid to change.
Off the main sequence: WanBaoHe:feature:quick-tiles — WanBaoHe:feature:quick-tiles: abstractness 0.10, instability 0.00, distance 0.90 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Off the main sequence: WanBaoHe:core:a2ui — WanBaoHe:core:a2ui: abstractness 0.10, instability 0.00, distance 0.90 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
Off the main sequence: WanBaoHe:core:theme — WanBaoHe:core:theme: abstractness 0.08, instability 0.04, distance 0.88 — zone of pain — concrete and depended on by 55 project(s), so it's rigid to change.
Off the main sequence: WanBaoHe:core:domain — WanBaoHe:core:domain: abstractness 0.07, instability 0.06, distance 0.88 — zone of pain — concrete and depended on by 17 project(s), so it's rigid to change.
Off the main sequence: WanBaoHe:core:storage — WanBaoHe:core:storage: abstractness 0.00, instability 0.14, distance 0.86 — zone of pain — concrete and depended on by 24 project(s), so it's rigid to change.
Off the main sequence: WanBaoHe:feature:image-stacking — WanBaoHe:feature:image-stacking: abstractness 0.17, instability 0.00, distance 0.83 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Off the main sequence: WanBaoHe:libs:snowfall — WanBaoHe:libs:snowfall: abstractness 0.17, instability 0.00, distance 0.83 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Off the main sequence: WanBaoHe:feature:wechat — WanBaoHe:feature:wechat: abstractness 0.00, instability 0.20, distance 0.80 — zone of pain — concrete and depended on by 4 project(s), so it's rigid to change.
Off the main sequence: WanBaoHe:feature:gif-tools — WanBaoHe:feature:gif-tools: abstractness 0.23, instability 0.00, distance 0.77 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Off the main sequence: WanBaoHe:libs:markdown — WanBaoHe:libs:markdown: abstractness 0.06, instability 0.18, distance 0.75 — zone of pain — concrete and depended on by 9 project(s), so it's rigid to change.
Off the main sequence: WanBaoHe:core:ksp — WanBaoHe:core:ksp: abstractness 0.25, instability 0.00, distance 0.75 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Off the main sequence: WanBaoHe:feature:boardgame — WanBaoHe:feature:boardgame: abstractness 0.00, instability 0.25, distance 0.75 — zone of pain — concrete and depended on by 3 project(s), so it's rigid to change.
Off the main sequence: WanBaoHe:feature:load-net-image — WanBaoHe:feature:load-net-image: abstractness 0.25, instability 0.00, distance 0.75 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Duplicated block (11 lines × 3) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassOutlinedButton.kt:89— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassOutlinedButton.kt:89-99 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassTextButton.kt:86-96 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassTonalButton.kt:77-87 — before extracting anything, compare `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassOutlinedButton.kt` and `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassTonalButton.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 41 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassOutlinedButton.kt:89` 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 × 3) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassOutlinedButton.kt:106— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassOutlinedButton.kt:106-116 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassTextButton.kt:100-110 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassTonalButton.kt:94-104 — before extracting anything, compare `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassOutlinedButton.kt` and `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassTonalButton.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 41 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 (11 lines × 3) feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageChessTool.kt:378— feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageChessTool.kt:378-388 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageGomokuTool.kt:378-388 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageXiangqiTool.kt:375-385 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageChessTool.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageGomokuTool.kt` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 137 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 `feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageChessTool.kt:378` 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 (11 lines × 3) feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIPromptComponent.kt:861— feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIPromptComponent.kt:861-871 | feature/ai/src/main/java/com/shifenmiao/ai/service/AgentCreationService.kt:122-132 | feature/ai/src/main/java/com/shifenmiao/ai/service/PromptCreationService.kt:116-126 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/service/AgentCreationService.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/service/PromptCreationService.kt` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 107 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 (11 lines × 3) feature/calendar/src/main/java/com/wanbaohe/calendar/ui/ConversionTab.kt:822— feature/calendar/src/main/java/com/wanbaohe/calendar/ui/ConversionTab.kt:822-832 | feature/calendar/src/main/java/com/wanbaohe/calendar/ui/ConversionTab.kt:841-851 | feature/calendar/src/main/java/com/wanbaohe/calendar/ui/ConversionTab.kt:860-870 — 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/calendar/src/main/java/com/wanbaohe/calendar/ui/ConversionTab.kt:822` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/data/online/SignalingClientImpl.kt:204— feature/chess/src/main/java/com/wanbaohe/chess/data/online/SignalingClientImpl.kt:204-214 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/online/SignalingClientImpl.kt:204-214 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/online/SignalingClientImpl.kt:204-214 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/data/online/SignalingClientImpl.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/online/SignalingClientImpl.kt` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 129 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 `feature/chess/src/main/java/com/wanbaohe/chess/data/online/SignalingClientImpl.kt:204` 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: `RoomInfo` names `com.wanbaohe.chess.application.port.outbound.RoomInfo` in one and `com.wanbaohe.gomoku.application.port.outbound.RoomInfo` 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 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/data/online/SignalingClientImpl.kt:218— feature/chess/src/main/java/com/wanbaohe/chess/data/online/SignalingClientImpl.kt:218-228 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/online/SignalingClientImpl.kt:218-228 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/online/SignalingClientImpl.kt:218-228 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/data/online/SignalingClientImpl.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/online/SignalingClientImpl.kt` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 129 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 `feature/chess/src/main/java/com/wanbaohe/chess/data/online/SignalingClientImpl.kt:218` 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: `RoomInfo` names `com.wanbaohe.chess.application.port.outbound.RoomInfo` in one and `com.wanbaohe.gomoku.application.port.outbound.RoomInfo` 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 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/domain/FenCodec.kt:112— feature/chess/src/main/java/com/wanbaohe/chess/domain/FenCodec.kt:112-122 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/domain/FenCodec.kt:107-117 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/domain/FenCodec.kt:87-97 — 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 `feature/chess/src/main/java/com/wanbaohe/chess/domain/FenCodec.kt:112` 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: `BoardPoint` names `com.wanbaohe.chess.domain.model.BoardPoint` in one and `com.wanbaohe.gomoku.domain.model.BoardPoint` 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 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/router/ChessRouterScreen.kt:205— feature/chess/src/main/java/com/wanbaohe/chess/router/ChessRouterScreen.kt:205-215 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/router/GomokuRouterScreen.kt:203-213 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/router/XiangqiRouterScreen.kt:222-232 — 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 `feature/chess/src/main/java/com/wanbaohe/chess/router/ChessRouterScreen.kt:205` 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: `OnlineMatchScreen` names `com.wanbaohe.chess.screen.OnlineMatchScreen` in one and `com.wanbaohe.gomoku.screen.OnlineMatchScreen` 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 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt:583— feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt:583-593 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/router/screenLogic/GomokuRouterComponent.kt:527-537 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/router/screenLogic/XiangqiRouterComponent.kt:548-558 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/router/screenLogic/GomokuRouterComponent.kt` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 136 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 (11 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt:405— feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt:405-415 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuAnalysisScreen.kt:415-425 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiAnalysisScreen.kt:407-417 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuAnalysisScreen.kt` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 187 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 (11 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt:428— feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt:428-438 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuAnalysisScreen.kt:438-448 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiAnalysisScreen.kt:430-440 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuAnalysisScreen.kt` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 187 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 `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt:428` 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) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt:452— feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt:452-462 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuAnalysisScreen.kt:462-472 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiAnalysisScreen.kt:454-464 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuAnalysisScreen.kt` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 187 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 `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt:452` 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) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessGameScreen.kt:122— feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessGameScreen.kt:122-133 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuGameScreen.kt:119-129 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiGameScreen.kt:157-169 — 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 `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessGameScreen.kt:122` 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) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessSettingsScreen.kt:411— feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessSettingsScreen.kt:411-421 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuSettingsScreen.kt:415-425 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiSettingsScreen.kt:550-561 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessSettingsScreen.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuSettingsScreen.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 138 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 `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessSettingsScreen.kt:411` 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) feature/chess/src/main/java/com/wanbaohe/chess/screen/NewGameDropMenu.kt:117— feature/chess/src/main/java/com/wanbaohe/chess/screen/NewGameDropMenu.kt:117-127 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/NewGameDropMenu.kt:121-131 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/NewGameDropMenu.kt:118-128 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/screen/NewGameDropMenu.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/NewGameDropMenu.kt` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 109 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 `feature/chess/src/main/java/com/wanbaohe/chess/screen/NewGameDropMenu.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 (11 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/screen/NewGameDropMenu.kt:212— feature/chess/src/main/java/com/wanbaohe/chess/screen/NewGameDropMenu.kt:212-222 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/NewGameDropMenu.kt:214-224 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/NewGameDropMenu.kt:211-221 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/screen/NewGameDropMenu.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/NewGameDropMenu.kt` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 109 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 `feature/chess/src/main/java/com/wanbaohe/chess/screen/NewGameDropMenu.kt:212` 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) feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/screenLogic/ImageCutterComponent.kt:294— feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/screenLogic/ImageCutterComponent.kt:294-304 | feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/screenLogic/LimitsResizeComponent.kt:403-413 | feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:614-624 — before extracting anything, compare `feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/screenLogic/ImageCutterComponent.kt` and `feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/screenLogic/LimitsResizeComponent.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 56 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 `feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/screenLogic/ImageCutterComponent.kt:294` 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) feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiSettingsScreen.kt:491— feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiSettingsScreen.kt:491-502 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiSettingsScreen.kt:544-554 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiSettingsScreen.kt:659-669 — 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/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiSettingsScreen.kt:491` 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 × 3) libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:497— libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:497-507 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:557-567 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:790-800 — 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 `libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:497` 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) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:531— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:531-541 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlObjectSubPipeline.kt:458-468 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlUsecaseSubPipeline.kt:631-641 — before extracting anything, compare `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt` and `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlObjectSubPipeline.kt` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 145 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 `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:531` 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 (11 lines × 3) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:1035— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:1035-1045 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlDeploymentSubPipeline.kt:674-684 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlObjectSubPipeline.kt:400-410 — before extracting anything, compare `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt` and `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlDeploymentSubPipeline.kt` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 163 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 (11 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/AiOrchestrationUseCase.kt:120— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/AiOrchestrationUseCase.kt:120-130 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/AiOrchestrationUseCase.kt:98-108 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/AiOrchestrationUseCase.kt:93-103 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/AiOrchestrationUseCase.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/AiOrchestrationUseCase.kt` as WHOLE FILES: this scan already matched 5 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. Note first that the copies are not typed on the same thing: `AiTaskEntity` names `com.wanbaohe.chess.application.port.outbound.AiTaskEntity` in one and `com.wanbaohe.gomoku.application.port.outbound.AiTaskEntity` 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 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/GameQueryUseCase.kt:144— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/GameQueryUseCase.kt:144-154 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/GameQueryUseCase.kt:142-152 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/GameQueryUseCase.kt:135-145 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/GameQueryUseCase.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/GameQueryUseCase.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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. Note first that the copies are not typed on the same thing: `GameStore` names `com.wanbaohe.chess.application.port.outbound.GameStore` in one and `com.wanbaohe.gomoku.application.port.outbound.GameStore` 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 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/component/ChessAnalysisComponent.kt:254— feature/chess/src/main/java/com/wanbaohe/chess/component/ChessAnalysisComponent.kt:254-264 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuAnalysisComponent.kt:268-278 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiAnalysisComponent.kt:245-255 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/component/ChessAnalysisComponent.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuAnalysisComponent.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 77 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.
+ 2 more in this group — see findings.md.
D4 · Code Duplication· Edited copy of a member (11 corresponding lines) · ×26
Edited copy of a member (11 corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/graph/GraphIrRenderer.kt:282— libs/diagram/src/upstream/java/com/hrm/diagram/render/graph/GraphIrRenderer.kt:282-292 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlErdSubPipeline.kt:363-375 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlArchimateSubPipeline.kt:356— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlArchimateSubPipeline.kt:356-366 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlC4SubPipeline.kt:214-230 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/data/search/ChessEvaluator.kt:129— feature/chess/src/main/java/com/wanbaohe/chess/data/search/ChessEvaluator.kt:129-139 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/search/XiangqiEvaluator.kt:155-165 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) feature/text-card/src/main/java/com/wanbaohe/textcard/data/project/AndroidTextCardProjectStore.kt:118— feature/text-card/src/main/java/com/wanbaohe/textcard/data/project/AndroidTextCardProjectStore.kt:118-128 | feature/text-card/src/main/java/com/wanbaohe/textcard/data/project/AndroidTextCardProjectStore.kt:131-146 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) libs/twain/src/main/java/io/noties/markwon/prism4j/syntax/Prism4jThemeDarkula.java:47— libs/twain/src/main/java/io/noties/markwon/prism4j/syntax/Prism4jThemeDarkula.java:47-63 | libs/twain/src/main/java/io/noties/markwon/prism4j/syntax/Prism4jThemeDefault.java:47-57 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) feature/demo/src/main/java/com/shifenmiao/demo/screenLogic/DemoComponent.kt:289— feature/demo/src/main/java/com/shifenmiao/demo/screenLogic/DemoComponent.kt:289-299 | feature/file-browser/src/main/java/com/wanbaohe/file/browser/utils/FileHelper.kt:134-151 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) feature/common/src/main/java/com/shifenmiao/common/localmodel/DefaultLocalModelRepository.kt:155— feature/common/src/main/java/com/shifenmiao/common/localmodel/DefaultLocalModelRepository.kt:155-169 | feature/media-player/src/main/java/com/wanbaohe/media/data/ContentResolverMediaEntryResolver.kt:150-160 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupProjectStore.kt:519— feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupProjectStore.kt:519-529 | feature/text-card/src/main/java/com/wanbaohe/textcard/data/project/AndroidTextCardProjectStore.kt:421-431 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/domain/GameArbiter.kt:77— feature/chess/src/main/java/com/wanbaohe/chess/domain/GameArbiter.kt:77-91 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/domain/GameArbiter.kt:71-81 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/service/ChessServiceImpl.kt:75— feature/chess/src/main/java/com/wanbaohe/chess/service/ChessServiceImpl.kt:75-85 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/service/GomokuServiceImpl.kt:75-85 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) core/utils/src/main/java/com/wanbaohe/com/string/TimeFormatter.kt:154— core/utils/src/main/java/com/wanbaohe/com/string/TimeFormatter.kt:154-164 | core/utils/src/main/java/com/wanbaohe/com/string/TimeFormatter.kt:169-180 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:682— feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:682-692 | feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIPromptComponent.kt:710-720 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/screenLogic/MarkupLayersComponent.kt:1523— feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/screenLogic/MarkupLayersComponent.kt:1523-1538 | feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/screenLogic/MarkupLayersComponent.kt:1560-1570 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/theme/ThemeResolver.kt:198— libs/diagram/src/upstream/java/com/hrm/diagram/render/theme/ThemeResolver.kt:198-208 | libs/diagram/src/upstream/java/com/hrm/diagram/render/theme/ThemeResolver.kt:311-322 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/block/TabBlockRenderer.kt:59— libs/markdown/src/upstream/java/com/hrm/markdown/renderer/block/TabBlockRenderer.kt:59-69 | libs/markdown/src/upstream/java/com/hrm/markdown/renderer/block/TabBlockRenderer.kt:76-86 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/CreateGameUseCase.kt:73— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/CreateGameUseCase.kt:73-83 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/CreateGameUseCase.kt:86-96 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/state/UiStateScope.kt:115— core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/state/UiStateScope.kt:115-125 | core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/state/ValueExprResolver.kt:138-148 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) feature/online/src/main/java/com/shifenmiao/online/component/NoteItemComponent.kt:196— feature/online/src/main/java/com/shifenmiao/online/component/NoteItemComponent.kt:196-206 | feature/online/src/main/java/com/shifenmiao/online/component/NoteItemComponent.kt:208-218 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/cache/DrawEntityKey.kt:35— libs/diagram/src/upstream/java/com/hrm/diagram/render/cache/DrawEntityKey.kt:35-45 | libs/diagram/src/upstream/java/com/hrm/diagram/render/family/EntityKeySegments.kt:7-18 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/LayoutComponents.kt:100— core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/LayoutComponents.kt:100-110 | core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/LayoutComponents.kt:115-125 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:242— feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:242-258 | feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/screenLogic/FormatConversionComponent.kt:192-202 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/domain/GameArbiter.kt:41— feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/domain/GameArbiter.kt:41-52 | feature/chess/src/main/java/com/wanbaohe/chess/domain/GameArbiter.kt:48-58 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) core/ui/src/main/java/com/wanbaohe/base/ui/painter/TextPainter.kt:55— core/ui/src/main/java/com/wanbaohe/base/ui/painter/TextPainter.kt:55-70 | core/ui/src/main/java/com/wanbaohe/base/ui/painter/TextPainterNoBg.kt:54-64 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) feature/marktodo/src/main/java/com/shifenmiao/marktodo/screenLogic/CategoryDetailComponent.kt:301— feature/marktodo/src/main/java/com/shifenmiao/marktodo/screenLogic/CategoryDetailComponent.kt:301-311 | feature/marktodo/src/main/java/com/shifenmiao/marktodo/screenLogic/MarkTodoComponent.kt:384-394 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:320— feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:320-330 | feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/screenLogic/SingleEditComponent.kt:398-410 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
+ 1 more in this group — see findings.md.
D4 · Code Duplication· Edited copy of a member (14 corresponding lines) · ×25
Edited copy of a member (14 corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidClassSubPipeline.kt:425— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidClassSubPipeline.kt:425-442 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlClassSubPipeline.kt:361-374 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) core/storage/src/main/java/com/shifenmiao/storage/AppSharedStorage.kt:383— core/storage/src/main/java/com/shifenmiao/storage/AppSharedStorage.kt:383-396 | core/storage/src/main/java/com/shifenmiao/storage/AppSharedStorage.kt:398-417 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/page/PagesSelectionParser.kt:30— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/page/PagesSelectionParser.kt:30-43 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/components/PagesSelectionParser.kt:30-43 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:275— feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:275-288 | feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIPromptComponent.kt:307-320 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) feature/device-status/src/main/java/com/wanbaohe/devicestatus/screen/PhoneStatusFormatter.kt:133— feature/device-status/src/main/java/com/wanbaohe/devicestatus/screen/PhoneStatusFormatter.kt:133-146 | feature/speed-test/src/main/java/com/wanbaohe/speedtest/data/SpeedTestRepositoryImpl.kt:208-221 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessGameScreen.kt:238— feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessGameScreen.kt:238-251 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuGameScreen.kt:200-214 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/data/search/ChessSearch.kt:224— feature/chess/src/main/java/com/wanbaohe/chess/data/search/ChessSearch.kt:224-240 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/search/XiangqiSearch.kt:248-261 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/component/AIStreamAnswerComponent.kt:171— feature/ai/src/main/java/com/shifenmiao/ai/component/AIStreamAnswerComponent.kt:171-184 | feature/common/src/main/java/com/shifenmiao/common/ai/AIPromptExecutor.kt:416-430 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/component/BookkeepingComponent.kt:389— feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/component/BookkeepingComponent.kt:389-402 | feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/component/StatsAggregator.kt:128-143 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) feature/dsh-client/src/main/java/com/wanbaohe/dsh/component/DshRootComponent.kt:690— feature/dsh-client/src/main/java/com/wanbaohe/dsh/component/DshRootComponent.kt:690-703 | feature/dsh-client/src/main/java/com/wanbaohe/dsh/component/DshRootComponent.kt:790-806 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuGameComponent.kt:320— feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuGameComponent.kt:320-335 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiGameComponent.kt:203-216 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/data/ExifMetadataParser.kt:96— feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/data/ExifMetadataParser.kt:96-109 | feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/data/ExifMetadataParser.kt:114-131 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) feature/text-card/src/main/java/com/wanbaohe/textcard/domain/model/SourceTextEditing.kt:58— feature/text-card/src/main/java/com/wanbaohe/textcard/domain/model/SourceTextEditing.kt:58-71 | feature/text-card/src/main/java/com/wanbaohe/textcard/domain/model/SourceTextEditing.kt:77-90 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/data/AndroidSettingsManager.kt:698— feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/data/AndroidSettingsManager.kt:698-711 | feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/data/AndroidSettingsManager.kt:716-729 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/screenLogic/DrawComponent.kt:384— feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/screenLogic/DrawComponent.kt:384-397 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/addEditMaskSheet/AddMaskSheetComponent.kt:212-226 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) feature/habit-tracker/src/main/java/com/wanbaohe/habittracker/reminder/HabitReminderScheduler.kt:77— feature/habit-tracker/src/main/java/com/wanbaohe/habittracker/reminder/HabitReminderScheduler.kt:77-90 | feature/schedule/src/main/java/com/wanbaohe/schedule/reminder/ScheduleReminderScheduler.kt:79-92 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/block/BibliographyRenderer.kt:29— libs/markdown/src/upstream/java/com/hrm/markdown/renderer/block/BibliographyRenderer.kt:29-44 | libs/markdown/src/upstream/java/com/hrm/markdown/renderer/block/MiscRenderers.kt:60-73 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) feature/dsh-client/src/main/java/com/wanbaohe/dsh/session/FeedbackStore.kt:124— feature/dsh-client/src/main/java/com/wanbaohe/dsh/session/FeedbackStore.kt:124-137 | feature/dsh-client/src/main/java/com/wanbaohe/dsh/session/SettingsStore.kt:177-190 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/screenLogic/MarkupLayersComponent.kt:2152— feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/screenLogic/MarkupLayersComponent.kt:2152-2168 | feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/screenLogic/MarkupLayersComponent.kt:2325-2338 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/presentation/screenLogic/CameraWatermarkComponent.kt:169— feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/presentation/screenLogic/CameraWatermarkComponent.kt:169-182 | feature/id-photo/src/main/java/com/wanbaohe/idphoto/presentation/screenLogic/IdPhotoComponent.kt:430-443 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) feature/common/src/main/java/com/shifenmiao/common/utils/BaseUtils.kt:103— feature/common/src/main/java/com/shifenmiao/common/utils/BaseUtils.kt:103-118 | feature/common/src/main/java/com/shifenmiao/common/utils/BaseUtils.kt:124-137 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) feature/login/src/main/java/com/shifenmiao/login/viewModel/LoginComponent.kt:558— feature/login/src/main/java/com/shifenmiao/login/viewModel/LoginComponent.kt:558-571 | feature/login/src/main/java/com/shifenmiao/login/viewModel/LoginComponent.kt:1736-1754 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) feature/altitude/src/main/java/com/wanbaohe/altitude/ui/AltitudeGauge.kt:413— feature/altitude/src/main/java/com/wanbaohe/altitude/ui/AltitudeGauge.kt:413-427 | feature/settings/src/main/java/com/wanbaohe/setting/skill/screen/SkillManagementScreen.kt:451-464 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) feature/demo/src/main/java/com/shifenmiao/demo/screen/GlassComponentShowcaseSheet.kt:504— feature/demo/src/main/java/com/shifenmiao/demo/screen/GlassComponentShowcaseSheet.kt:504-517 | feature/household-items/src/main/java/com/wanbaohe/householditems/screen/HouseholdItemsScreen.kt:931-945 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/agent/AgentLoopExecutor.kt:891— feature/ai/src/main/java/com/shifenmiao/ai/agent/AgentLoopExecutor.kt:891-905 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/InteractiveToolResultFactory.kt:62-75 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (12 corresponding lines) · ×23
Edited copy of a member (12 corresponding lines) core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:787— core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:787-798 | core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:801-812 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/application/dto/GamePreparation.kt:102— feature/chess/src/main/java/com/wanbaohe/chess/application/dto/GamePreparation.kt:102-115 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/dto/GamePreparation.kt:92-103 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt:226— feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt:226-237 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/router/screenLogic/GomokuRouterComponent.kt:224-235 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) core/network/src/main/java/com/shifenmiao/network/di/NetworkModule.kt:82— core/network/src/main/java/com/shifenmiao/network/di/NetworkModule.kt:82-94 | core/network/src/main/java/com/shifenmiao/network/di/NetworkModule.kt:99-110 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/theme/ThemeResolver.kt:340— libs/diagram/src/upstream/java/com/hrm/diagram/render/theme/ThemeResolver.kt:340-351 | libs/diagram/src/upstream/java/com/hrm/diagram/render/theme/ThemeResolver.kt:353-364 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:889— feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:889-900 | feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIPromptComponent.kt:924-935 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) feature/sudoku/src/main/java/com/wanbaohe/sudoku/component/SudokuComponent.kt:254— feature/sudoku/src/main/java/com/wanbaohe/sudoku/component/SudokuComponent.kt:254-269 | feature/sudoku/src/main/java/com/wanbaohe/sudoku/component/SudokuComponent.kt:271-282 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) feature/on-device-ocr/src/main/java/com/wanbaohe/ocr/data/OcrModelStore.kt:134— feature/on-device-ocr/src/main/java/com/wanbaohe/ocr/data/OcrModelStore.kt:134-147 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/local/XiangqiEngineWeights.kt:225-236 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidClassSubPipeline.kt:382— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidClassSubPipeline.kt:382-395 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlClassSubPipeline.kt:322-333 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) feature/marktodo/src/main/java/com/shifenmiao/marktodo/screenLogic/TodoDetailComponent.kt:355— feature/marktodo/src/main/java/com/shifenmiao/marktodo/screenLogic/TodoDetailComponent.kt:355-366 | feature/marktodo/src/main/java/com/shifenmiao/marktodo/screenLogic/TodoDetailComponent.kt:368-379 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/screenLogic/SingleEditComponent.kt:530— feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/screenLogic/SingleEditComponent.kt:530-543 | feature/watermarking/src/main/java/com/shifenmiao/app/watermarking/presentation/screenLogic/WatermarkingComponent.kt:691-702 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/utils/AiUtils.kt:113— feature/ai/src/main/java/com/shifenmiao/ai/utils/AiUtils.kt:113-124 | feature/ai/src/main/java/com/shifenmiao/ai/utils/AiUtils.kt:126-137 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) feature/code-editor/src/main/java/com/wanbaohe/code/editor/component/CodeEditorComponent.kt:375— feature/code-editor/src/main/java/com/wanbaohe/code/editor/component/CodeEditorComponent.kt:375-386 | feature/markdown-edit/src/main/java/com/wanbaohe/markdown/edit/component/MarkdownEditorComponent.kt:495-506 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) feature/dsh-client/src/main/java/com/wanbaohe/dsh/session/EventNodes.kt:1026— feature/dsh-client/src/main/java/com/wanbaohe/dsh/session/EventNodes.kt:1026-1037 | feature/dsh-client/src/main/java/com/wanbaohe/dsh/session/EventNodes.kt:1040-1051 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) feature/file-transfer/src/main/java/com/wanbaohe/file_transfer/server/ChatWebSocket.kt:182— feature/file-transfer/src/main/java/com/wanbaohe/file_transfer/server/ChatWebSocket.kt:182-197 | feature/file-transfer/src/main/java/com/wanbaohe/file_transfer/server/ChatWebSocket.kt:228-239 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) feature/password-vault/src/main/java/com/wanbaohe/passwordvault/detail/screenLogic/PasswordVaultDetailComponent.kt:94— feature/password-vault/src/main/java/com/wanbaohe/passwordvault/detail/screenLogic/PasswordVaultDetailComponent.kt:94-106 | feature/password-vault/src/main/java/com/wanbaohe/passwordvault/edit/screenLogic/PasswordVaultEditComponent.kt:124-135 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) feature/base64-tools/src/main/java/com/t8rin/imagetoolbox/feature/base64_tools/presentation/screenLogic/Base64ToolsComponent.kt:227— feature/base64-tools/src/main/java/com/t8rin/imagetoolbox/feature/base64_tools/presentation/screenLogic/Base64ToolsComponent.kt:227-238 | feature/common/src/main/java/com/shifenmiao/common/logic/AppComponent.kt:752-765 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) feature/file-browser/src/main/java/com/wanbaohe/file/browser/screenLogic/FileBrowserComponent.kt:368— feature/file-browser/src/main/java/com/wanbaohe/file/browser/screenLogic/FileBrowserComponent.kt:368-379 | feature/file-browser/src/main/java/com/wanbaohe/file/browser/screenLogic/FileBrowserComponent.kt:381-392 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/ScaleSmallImagesToLargeToggle.kt:43— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/ScaleSmallImagesToLargeToggle.kt:43-54 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/resize_group/components/UseBlurredBackgroundToggle.kt:45-56 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:190— feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:190-202 | feature/document-scanner/src/main/java/com/t8rin/imagetoolbox/feature/document_scanner/presentation/screenLogic/DocumentScannerComponent.kt:163-174 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/agent/AgentLoopExecutor.kt:505— feature/ai/src/main/java/com/shifenmiao/ai/agent/AgentLoopExecutor.kt:505-520 | feature/ai/src/main/java/com/shifenmiao/ai/component/AgentLoopRunner.kt:759-770 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) feature/marktodo/src/main/java/com/shifenmiao/marktodo/screenLogic/CategoryDetailComponent.kt:288— feature/marktodo/src/main/java/com/shifenmiao/marktodo/screenLogic/CategoryDetailComponent.kt:288-299 | feature/marktodo/src/main/java/com/shifenmiao/marktodo/screenLogic/MarkTodoComponent.kt:371-382 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/data/AndroidImageDrawApplier.kt:513— feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/data/AndroidImageDrawApplier.kt:513-524 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/AndroidFilterMaskApplier.kt:168-179 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (13 lines × 3) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionCubeLutBottomContent.kt:234— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionCubeLutBottomContent.kt:234-246 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheet.kt:467-479 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/sheets/ProcessImagesPreferenceSheet.kt:161-173 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionCubeLutBottomContent.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheet.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 108 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 `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionCubeLutBottomContent.kt:234` 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: `ArrowBack` names `androidx.compose.material.icons.automirrored.rounded.ArrowBack` in one and `com.t8rin.imagetoolbox.core.resources.icons.ArrowBack` 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 (13 lines × 3) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SmearParamsItem.kt:77— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SmearParamsItem.kt:77-89 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SparkleParamsItem.kt:91-103 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/VoronoiCrystallizeParamsItem.kt:99-111 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SmearParamsItem.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/VoronoiCrystallizeParamsItem.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 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 `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SmearParamsItem.kt:77` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 3) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/dialogs/LoadingDialog.kt:61— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/dialogs/LoadingDialog.kt:61-73 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/dialogs/LoadingDialog.kt:145-157 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/dialogs/LoadingDialog.kt:191-203 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/dialogs/LoadingDialog.kt:61` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 3) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:256— feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:256-268 | feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/components/GifToolsImagePreview.kt:53-65 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt:256-268 — before extracting anything, compare `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt` and `feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 239 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 `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:256` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 3) feature/app/src/main/java/com/wanbaohe/app/ui/VerifyContactSheet.kt:257— feature/app/src/main/java/com/wanbaohe/app/ui/VerifyContactSheet.kt:257-269 | feature/profile/src/main/java/com/wanbaohe/profile/screen/ChangePasswordSheet.kt:210-222 | feature/profile/src/main/java/com/wanbaohe/profile/screen/VerifyEmailSheet.kt:168-180 — before extracting anything, compare `feature/app/src/main/java/com/wanbaohe/app/ui/VerifyContactSheet.kt` and `feature/profile/src/main/java/com/wanbaohe/profile/screen/ChangePasswordSheet.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 75 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 `feature/app/src/main/java/com/wanbaohe/app/ui/VerifyContactSheet.kt:257` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 3) feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/screen/BookkeepingScreen.kt:137— feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/screen/BookkeepingScreen.kt:137-149 | feature/habit-tracker/src/main/java/com/wanbaohe/habittracker/screen/HabitMainScreen.kt:122-134 | feature/household-items/src/main/java/com/wanbaohe/householditems/screen/HouseholdItemsScreen.kt:209-221 — 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 `feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/screen/BookkeepingScreen.kt:137` 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 `current` to `BookkeepingTab` in one and `HabitTab` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (13 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/application/dto/GameDtos.kt:114— feature/chess/src/main/java/com/wanbaohe/chess/application/dto/GameDtos.kt:114-126 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/dto/GameDtos.kt:114-126 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/dto/GameDtos.kt:122-134 — 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 `feature/chess/src/main/java/com/wanbaohe/chess/application/dto/GameDtos.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.
Duplicated block (13 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:946— feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:946-958 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuGameComponent.kt:1070-1082 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiGameComponent.kt:877-889 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuGameComponent.kt` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 106 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 `feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:946` 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: `AiOrchestrationUseCase` names `com.wanbaohe.chess.application.usecase.AiOrchestrationUseCase` in one and `com.wanbaohe.gomoku.application.usecase.AiOrchestrationUseCase` 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 (13 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/data/GameDaoAdapter.kt:74— feature/chess/src/main/java/com/wanbaohe/chess/data/GameDaoAdapter.kt:74-86 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/GameDaoAdapter.kt:72-84 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/GameDaoAdapter.kt:73-85 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/data/GameDaoAdapter.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/GameDaoAdapter.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. Note first that the copies are not typed on the same thing: `GameStatus` names `com.wanbaohe.chess.domain.model.GameStatus` in one and `com.wanbaohe.gomoku.domain.model.GameStatus` 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 (13 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/data/GameDaoAdapter.kt:112— feature/chess/src/main/java/com/wanbaohe/chess/data/GameDaoAdapter.kt:112-124 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/GameDaoAdapter.kt:110-122 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/GameDaoAdapter.kt:110-122 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/data/GameDaoAdapter.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/GameDaoAdapter.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.
Duplicated block (13 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/data/SettingsPrefsAdapter.kt:53— feature/chess/src/main/java/com/wanbaohe/chess/data/SettingsPrefsAdapter.kt:53-65 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/SettingsPrefsAdapter.kt:53-65 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/SettingsPrefsAdapter.kt:53-65 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/data/SettingsPrefsAdapter.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/SettingsPrefsAdapter.kt` 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. 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: `AudioSettings` names `com.wanbaohe.chess.application.port.outbound.AudioSettings` in one and `com.wanbaohe.gomoku.application.port.outbound.AudioSettings` 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 (13 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/data/SettingsPrefsAdapter.kt:68— feature/chess/src/main/java/com/wanbaohe/chess/data/SettingsPrefsAdapter.kt:68-80 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/SettingsPrefsAdapter.kt:68-80 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/SettingsPrefsAdapter.kt:68-80 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/data/SettingsPrefsAdapter.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/SettingsPrefsAdapter.kt` 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. 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: `AudioSettings` names `com.wanbaohe.chess.application.port.outbound.AudioSettings` in one and `com.wanbaohe.gomoku.application.port.outbound.AudioSettings` 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 (13 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/data/online/SignalingClientImpl.kt:230— feature/chess/src/main/java/com/wanbaohe/chess/data/online/SignalingClientImpl.kt:230-242 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/online/SignalingClientImpl.kt:230-242 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/online/SignalingClientImpl.kt:230-242 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/data/online/SignalingClientImpl.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/online/SignalingClientImpl.kt` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 129 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. Note first that the copies are not typed on the same thing: `RoomInfo` names `com.wanbaohe.chess.application.port.outbound.RoomInfo` in one and `com.wanbaohe.gomoku.application.port.outbound.RoomInfo` 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 (13 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt:298— feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt:298-310 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuAnalysisScreen.kt:305-317 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiAnalysisScreen.kt:298-310 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuAnalysisScreen.kt` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 187 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 `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt:298` 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 (13 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/screen/ExportDialog.kt:86— feature/chess/src/main/java/com/wanbaohe/chess/screen/ExportDialog.kt:86-98 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/ExportDialog.kt:86-98 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/ExportDialog.kt:86-98 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/screen/ExportDialog.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/ExportDialog.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 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 `feature/chess/src/main/java/com/wanbaohe/chess/screen/ExportDialog.kt:86` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/screen/NewGameDropMenu.kt:325— feature/chess/src/main/java/com/wanbaohe/chess/screen/NewGameDropMenu.kt:325-337 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/NewGameDropMenu.kt:327-339 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/NewGameDropMenu.kt:323-335 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/screen/NewGameDropMenu.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/NewGameDropMenu.kt` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 109 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 `feature/chess/src/main/java/com/wanbaohe/chess/screen/NewGameDropMenu.kt:325` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 3) feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/DeleteExifContent.kt:281— feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/DeleteExifContent.kt:281-293 | feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:299-312 | feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt:403-415 — before extracting anything, compare `feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/DeleteExifContent.kt` and `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 71 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 `feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/DeleteExifContent.kt:281` 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 (13 lines × 3) feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeAddCountdownScreen.kt:316— feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeAddCountdownScreen.kt:316-328 | feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeAddEventScreen.kt:298-310 | feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeAddMilestoneScreen.kt:264-276 — before extracting anything, compare `feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeAddCountdownScreen.kt` and `feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeAddEventScreen.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 84 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 `feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeAddCountdownScreen.kt:316` 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 (13 lines × 3) feature/load-net-image/src/main/java/com/t8rin/imagetoolbox/feature/load_net_image/presentation/components/LoadNetImageTopAppBarActions.kt:100— feature/load-net-image/src/main/java/com/t8rin/imagetoolbox/feature/load_net_image/presentation/components/LoadNetImageTopAppBarActions.kt:100-112 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/pdf_to_images/PdfToImagesScreen.kt:137-149 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/split/SplitPdfToolContent.kt:117-129 — before extracting anything, compare `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/pdf_to_images/PdfToImagesScreen.kt` and `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/split/SplitPdfToolContent.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 117 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 `feature/load-net-image/src/main/java/com/t8rin/imagetoolbox/feature/load_net_image/presentation/components/LoadNetImageTopAppBarActions.kt:100` 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 (13 lines × 3) libs/diagram/src/upstream/java/com/hrm/diagram/render/export/FamilyOneShotRenderers.kt:55— libs/diagram/src/upstream/java/com/hrm/diagram/render/export/FamilyOneShotRenderers.kt:55-67 | libs/diagram/src/upstream/java/com/hrm/diagram/render/export/FamilyOneShotRenderers.kt:314-326 | libs/diagram/src/upstream/java/com/hrm/diagram/render/export/FamilyOneShotRenderers.kt:421-433 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `libs/diagram/src/upstream/java/com/hrm/diagram/render/export/FamilyOneShotRenderers.kt:55` 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) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/AiOrchestrationUseCase.kt:192— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/AiOrchestrationUseCase.kt:192-204 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/AiOrchestrationUseCase.kt:178-190 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/AiOrchestrationUseCase.kt:169-181 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/AiOrchestrationUseCase.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/AiOrchestrationUseCase.kt` as WHOLE FILES: this scan already matched 5 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. Note first that the copies are not typed on the same thing: `AiTaskEntity` names `com.wanbaohe.chess.application.port.outbound.AiTaskEntity` in one and `com.wanbaohe.gomoku.application.port.outbound.AiTaskEntity` 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 (13 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/component/ChessAnalysisComponent.kt:113— feature/chess/src/main/java/com/wanbaohe/chess/component/ChessAnalysisComponent.kt:113-125 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuAnalysisComponent.kt:126-138 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiAnalysisComponent.kt:113-125 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/component/ChessAnalysisComponent.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuAnalysisComponent.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 77 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:986— feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:986-998 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuGameComponent.kt:1108-1120 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiGameComponent.kt:915-927 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuGameComponent.kt` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 106 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.
Stateful singleton: A2uiComponentRegistry core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/A2uiComponentRegistry.kt:26— `A2uiComponentRegistry` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (rendererMap; e.g. `rendererMap` in `register` at line 34).
Stateful singleton: NetworkAudioPlayer core/base/src/main/java/com/shifenmiao/base/audio/NetworkAudioPlayer.kt:51— `NetworkAudioPlayer` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (effectPlayer, backgroundDesired, backgroundPlayerSource, backgroundPlayer, playEpoch; e.g. `effectPlayer` in `playEffect` at line 67).
Stateful singleton: DeviceInfoModule core/base/src/main/java/com/shifenmiao/base/hilt/DeviceInfoModule.kt:48— `DeviceInfoModule` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (info; e.g. `info` in `getDeviceInfoFun` at line 103).
Stateful singleton: VideoPipState core/base/src/main/java/com/shifenmiao/base/pip/VideoPipState.kt:70— `VideoPipState` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (owner; e.g. `owner` in `update` at line 83).
Stateful singleton: ActionRegistry core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/action/ActionEngine.kt:122— `ActionRegistry` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (customHandlers; e.g. `customHandlers` in `register` at line 129).
Stateful singleton: ModifierRegistry core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/modifier/ModifierRegistry.kt:76— `ModifierRegistry` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (handlers; e.g. `handlers` in `register` at line 92).
Stateful singleton: ComponentRegistry core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/renderer/ComponentRegistry.kt:66— `ComponentRegistry` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (renderers; e.g. `renderers` in `register` at line 75).
Stateful singleton: OkHttpHtmlDownloader core/network/src/main/java/com/shifenmiao/network/downloader/OkHttpHtmlDownloader.kt:38— `OkHttpHtmlDownloader` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (currentClient; e.g. `currentClient` in `downloadHtml` at line 42).
Stateful singleton: GmRewardedAdController feature/ad-watch/src/domestic/java/com/wanbaohe/adwatch/ads/GmRewardedAdController.kt:63— `GmRewardedAdController` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (sdkStarting, loading, rewardedAd, configRetried; e.g. `sdkStarting` in `ensureSdkStarted` at line 100).
Stateful singleton: GmsRewardedAdController feature/ad-watch/src/google/java/com/wanbaohe/adwatch/ads/GmsRewardedAdController.kt:50— `GmsRewardedAdController` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (loading, rewardedAd; e.g. `loading` in `preloadInternal` at line 78).
Stateful singleton: AgentToolRegistry feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/AgentToolRegistry.kt:65— `AgentToolRegistry` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (cachedToolDefinitions; e.g. `cachedToolDefinitions` in `invalidateToolDefinitionsCache` at line 140).
Stateful singleton: SignalingClientImpl feature/chess/src/main/java/com/wanbaohe/chess/data/online/SignalingClientImpl.kt:59— `SignalingClientImpl` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (savedRoomId, savedListener, isUserDisconnect, reconnectAttempts, listener, webSocket; e.g. `savedRoomId` in `connect` at line 112).
Stateful singleton: VoiceRecognizer feature/common/src/main/java/com/shifenmiao/common/voice/VoiceRecognizer.kt:47— `VoiceRecognizer` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (client, recorder; e.g. `client` in `start` at line 109).
Stateful singleton: SignalingClientImpl feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/online/SignalingClientImpl.kt:59— `SignalingClientImpl` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (savedRoomId, savedListener, isUserDisconnect, reconnectAttempts, listener, webSocket; e.g. `savedRoomId` in `connect` at line 112).
Stateful singleton: LoginStateHolder feature/login/src/main/java/com/shifenmiao/login/state/LoginStateHolder.kt:44— `LoginStateHolder` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (handledWechatCodes; e.g. `handledWechatCodes` in `markWechatCodeHandled` at line 195).
Stateful singleton: InlineMediaPlaybackCoordinator feature/media-player/src/main/java/com/wanbaohe/media/domain/InlineMediaPlaybackController.kt:54— `InlineMediaPlaybackCoordinator` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (activeController; e.g. `activeController` in `activate` at line 57).
Stateful singleton: ExoPlaybackEngine feature/media-player/src/main/java/com/wanbaohe/media/playback/ExoPlaybackEngine.kt:73— `ExoPlaybackEngine` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (playerKind, queueEntries, errorStreak, activeTextureView, mediaSession, exoPlayer; e.g. `playerKind` in `openQueue` at line 107).
Stateful singleton: PoemService feature/poem/src/main/java/com/wanbaohe/poem/service/PoemService.kt:57— `PoemService` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (memoryFilterCache; e.g. `memoryFilterCache` in `loadFilterCache` at line 162).
Stateful singleton: VisualAutomationController feature/visual-automation/src/main/java/com/wanbaohe/visual/automation/VisualAutomationController.kt:87— `VisualAutomationController` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (isRunning, currentActivity, actionHistory; e.g. `isRunning` in `startTask` at line 126).
Stateful singleton: WebpService feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/service/WebpService.kt:45— `WebpService` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (cachedExtractResult; e.g. `cachedExtractResult` in `extractFrames` at line 67).
Stateful singleton: LocalXiangqiEngine feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/local/LocalXiangqiEngine.kt:56— `LocalXiangqiEngine` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (writer, reader, process; e.g. `writer` in `destroyProcess` at line 219).
Stateful singleton: SignalingClientImpl feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/online/SignalingClientImpl.kt:59— `SignalingClientImpl` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (savedRoomId, savedListener, isUserDisconnect, reconnectAttempts, listener, webSocket; e.g. `savedRoomId` in `connect` at line 112).
D4 · Code Duplication· Edited copy of a member (7 corresponding lines) · ×22
Edited copy of a member (7 corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/AudioFeedbackUseCase.kt:67— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/AudioFeedbackUseCase.kt:67-73 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/AudioFeedbackUseCase.kt:66-74 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ManageGameUseCase.kt:323— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ManageGameUseCase.kt:323-329 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/ManageGameUseCase.kt:108-114 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ManageGameUseCase.kt:192— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ManageGameUseCase.kt:192-198 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/ManageGameUseCase.kt:167-173 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/ImportGameUseCase.kt:109— feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/ImportGameUseCase.kt:109-119 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/ImportGameUseCase.kt:72-78 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidArchitectureSubPipeline.kt:341— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidArchitectureSubPipeline.kt:341-347 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidC4SubPipeline.kt:559-565 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) feature/calendar/src/main/java/com/wanbaohe/calendar/calendar_view/screenLogic/CalendarViewComponent.kt:111— feature/calendar/src/main/java/com/wanbaohe/calendar/calendar_view/screenLogic/CalendarViewComponent.kt:111-117 | feature/calendar/src/main/java/com/wanbaohe/calendar/calendar_view/screenLogic/CalendarViewComponent.kt:120-126 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) feature/ocr-document/src/main/java/com/shifenmiao/feature/document/component/DocConvertTaskListComponent.kt:326— feature/ocr-document/src/main/java/com/shifenmiao/feature/document/component/DocConvertTaskListComponent.kt:326-332 | feature/ocr-document/src/main/java/com/shifenmiao/feature/document/component/OcrTaskListComponent.kt:439-449 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/domain/GameArbiter.kt:174— feature/chess/src/main/java/com/wanbaohe/chess/domain/GameArbiter.kt:174-184 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/domain/GameArbiter.kt:107-113 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/editor/EditorLayerBox.kt:545— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/editor/EditorLayerBox.kt:545-551 | feature/text-card/src/main/java/com/wanbaohe/textcard/presentation/editor/TextBlockTransformHandles.kt:292-298 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ManageGameUseCase.kt:110— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ManageGameUseCase.kt:110-117 | feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ManageGameUseCase.kt:119-125 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassCard.kt:242— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassCard.kt:242-251 | feature/common/src/main/java/com/shifenmiao/common/components/text/TextSelectionToolbar.kt:368-374 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/AudioFeedbackUseCase.kt:131— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/AudioFeedbackUseCase.kt:131-137 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/AudioFeedbackUseCase.kt:139-145 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/logic/ChatInputComponent.kt:293— feature/ai/src/main/java/com/shifenmiao/ai/logic/ChatInputComponent.kt:293-300 | feature/ai/src/main/java/com/shifenmiao/ai/logic/ChatInputComponent.kt:457-463 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) core/domain/src/main/kotlin/com/t8rin/imagetoolbox/core/domain/model/CipherType.kt:171— core/domain/src/main/kotlin/com/t8rin/imagetoolbox/core/domain/model/CipherType.kt:171-177 | core/domain/src/main/kotlin/com/t8rin/imagetoolbox/core/domain/model/HashingType.kt:119-125 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/component/AIDuelChatComponent.kt:783— feature/ai/src/main/java/com/shifenmiao/ai/component/AIDuelChatComponent.kt:783-789 | feature/ai/src/main/java/com/shifenmiao/ai/model/MessageUiModel.kt:601-607 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ManageGameUseCase.kt:136— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ManageGameUseCase.kt:136-144 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/ManageGameUseCase.kt:116-122 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) feature/calendar/src/main/java/com/wanbaohe/calendar/ui/CalendarTab.kt:1929— feature/calendar/src/main/java/com/wanbaohe/calendar/ui/CalendarTab.kt:1929-1935 | feature/file-viewer/src/main/java/com/wanbaohe/fileviewer/data/ViewerWebHost.kt:304-311 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) feature/media-player/src/main/java/com/wanbaohe/media/playback/ExoPlaybackEngine.kt:430— feature/media-player/src/main/java/com/wanbaohe/media/playback/ExoPlaybackEngine.kt:430-436 | feature/media-player/src/main/java/com/wanbaohe/media/playback/ExoInlineMediaPlaybackController.kt:226-232 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/domain/model/GameSetup.kt:39— feature/chess/src/main/java/com/wanbaohe/chess/domain/model/GameSetup.kt:39-45 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/domain/model/GameSetup.kt:39-45 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/domain/model/GameSetup.kt:56— feature/chess/src/main/java/com/wanbaohe/chess/domain/model/GameSetup.kt:56-62 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/domain/model/GameSetup.kt:55-61 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/NavigateAppScreenTool.kt:221— feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/NavigateAppScreenTool.kt:221-227 | feature/webview/src/main/java/com/shifenmiao/webview/HtmlMarkdownConverter.kt:378-384 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) feature/ad-watch/src/google/java/com/wanbaohe/adwatch/ads/GmsRewardedAdController.kt:66— feature/ad-watch/src/google/java/com/wanbaohe/adwatch/ads/GmsRewardedAdController.kt:66-72 | feature/webview/src/main/java/com/shifenmiao/webview/browser/AndroidWebViewNavigator.kt:169-175 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (17 corresponding lines) · ×21
Edited copy of a member (17 corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidStateSubPipeline.kt:284— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidStateSubPipeline.kt:284-300 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlStateSubPipeline.kt:344-368 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/theme/ThemeResolver.kt:388— libs/diagram/src/upstream/java/com/hrm/diagram/render/theme/ThemeResolver.kt:388-404 | libs/diagram/src/upstream/java/com/hrm/diagram/render/theme/ThemeResolver.kt:406-422 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:553— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:553-572 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:706-722 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/layout/ColumnRenderer.kt:44— core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/layout/ColumnRenderer.kt:44-60 | core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/layout/RowRenderer.kt:43-59 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupProjectStore.kt:426— feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupProjectStore.kt:426-442 | feature/text-card/src/main/java/com/wanbaohe/textcard/data/project/AndroidTextCardProjectStore.kt:354-377 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) feature/calendar/src/main/java/com/wanbaohe/calendar/ui/CalendarAnimations.kt:43— feature/calendar/src/main/java/com/wanbaohe/calendar/ui/CalendarAnimations.kt:43-73 | feature/calendar/src/main/java/com/wanbaohe/calendar/ui/CalendarAnimations.kt:79-95 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) REDACTED:69— REDACTED:69-85 | REDACTED:91-110 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) core/database/src/main/java/com/shifenmiao/database/passwordvault/entity/PasswordVaultEntryEntity.kt:51— core/database/src/main/java/com/shifenmiao/database/passwordvault/entity/PasswordVaultEntryEntity.kt:51-67 | core/domain/src/main/kotlin/com/t8rin/imagetoolbox/core/domain/saving/model/ImageSaveTarget.kt:50-68 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) feature/marktodo/src/main/java/com/shifenmiao/marktodo/screenLogic/CategoryDetailComponent.kt:270— feature/marktodo/src/main/java/com/shifenmiao/marktodo/screenLogic/CategoryDetailComponent.kt:270-286 | feature/marktodo/src/main/java/com/shifenmiao/marktodo/screenLogic/MarkTodoComponent.kt:353-369 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/inline/InlineModelAdapter.kt:510— libs/markdown/src/upstream/java/com/hrm/markdown/renderer/inline/InlineModelAdapter.kt:510-532 | libs/markdown/src/upstream/java/com/hrm/markdown/renderer/inline/InlineModelAdapter.kt:578-594 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) feature/marktodo/src/main/java/com/shifenmiao/marktodo/screenLogic/CategoryDetailComponent.kt:313— feature/marktodo/src/main/java/com/shifenmiao/marktodo/screenLogic/CategoryDetailComponent.kt:313-330 | feature/marktodo/src/main/java/com/shifenmiao/marktodo/screenLogic/MarkTodoComponent.kt:240-256 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) feature/webview/src/main/java/com/shifenmiao/webview/utils/WebViewExportUtils.kt:450— feature/webview/src/main/java/com/shifenmiao/webview/utils/WebViewExportUtils.kt:450-466 | feature/webview/src/main/java/com/shifenmiao/webview/utils/WebViewExportUtils.kt:478-494 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) feature/login/src/main/java/com/shifenmiao/login/viewModel/LoginComponent.kt:641— feature/login/src/main/java/com/shifenmiao/login/viewModel/LoginComponent.kt:641-657 | feature/login/src/main/java/com/shifenmiao/login/viewModel/LoginComponent.kt:659-676 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/service/AgentCreationService.kt:547— feature/ai/src/main/java/com/shifenmiao/ai/service/AgentCreationService.kt:547-563 | feature/ai/src/main/java/com/shifenmiao/ai/service/PromptCreationService.kt:466-482 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/dsl/DynamicUiBuilder.kt:385— core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/dsl/DynamicUiBuilder.kt:385-401 | core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/modifier/ModifierRegistry.kt:125-141 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) feature/habit-tracker/src/main/java/com/wanbaohe/habittracker/screen/tab/CheckInTab.kt:238— feature/habit-tracker/src/main/java/com/wanbaohe/habittracker/screen/tab/CheckInTab.kt:238-258 | feature/record-center/src/main/java/com/wanbaohe/recordcenter/screen/RecordListScreen.kt:605-621 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) core/base/src/main/java/com/shifenmiao/base/utils/ColorBuilder.kt:38— core/base/src/main/java/com/shifenmiao/base/utils/ColorBuilder.kt:38-54 | core/base/src/main/java/com/shifenmiao/base/utils/ColorBuilder.kt:57-73 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/component/AgentJsonEditorComponent.kt:113— feature/ai/src/main/java/com/shifenmiao/ai/component/AgentJsonEditorComponent.kt:113-130 | feature/markdown-edit/src/main/java/com/wanbaohe/markdown/edit/component/MarkdownEditorComponent.kt:549-565 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) feature/ai-image/src/main/java/com/shifenmiao/ai/image/controllers/AIImageComponent.kt:95— feature/ai-image/src/main/java/com/shifenmiao/ai/image/controllers/AIImageComponent.kt:95-111 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/screenLogic/DrawComponent.kt:351-368 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/screenLogic/LimitsResizeComponent.kt:134— feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/screenLogic/LimitsResizeComponent.kt:134-151 | feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/screenLogic/WeightResizeComponent.kt:153-169 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) feature/compare/src/main/java/com/t8rin/imagetoolbox/feature/compare/presentation/screenLogic/CompareComponent.kt:206— feature/compare/src/main/java/com/t8rin/imagetoolbox/feature/compare/presentation/screenLogic/CompareComponent.kt:206-222 | feature/compare/src/main/java/com/t8rin/imagetoolbox/feature/compare/presentation/screenLogic/CompareComponent.kt:325-342 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (16 corresponding lines) · ×21
Edited copy of a member (16 corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/GameQueryUseCase.kt:127— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/GameQueryUseCase.kt:127-142 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/GameQueryUseCase.kt:125-140 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupDocumentCodec.kt:708— feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupDocumentCodec.kt:708-724 | feature/text-card/src/main/java/com/wanbaohe/textcard/data/project/TextCardDocumentCodec.kt:565-580 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/domain/GameArbiter.kt:60— feature/chess/src/main/java/com/wanbaohe/chess/domain/GameArbiter.kt:60-75 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/domain/GameArbiter.kt:54-69 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/component/AIDuelChatComponent.kt:791— feature/ai/src/main/java/com/shifenmiao/ai/component/AIDuelChatComponent.kt:791-806 | feature/ai/src/main/java/com/shifenmiao/ai/component/AIDuelChatComponent.kt:808-823 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/AgentToolRegistry.kt:119— feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/AgentToolRegistry.kt:119-137 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/AgentToolRegistry.kt:288-303 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) core/data/src/main/java/com/t8rin/imagetoolbox/core/data/image/AndroidShareProvider.kt:193— core/data/src/main/java/com/t8rin/imagetoolbox/core/data/image/AndroidShareProvider.kt:193-210 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/ContextUtils.kt:773-788 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/block/HeadingRenderer.kt:29— libs/markdown/src/upstream/java/com/hrm/markdown/renderer/block/HeadingRenderer.kt:29-44 | libs/markdown/src/upstream/java/com/hrm/markdown/renderer/block/HeadingRenderer.kt:53-68 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/PixelationParamsSelector.kt:37— feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/PixelationParamsSelector.kt:37-52 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/PrivacyBlurParamsSelector.kt:45-61 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) feature/ai-detect/src/main/java/com/wanbaohe/aidetect/component/AiDetectComponent.kt:142— feature/ai-detect/src/main/java/com/wanbaohe/aidetect/component/AiDetectComponent.kt:142-157 | feature/ai-detect/src/main/java/com/wanbaohe/aidetect/component/AiDetectComponent.kt:181-196 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) feature/marktodo/src/main/java/com/shifenmiao/marktodo/service/MarkTodoServiceImpl.kt:186— feature/marktodo/src/main/java/com/shifenmiao/marktodo/service/MarkTodoServiceImpl.kt:186-201 | feature/marktodo/src/main/java/com/shifenmiao/marktodo/service/MarkTodoServiceImpl.kt:442-457 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/screenLogic/FormatConversionComponent.kt:129— feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/screenLogic/FormatConversionComponent.kt:129-144 | feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:157-175 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) feature/id-photo/src/main/java/com/wanbaohe/idphoto/presentation/components/BackgroundPanel.kt:62— feature/id-photo/src/main/java/com/wanbaohe/idphoto/presentation/components/BackgroundPanel.kt:62-77 | feature/id-photo/src/main/java/com/wanbaohe/idphoto/presentation/components/BeautyGroupPanel.kt:71-87 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) feature/image-viewer/src/main/java/com/wanbaohe/imageviewer/components/ImageViewerScreen.kt:223— feature/image-viewer/src/main/java/com/wanbaohe/imageviewer/components/ImageViewerScreen.kt:223-238 | feature/image-viewer/src/main/java/com/wanbaohe/imageviewer/components/ImageViewerScreen.kt:245-260 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) core/data/src/main/java/com/t8rin/imagetoolbox/core/data/image/AndroidImageTransformer.kt:66— core/data/src/main/java/com/t8rin/imagetoolbox/core/data/image/AndroidImageTransformer.kt:66-83 | core/data/src/main/java/com/t8rin/imagetoolbox/core/data/image/AndroidImageTransformer.kt:89-104 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/LazyUtils.kt:59— core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/LazyUtils.kt:59-74 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/LazyUtils.kt:91-108 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/buttons/CompareButton.kt:45— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/buttons/CompareButton.kt:45-60 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/buttons/ZoomButton.kt:45-60 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) core/ui/src/main/java/com/wanbaohe/base/ui/button/Buttons.kt:62— core/ui/src/main/java/com/wanbaohe/base/ui/button/Buttons.kt:62-77 | core/ui/src/main/java/com/wanbaohe/base/ui/button/Buttons.kt:85-102 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/block/AdmonitionRenderer.kt:51— libs/markdown/src/upstream/java/com/hrm/markdown/renderer/block/AdmonitionRenderer.kt:51-66 | libs/markdown/src/upstream/java/com/hrm/markdown/renderer/block/CustomContainerRenderer.kt:61-76 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) feature/webview/src/main/java/com/shifenmiao/webview/browser/BrowserComponent.kt:481— feature/webview/src/main/java/com/shifenmiao/webview/browser/BrowserComponent.kt:481-496 | feature/webview/src/main/java/com/shifenmiao/webview/browser/BrowserComponent.kt:658-676 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) feature/lifetime/src/main/java/com/shifenmiao/lifetime/ui/HourglassHeroCard.kt:361— feature/lifetime/src/main/java/com/shifenmiao/lifetime/ui/HourglassHeroCard.kt:361-376 | feature/lifetime/src/main/java/com/shifenmiao/lifetime/ui/HourglassHeroCard.kt:387-407 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuSettingsScreen.kt:262— feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuSettingsScreen.kt:262-280 | feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessSettingsScreen.kt:261-276 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Low cohesion: CollageMakerComponent (LCOM4 12) feature/collage-maker/src/main/java/com/t8rin/imagetoolbox/collage_maker/presentation/screenLogic/CollageMakerComponent.kt:57— CollageMakerComponent's methods fall into 12 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 12 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: ItemListComponent (LCOM4 10) feature/online/src/main/java/com/shifenmiao/online/component/ItemListComponent.kt:66— ItemListComponent's methods fall into 10 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 10 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: AgentLoopExecutor (LCOM4 6) feature/ai/src/main/java/com/shifenmiao/ai/agent/AgentLoopExecutor.kt:75— AgentLoopExecutor'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: FiltersComponent (LCOM4 6) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/screenLogic/FiltersComponent.kt:76— FiltersComponent'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: ChatInputComponent (LCOM4 5) feature/ai/src/main/java/com/shifenmiao/ai/logic/ChatInputComponent.kt:65— ChatInputComponent'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: AsciiArtComponent (LCOM4 5) feature/ascii-art/src/main/java/com/t8rin/imagetoolbox/feature/ascii_art/presentation/screenLogic/AsciiArtComponent.kt:53— AsciiArtComponent'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: RecordEditor (LCOM4 5) feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/component/RecordEditor.kt:35— RecordEditor'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: AppComponent (LCOM4 5) feature/common/src/main/java/com/shifenmiao/common/logic/AppComponent.kt:92— AppComponent'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: NoiseGenerationComponent (LCOM4 5) feature/noise-generation/src/main/java/com/t8rin/imagetoolbox/noise_generation/presentation/screenLogic/NoiseGenerationComponent.kt:58— NoiseGenerationComponent'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: SingleEditComponent (LCOM4 5) feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/screenLogic/SingleEditComponent.kt:92— SingleEditComponent'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: AddFiltersSheetComponent (LCOM4 4) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheetComponent.kt:67— AddFiltersSheetComponent'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: CreateAIPromptComponent (LCOM4 4) feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIPromptComponent.kt:84— CreateAIPromptComponent'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: RootComponent (LCOM4 4) feature/app/src/main/java/com/t8rin/imagetoolbox/feature/root/presentation/screenLogic/RootComponent.kt:88— RootComponent'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: GomokuLibraryComponent (LCOM4 4) feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuLibraryComponent.kt:49— GomokuLibraryComponent'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: GradientMakerComponent (LCOM4 4) feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/presentation/screenLogic/GradientMakerComponent.kt:75— GradientMakerComponent'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: ImageCutterComponent (LCOM4 4) feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/screenLogic/ImageCutterComponent.kt:65— ImageCutterComponent'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: AndroidPdfHelper (LCOM4 4) feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/data/AndroidPdfHelper.kt:91— AndroidPdfHelper'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: AIAddEngineComponent (LCOM4 4) feature/settings/src/main/java/com/wanbaohe/setting/ai/component/AIAddEngineComponent.kt:41— AIAddEngineComponent'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: WallpapersExportComponent (LCOM4 4) feature/wallpapers-export/src/main/java/com/t8rin/imagetoolbox/feature/wallpapers_export/presentation/screenLogic/WallpapersExportComponent.kt:59— WallpapersExportComponent'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: WatermarkingComponent (LCOM4 4) feature/watermarking/src/main/java/com/shifenmiao/app/watermarking/presentation/screenLogic/WatermarkingComponent.kt:80— WatermarkingComponent'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: AndroidZipManager (LCOM4 4) feature/zip/src/main/java/com/t8rin/imagetoolbox/feature/zip/data/AndroidZipManager.kt:63— AndroidZipManager'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.
D4 · Code Duplication· Edited copy of a member (15 corresponding lines) · ×20
Edited copy of a member (15 corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlC4SubPipeline.kt:284— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlC4SubPipeline.kt:284-298 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlNetworkSubPipeline.kt:257-276 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidArchitectureSubPipeline.kt:139— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidArchitectureSubPipeline.kt:139-153 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidC4SubPipeline.kt:149-163 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupDocumentCodec.kt:398— feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupDocumentCodec.kt:398-412 | feature/text-card/src/main/java/com/wanbaohe/textcard/data/project/TextCardDocumentCodec.kt:361-378 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/LayoutComponents.kt:315— core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/LayoutComponents.kt:315-331 | core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/LayoutComponents.kt:339-353 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/sliders/custom_slider/CustomSliderColors.kt:101— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/sliders/custom_slider/CustomSliderColors.kt:101-115 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/switches/CupertinoSwitch.kt:390-406 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/page/PagesSelectionParser.kt:45— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/page/PagesSelectionParser.kt:45-60 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/components/PagesSelectionParser.kt:45-59 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/OnlinePlayUseCase.kt:442— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/OnlinePlayUseCase.kt:442-457 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/OnlinePlayUseCase.kt:363-377 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) feature/notification/src/main/java/com/wanbaohe/notification/component/NotificationComponent.kt:295— feature/notification/src/main/java/com/wanbaohe/notification/component/NotificationComponent.kt:295-309 | feature/notification/src/main/java/com/wanbaohe/notification/component/NotificationComponent.kt:311-325 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) feature/ocr-document/src/main/java/com/shifenmiao/feature/document/component/DocConvertTaskListComponent.kt:309— feature/ocr-document/src/main/java/com/shifenmiao/feature/document/component/DocConvertTaskListComponent.kt:309-324 | feature/ocr-document/src/main/java/com/shifenmiao/feature/document/component/OcrTaskListComponent.kt:423-437 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) core/storage/src/main/java/com/shifenmiao/storage/SearchHistoryStore.kt:35— core/storage/src/main/java/com/shifenmiao/storage/SearchHistoryStore.kt:35-49 | core/storage/src/main/java/com/shifenmiao/storage/SearchHistoryStore.kt:64-83 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) feature/file-transfer/src/main/java/com/wanbaohe/file_transfer/screen/components/ChatSessionList.kt:48— feature/file-transfer/src/main/java/com/wanbaohe/file_transfer/screen/components/ChatSessionList.kt:48-62 | feature/file-transfer/src/main/java/com/wanbaohe/file_transfer/screen/components/ChatSessionList.kt:70-87 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiAnalysisComponent.kt:261— feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiAnalysisComponent.kt:261-275 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiGameComponent.kt:621-636 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/domain/FenCodec.kt:87— feature/chess/src/main/java/com/wanbaohe/chess/domain/FenCodec.kt:87-101 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/domain/FenCodec.kt:63-77 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:486— feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:486-500 | feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/screenLogic/SingleEditComponent.kt:547-562 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuGameComponent.kt:187— feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuGameComponent.kt:187-204 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiGameComponent.kt:183-197 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/modifier/Pulsate.kt:42— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/modifier/Pulsate.kt:42-56 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/modifier/RotateAnimation.kt:42-56 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) feature/lifetime/src/main/java/com/shifenmiao/lifetime/data/CountdownEventRepository.kt:72— feature/lifetime/src/main/java/com/shifenmiao/lifetime/data/CountdownEventRepository.kt:72-86 | feature/lifetime/src/main/java/com/shifenmiao/lifetime/data/CountdownEventRepository.kt:88-102 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) feature/marktodo/src/main/java/com/shifenmiao/marktodo/screenLogic/AddTodoComponent.kt:390— feature/marktodo/src/main/java/com/shifenmiao/marktodo/screenLogic/AddTodoComponent.kt:390-404 | feature/marktodo/src/main/java/com/shifenmiao/marktodo/screenLogic/TodoDetailComponent.kt:288-303 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) feature/online/src/main/java/com/shifenmiao/online/component/CreateNoteComponent.kt:183— feature/online/src/main/java/com/shifenmiao/online/component/CreateNoteComponent.kt:183-198 | feature/online/src/main/java/com/shifenmiao/online/component/CreateNoteComponent.kt:200-214 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) core/data/src/main/java/com/t8rin/imagetoolbox/core/data/workspace/search/MediaStoreWorkspaceFileScanner.kt:83— core/data/src/main/java/com/t8rin/imagetoolbox/core/data/workspace/search/MediaStoreWorkspaceFileScanner.kt:83-97 | core/data/src/main/java/com/t8rin/imagetoolbox/core/data/workspace/search/SafWorkspaceFileScanner.kt:116-130 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (13 corresponding lines) · ×20
Edited copy of a member (13 corresponding lines) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/palette_selection/PaletteMappings.kt:32— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/palette_selection/PaletteMappings.kt:32-44 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/palette_selection/PaletteMappings.kt:46-58 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/render/LayerEffectsProcessor.kt:340— feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/render/LayerEffectsProcessor.kt:340-353 | feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/render/LayerEffectsProcessor.kt:361-373 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) feature/period/src/main/java/com/wanbaohe/period/model/PeriodCalculations.kt:55— feature/period/src/main/java/com/wanbaohe/period/model/PeriodCalculations.kt:55-67 | feature/period/src/main/java/com/wanbaohe/period/model/PeriodCalculations.kt:139-151 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) core/database/src/main/java/com/shifenmiao/database/utils/DataBaseUtils.kt:43— core/database/src/main/java/com/shifenmiao/database/utils/DataBaseUtils.kt:43-55 | core/database/src/main/java/com/shifenmiao/database/utils/DataBaseUtils.kt:87-100 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) core/a2ui/src/main/java/com/wanbaohe/a2ui/domain/A2uiJsonPointerResolver.kt:131— core/a2ui/src/main/java/com/wanbaohe/a2ui/domain/A2uiJsonPointerResolver.kt:131-143 | core/a2ui/src/main/java/com/wanbaohe/a2ui/domain/A2uiJsonPointerResolver.kt:145-159 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/sliders/custom_slider/CustomSliderColors.kt:117— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/sliders/custom_slider/CustomSliderColors.kt:117-129 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/switches/CupertinoSwitch.kt:408-420 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) feature/visual-automation/src/main/java/com/wanbaohe/visual/automation/service/VisualAutomationService.kt:204— feature/visual-automation/src/main/java/com/wanbaohe/visual/automation/service/VisualAutomationService.kt:204-216 | feature/visual-automation/src/main/java/com/wanbaohe/visual/automation/service/VisualAutomationService.kt:218-230 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/display/DividerRenderer.kt:43— core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/display/DividerRenderer.kt:43-56 | core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/display/IconRenderer.kt:46-58 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/graph/GraphClusterLayout.kt:62— libs/diagram/src/upstream/java/com/hrm/diagram/render/graph/GraphClusterLayout.kt:62-75 | libs/diagram/src/upstream/java/com/hrm/diagram/render/graph/GraphClusterLayout.kt:77-89 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:1061— core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:1061-1073 | core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:1076-1088 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) feature/iching-divination/src/main/java/com/wanbaohe/iching/domain/IChingInterpretationService.kt:130— feature/iching-divination/src/main/java/com/wanbaohe/iching/domain/IChingInterpretationService.kt:130-142 | feature/poem/src/main/java/com/wanbaohe/poem/service/PoemInsightService.kt:147-159 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/presentation/model/UiFontFamily.kt:160— core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/presentation/model/UiFontFamily.kt:160-176 | core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/presentation/model/UiFontFamily.kt:178-190 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/repository/DefaultPromptRepository.kt:34— feature/ai/src/main/java/com/shifenmiao/ai/repository/DefaultPromptRepository.kt:34-46 | feature/ai/src/main/java/com/shifenmiao/ai/repository/DefaultPromptRepository.kt:48-62 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) feature/search/src/main/java/com/shifenmiao/search/logic/SearchComponent.kt:137— feature/search/src/main/java/com/shifenmiao/search/logic/SearchComponent.kt:137-152 | feature/search/src/main/java/com/shifenmiao/search/logic/SearchComponent.kt:154-166 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/utils/AutoContentBasedColors.kt:64— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/utils/AutoContentBasedColors.kt:64-78 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/utils/AutoContentBasedColors.kt:96-108 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:444— feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:444-456 | feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIPromptComponent.kt:481-493 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) feature/poem/src/main/java/com/wanbaohe/poem/service/PoemInsightService.kt:129— feature/poem/src/main/java/com/wanbaohe/poem/service/PoemInsightService.kt:129-141 | feature/poem/src/main/java/com/wanbaohe/poem/service/PoemService.kt:256-268 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) core/model/src/main/java/com/shifenmiao/model/remote/ShowBindPhoneConfig.kt:31— core/model/src/main/java/com/shifenmiao/model/remote/ShowBindPhoneConfig.kt:31-45 | core/model/src/main/java/com/shifenmiao/model/remote/AgentSensitiveCheckConfig.kt:29-41 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/screenLogic/GifToolsComponent.kt:344— feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/screenLogic/GifToolsComponent.kt:344-356 | feature/svg-maker/src/main/java/com/t8rin/imagetoolbox/feature/svg_maker/presentation/screenLogic/SvgMakerComponent.kt:162-174 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:370— feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:370-382 | feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/screenLogic/SingleEditComponent.kt:452-466 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (19 lines × 2) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterTemplateCreationSheet.kt:221— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterTemplateCreationSheet.kt:221-239 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/addEditMaskSheet/AddEditMaskSheet.kt:178-196 — 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 `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterTemplateCreationSheet.kt:221` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19 lines × 2) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/BilaterialBlurParamsItem.kt:99— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/BilaterialBlurParamsItem.kt:99-117 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/LinearGaussianParamsItem.kt:100-118 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/BilaterialBlurParamsItem.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/LinearGaussianParamsItem.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 83 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 `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/BilaterialBlurParamsItem.kt:99` 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 (19 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/confetti/Particles.kt:165— core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/confetti/Particles.kt:165-183 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/confetti/Particles.kt:353-371 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/confetti/Particles.kt:165` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (19 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/selection/ImageSelector.kt:103— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/selection/ImageSelector.kt:103-121 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/selection/ImageSelector.kt:164-182 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/selection/ImageSelector.kt:103` 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 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/image/ImagePager.kt:219— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/image/ImagePager.kt:219-237 | feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaImagePager.kt:218-236 — before extracting anything, compare `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/image/ImagePager.kt` and `feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaImagePager.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 208 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/image/ImagePager.kt:219` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaImagePager.kt:217` calls `getOrNull` and `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/image/ImagePager.kt:218` 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 (19 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/modifier/MeshGradient.kt:87— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/modifier/MeshGradient.kt:87-105 | feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/data/AndroidGradientMaker.kt:157-175 — before extracting anything, compare `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/modifier/MeshGradient.kt` and `feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/data/AndroidGradientMaker.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 134 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/modifier/MeshGradient.kt:87` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/utils/FullscreenPopup.kt:131— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/utils/FullscreenPopup.kt:131-149 | libs/modalsheet/src/main/java/com/t8rin/modalsheet/FullscreenPopup.kt:157-175 — before extracting anything, compare `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/utils/FullscreenPopup.kt` and `libs/modalsheet/src/main/java/com/t8rin/modalsheet/FullscreenPopup.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 47 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 (19 lines × 2) feature/ai/src/main/java/com/shifenmiao/ai/ui/JsonTreeViewer.kt:159— feature/ai/src/main/java/com/shifenmiao/ai/ui/JsonTreeViewer.kt:159-177 | feature/ai/src/main/java/com/shifenmiao/ai/ui/JsonTreeViewer.kt:210-228 — 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/ai/src/main/java/com/shifenmiao/ai/ui/JsonTreeViewer.kt:159` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19 lines × 2) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:144— feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:144-162 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt:143-161 — before extracting anything, compare `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt` and `feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 239 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 `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.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. Note first that the copies are not typed on the same thing: the declarations holding them bind `component` to `ApngToolsComponent` in one and `WebpToolsComponent` 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 (19 lines × 2) feature/blessing-wall/src/main/java/com/wanbaohe/blessingwall/screen/BlessingWallScreen.kt:674— feature/blessing-wall/src/main/java/com/wanbaohe/blessingwall/screen/BlessingWallScreen.kt:674-692 | feature/blessing-wall/src/main/java/com/wanbaohe/blessingwall/screen/BlessingWallScreen.kt:737-755 — 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/blessing-wall/src/main/java/com/wanbaohe/blessingwall/screen/BlessingWallScreen.kt:674` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19 lines × 2) feature/boardgame/src/main/java/com/wanbaohe/boardgame/ui/AiPickerBottomSheet.kt:67— feature/boardgame/src/main/java/com/wanbaohe/boardgame/ui/AiPickerBottomSheet.kt:67-85 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/ui/XiangqiAiPickerBottomSheet.kt:103-121 — 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 `feature/boardgame/src/main/java/com/wanbaohe/boardgame/ui/AiPickerBottomSheet.kt:67` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19 lines × 2) feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:868— feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:868-886 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuGameComponent.kt:995-1013 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuGameComponent.kt` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 106 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 `feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:868` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19 lines × 2) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessSettingsScreen.kt:310— feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessSettingsScreen.kt:310-328 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuSettingsScreen.kt:314-332 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessSettingsScreen.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuSettingsScreen.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 138 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 `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessSettingsScreen.kt:310` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19 lines × 2) feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/AwsSigV4Signer.kt:65— feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/AwsSigV4Signer.kt:65-83 | feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/BaiduBosSigner.kt:68-86 — before extracting anything, compare `feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/AwsSigV4Signer.kt` and `feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/BaiduBosSigner.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 70 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 `feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/AwsSigV4Signer.kt:65` 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 (19 lines × 2) feature/crop/src/main/java/com/t8rin/imagetoolbox/feature/crop/presentation/CropContent.kt:200— feature/crop/src/main/java/com/t8rin/imagetoolbox/feature/crop/presentation/CropContent.kt:200-218 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/DrawContent.kt:226-244 — 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 `feature/crop/src/main/java/com/t8rin/imagetoolbox/feature/crop/presentation/CropContent.kt:200` 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: `Icons` names `androidx.compose.material.icons.Icons` in one and `com.t8rin.imagetoolbox.core.resources.Icons` 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 (19 lines × 2) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/screenLogic/FiltersComponent.kt:679— feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/screenLogic/FiltersComponent.kt:679-697 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/screenLogic/FiltersComponent.kt:743-761 — 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/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/screenLogic/FiltersComponent.kt:679` 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 lines × 2) feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:90— feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:90-108 | feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt:105-123 — before extracting anything, compare `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt` and `feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 190 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 `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.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. Note first that the copies are not typed on the same thing: the declarations holding them bind `component` to `FormatConversionComponent` in one and `ResizeAndConvertComponent` 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 (19 lines × 2) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/components/TextEditDialog.kt:390— feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/components/TextEditDialog.kt:390-408 | feature/text-card/src/main/java/com/wanbaohe/textcard/presentation/editor/panels/TextStylePanel.kt:631-649 — 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 `feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/components/TextEditDialog.kt:390` 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 lines × 2) feature/measurement/src/main/java/com/wanbaohe/measurement/screen/MeasurementScreen.kt:608— feature/measurement/src/main/java/com/wanbaohe/measurement/screen/MeasurementScreen.kt:608-626 | feature/measurement/src/main/java/com/wanbaohe/measurement/screen/MeasurementScreen.kt:719-737 — 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/measurement/src/main/java/com/wanbaohe/measurement/screen/MeasurementScreen.kt:608` 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 lines × 2) libs/cropper/src/main/java/com/t8rin/cropper/util/ImageContentScaleUtil.kt:87— libs/cropper/src/main/java/com/t8rin/cropper/util/ImageContentScaleUtil.kt:87-105 | libs/image/src/main/java/com/t8rin/image/util/ImageContentScaleUtil.kt:87-105 — before extracting anything, compare `libs/cropper/src/main/java/com/t8rin/cropper/util/ImageContentScaleUtil.kt` and `libs/image/src/main/java/com/t8rin/image/util/ImageContentScaleUtil.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. Note first that the copies are not typed on the same thing: `Canvas` names `androidx.compose.foundation.Canvas` in one and `androidx.compose.ui.graphics.Canvas` 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.
D4 · Code Duplication· Edited copy of a member (18 corresponding lines) · ×19
Edited copy of a member (18 corresponding lines) core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:413— core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:413-430 | core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:435-452 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/data/search/ChessSearch.kt:196— feature/chess/src/main/java/com/wanbaohe/chess/data/search/ChessSearch.kt:196-213 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/search/XiangqiSearch.kt:209-229 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/display/TextRenderer.kt:75— core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/display/TextRenderer.kt:75-92 | core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:1479-1496 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) feature/compass/src/main/java/com/wanbaohe/compass/ui/CompassDial.kt:227— feature/compass/src/main/java/com/wanbaohe/compass/ui/CompassDial.kt:227-244 | feature/compass/src/main/java/com/wanbaohe/compass/ui/luopan/LuopanDial.kt:435-452 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) core/model/src/main/java/com/shifenmiao/model/wechat/common/MediaMessage.kt:77— core/model/src/main/java/com/shifenmiao/model/wechat/common/MediaMessage.kt:77-95 | core/model/src/main/java/com/shifenmiao/model/wechat/common/MediaObject.kt:151-168 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/service/AgentCreationService.kt:508— feature/ai/src/main/java/com/shifenmiao/ai/service/AgentCreationService.kt:508-525 | feature/ai/src/main/java/com/shifenmiao/ai/service/PromptCreationService.kt:427-444 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) core/camera/src/main/java/com/wanbaohe/camera/PhotoFileProcessor.kt:202— core/camera/src/main/java/com/wanbaohe/camera/PhotoFileProcessor.kt:202-220 | feature/id-photo/src/main/java/com/wanbaohe/idphoto/presentation/screenLogic/IdPhotoComponent.kt:691-708 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) core/database/src/main/java/com/shifenmiao/database/item/dao/ItemDataDao.kt:128— core/database/src/main/java/com/shifenmiao/database/item/dao/ItemDataDao.kt:128-145 | core/database/src/main/java/com/shifenmiao/database/item/dao/ItemDataDao.kt:148-170 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/UriUtils.kt:50— core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/UriUtils.kt:50-67 | core/utils/src/main/java/com/t8rin/imagetoolbox/core/utils/UriUtils.kt:60-79 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) feature/text-card/src/main/java/com/wanbaohe/textcard/data/render/PaperTexturePainter.kt:108— feature/text-card/src/main/java/com/wanbaohe/textcard/data/render/PaperTexturePainter.kt:108-127 | feature/text-card/src/main/java/com/wanbaohe/textcard/presentation/editor/PaperTexturePreview.kt:103-120 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessSettingsScreen.kt:285— feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessSettingsScreen.kt:285-302 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuSettingsScreen.kt:289-306 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) feature/online/src/main/java/com/shifenmiao/online/component/CreateHtmlComponent.kt:392— feature/online/src/main/java/com/shifenmiao/online/component/CreateHtmlComponent.kt:392-409 | feature/online/src/main/java/com/shifenmiao/online/component/CreateNoteComponent.kt:536-554 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) core/base/src/main/java/com/shifenmiao/base/audio/NetworkAudioPlayer.kt:67— core/base/src/main/java/com/shifenmiao/base/audio/NetworkAudioPlayer.kt:67-84 | core/base/src/main/java/com/shifenmiao/base/audio/NetworkAudioPlayer.kt:115-133 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/adapter/SmbFileSystemAdapter.kt:144— feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/adapter/SmbFileSystemAdapter.kt:144-163 | feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/adapter/SmbFileSystemAdapter.kt:299-316 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/component/ChessAnalysisComponent.kt:142— feature/chess/src/main/java/com/wanbaohe/chess/component/ChessAnalysisComponent.kt:142-160 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuAnalysisComponent.kt:154-171 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/screenLogic/MarkupLayersComponent.kt:2758— feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/screenLogic/MarkupLayersComponent.kt:2758-2775 | feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/screenLogic/MarkupLayersComponent.kt:2777-2795 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) core/database/src/main/java/com/shifenmiao/database/activity/ActivityLogRecorder.kt:380— core/database/src/main/java/com/shifenmiao/database/activity/ActivityLogRecorder.kt:380-397 | core/database/src/main/java/com/shifenmiao/database/activity/ActivityLogRecorder.kt:408-425 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/internal/MarkdownEngineHost.kt:65— libs/markdown/src/upstream/java/com/hrm/markdown/renderer/internal/MarkdownEngineHost.kt:65-82 | libs/markdown/src/upstream/java/com/hrm/markdown/renderer/internal/MarkdownEngineHost.kt:97-114 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) feature/speed-test/src/main/java/com/wanbaohe/speedtest/data/SpeedTestRepositoryImpl.kt:255— feature/speed-test/src/main/java/com/wanbaohe/speedtest/data/SpeedTestRepositoryImpl.kt:255-272 | feature/speed-test/src/main/java/com/wanbaohe/speedtest/data/SpeedTestRepositoryImpl.kt:275-293 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×18
Members sharing a duplicated core (4 members, 50+ identical tokens) core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/ColumnSelectorRenderer.kt:47— core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/ColumnSelectorRenderer.kt:47-96 | core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/GridSelectorRenderer.kt:49-100 | core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/ListSelectorRenderer.kt:53-124 | core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/RowSelectorRenderer.kt:49-98 — 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) core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/FilePickerRenderer.kt:58— core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/FilePickerRenderer.kt:58-122 | core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/FolderPickerRenderer.kt:55-94 | core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/ImagePickerRenderer.kt:56-103 | core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/LocationPickerRenderer.kt:48-106 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) core/database/src/main/java/com/shifenmiao/database/activity/ActivityLogRecorder.kt:451— core/database/src/main/java/com/shifenmiao/database/activity/ActivityLogRecorder.kt:451-474 | core/database/src/main/java/com/shifenmiao/database/activity/ActivityLogRecorder.kt:502-525 | core/database/src/main/java/com/shifenmiao/database/activity/ActivityLogRecorder.kt:756-779 | core/database/src/main/java/com/shifenmiao/database/activity/ActivityLogRecorder.kt:805-827 — 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) core/network/src/main/java/com/shifenmiao/network/service/WebSearchService.kt:164— core/network/src/main/java/com/shifenmiao/network/service/WebSearchService.kt:164-187 | core/network/src/main/java/com/shifenmiao/network/service/WebSearchService.kt:192-215 | core/network/src/main/java/com/shifenmiao/network/service/WebSearchService.kt:220-243 | core/network/src/main/java/com/shifenmiao/network/service/WebSearchService.kt:248-271 — 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) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/FileReorderVerticalList.kt:120— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/FileReorderVerticalList.kt:120-347 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rearrange/components/PdfPagesRearrangeGrid.kt:93-232 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_pages/components/PdfPagesRemoveGrid.kt:104-299 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rotate/components/PdfPagesRotationGrid.kt:96-263 — 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) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassProgressIndicator.kt:51— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassProgressIndicator.kt:51-76 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassProgressIndicator.kt:89-112 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassProgressIndicator.kt:129-156 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassProgressIndicator.kt:168-191 — 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) core/weather/src/nonfoss/java/com/wanbaohe/core/weather/data/source/QWeatherDataSource.kt:73— core/weather/src/nonfoss/java/com/wanbaohe/core/weather/data/source/QWeatherDataSource.kt:73-119 | core/weather/src/nonfoss/java/com/wanbaohe/core/weather/data/source/QWeatherDataSource.kt:121-165 | core/weather/src/nonfoss/java/com/wanbaohe/core/weather/data/source/QWeatherDataSource.kt:167-217 | core/weather/src/nonfoss/java/com/wanbaohe/core/weather/data/source/QWeatherDataSource.kt:397-445 — 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) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/components/ApngParamsSelector.kt:64— feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/components/ApngParamsSelector.kt:64-169 | feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/components/GifParamsSelector.kt:64-205 | feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/components/StackingParamsSelector.kt:52-91 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/components/WebpParamsSelector.kt:59-143 — 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) feature/app/src/main/java/com/wanbaohe/app/ui/VerifyContactSheet.kt:78— feature/app/src/main/java/com/wanbaohe/app/ui/VerifyContactSheet.kt:78-248 | feature/profile/src/main/java/com/wanbaohe/profile/screen/BindEmailSheet.kt:70-188 | feature/profile/src/main/java/com/wanbaohe/profile/screen/ChangePasswordSheet.kt:74-202 | feature/profile/src/main/java/com/wanbaohe/profile/screen/VerifyEmailSheet.kt:72-162 — 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) feature/base64-tools/src/main/java/com/t8rin/imagetoolbox/feature/base64_tools/presentation/Base64ToolsContent.kt:86— feature/base64-tools/src/main/java/com/t8rin/imagetoolbox/feature/base64_tools/presentation/Base64ToolsContent.kt:86-276 | feature/crop/src/main/java/com/t8rin/imagetoolbox/feature/crop/presentation/CropContent.kt:106-409 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/DrawContent.kt:103-398 | feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/SingleEditContent.kt:93-453 — 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) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt:92— feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt:92-165 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuAnalysisScreen.kt:93-173 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiAnalysisScreen.kt:92-166 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiGameScreen.kt:133-347 — 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) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/tool/PixelationCommands.kt:197— feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/tool/PixelationCommands.kt:197-211 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/tool/PixelationCommands.kt:213-231 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/tool/PixelationCommands.kt:252-270 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/tool/PixelationCommands.kt:272-301 — 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) feature/iching-divination/src/main/java/com/wanbaohe/iching/screen/IChingDivinationScreen.kt:393— feature/iching-divination/src/main/java/com/wanbaohe/iching/screen/IChingDivinationScreen.kt:393-437 | feature/iching-divination/src/main/java/com/wanbaohe/iching/screen/IChingDivinationScreen.kt:441-471 | feature/iching-divination/src/main/java/com/wanbaohe/iching/screen/IChingDivinationScreen.kt:550-577 | feature/iching-divination/src/main/java/com/wanbaohe/iching/screen/IChingDivinationScreen.kt:593-612 — 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) feature/lifetime/src/main/java/com/wanbaohe/lifetime/ai/tool/LifetimeToolSupport.kt:61— feature/lifetime/src/main/java/com/wanbaohe/lifetime/ai/tool/LifetimeToolSupport.kt:61-71 | feature/poem/src/main/java/com/wanbaohe/poem/ai/tool/PoemToolSupport.kt:80-90 | feature/record-center/src/main/java/com/wanbaohe/recordcenter/ai/tool/RecordCenterToolResults.kt:68-78 | feature/schedule/src/main/java/com/wanbaohe/schedule/ai/tool/ScheduleToolSupport.kt:61-71 — 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) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidArchitectureSubPipeline.kt:283— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidArchitectureSubPipeline.kt:283-335 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidBlockSubPipeline.kt:126-195 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidC4SubPipeline.kt:252-296 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlDitaaSubPipeline.kt:129-150 — 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) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidClassSubPipeline.kt:84— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidClassSubPipeline.kt:84-324 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidStateSubPipeline.kt:73-273 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlClassSubPipeline.kt:57-293 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlStateSubPipeline.kt:82-333 — 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) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidErSubPipeline.kt:298— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidErSubPipeline.kt:298-338 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidErSubPipeline.kt:468-539 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlErdSubPipeline.kt:450-483 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlErdSubPipeline.kt:594-645 — 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) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:630— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:630-647 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlDeploymentSubPipeline.kt:445-464 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlErdSubPipeline.kt:421-440 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlUsecaseSubPipeline.kt:654-671 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication· Edited copy of a member (24 corresponding lines) · ×18
Edited copy of a member (24 corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlArchimateSubPipeline.kt:436— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlArchimateSubPipeline.kt:436-459 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlNetworkSubPipeline.kt:462-485 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (24 corresponding lines) feature/schedule/src/main/java/com/wanbaohe/schedule/integration/SystemCalendarProviderAdapter.kt:129— feature/schedule/src/main/java/com/wanbaohe/schedule/integration/SystemCalendarProviderAdapter.kt:129-153 | feature/schedule/src/main/java/com/wanbaohe/schedule/integration/SystemCalendarProviderAdapter.kt:160-183 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (24 corresponding lines) feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/data/WatermarkRenderer.kt:312— feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/data/WatermarkRenderer.kt:312-335 | feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/data/WatermarkRenderer.kt:524-549 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (24 corresponding lines) feature/teleprompter/src/main/java/com/wanbaohe/teleprompter/ai/tool/ManageTeleprompterTool.kt:151— feature/teleprompter/src/main/java/com/wanbaohe/teleprompter/ai/tool/ManageTeleprompterTool.kt:151-174 | feature/teleprompter/src/main/java/com/wanbaohe/teleprompter/ai/tool/ManageTeleprompterTool.kt:176-211 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (24 corresponding lines) feature/dsh-client/src/main/java/com/wanbaohe/dsh/component/DshRootComponent.kt:985— feature/dsh-client/src/main/java/com/wanbaohe/dsh/component/DshRootComponent.kt:985-1008 | feature/dsh-client/src/main/java/com/wanbaohe/dsh/screen/ChatScreen.kt:760-783 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (24 corresponding lines) feature/image-splitting/src/main/java/com/t8rin/imagetoolbox/image_splitting/data/AndroidImageSplitter.kt:129— feature/image-splitting/src/main/java/com/t8rin/imagetoolbox/image_splitting/data/AndroidImageSplitter.kt:129-153 | feature/image-splitting/src/main/java/com/t8rin/imagetoolbox/image_splitting/data/AndroidImageSplitter.kt:161-184 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (24 corresponding lines) feature/household-items/src/main/java/com/wanbaohe/householditems/service/HouseholdService.kt:219— feature/household-items/src/main/java/com/wanbaohe/householditems/service/HouseholdService.kt:219-242 | feature/household-items/src/main/java/com/wanbaohe/householditems/service/HouseholdService.kt:250-275 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (24 corresponding lines) core/base/src/main/java/com/wanbaohe/base/ui/shapes/ChatBubbleShape.kt:41— core/base/src/main/java/com/wanbaohe/base/ui/shapes/ChatBubbleShape.kt:41-64 | core/base/src/main/java/com/wanbaohe/base/ui/shapes/LeftChatBubbleShape.kt:41-64 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (24 corresponding lines) feature/code-editor/src/main/java/com/wanbaohe/code/editor/component/CodeEditorComponent.kt:234— feature/code-editor/src/main/java/com/wanbaohe/code/editor/component/CodeEditorComponent.kt:234-257 | feature/code-editor/src/main/java/com/wanbaohe/code/editor/component/CodeEditorComponent.kt:268-295 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (24 corresponding lines) feature/code-editor/src/main/java/com/wanbaohe/code/editor/webview/WebViewCodeEditorState.kt:52— feature/code-editor/src/main/java/com/wanbaohe/code/editor/webview/WebViewCodeEditorState.kt:52-79 | feature/markdown-edit/src/main/java/com/wanbaohe/markdown/edit/webview/WebViewMarkdownEditorState.kt:45-68 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (24 corresponding lines) feature/file-transfer/src/main/java/com/wanbaohe/file_transfer/server/FileTransferServer.kt:1250— feature/file-transfer/src/main/java/com/wanbaohe/file_transfer/server/FileTransferServer.kt:1250-1276 | feature/file-transfer/src/main/java/com/wanbaohe/file_transfer/server/FileTransferServer.kt:1278-1301 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (24 corresponding lines) feature/ocr-document/src/main/java/com/shifenmiao/feature/document/repository/PaddleOcrRepository.kt:247— feature/ocr-document/src/main/java/com/shifenmiao/feature/document/repository/PaddleOcrRepository.kt:247-270 | feature/ocr-document/src/main/java/com/shifenmiao/feature/document/repository/PaddleOcrRepository.kt:282-305 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (24 corresponding lines) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:139— feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:139-162 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/screenLogic/WebpToolsComponent.kt:137-163 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (24 corresponding lines) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/block/MiscRenderers.kt:129— libs/markdown/src/upstream/java/com/hrm/markdown/renderer/block/MiscRenderers.kt:129-155 | libs/markdown/src/upstream/java/com/hrm/markdown/renderer/block/MiscRenderers.kt:163-186 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (24 corresponding lines) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/page/PageInputField.kt:47— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/page/PageInputField.kt:47-70 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/components/PageInputField.kt:47-70 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (24 corresponding lines) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/resize_group/components/BlurRadiusSelector.kt:51— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/resize_group/components/BlurRadiusSelector.kt:51-74 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/PixelSizeSelector.kt:46-69 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (24 corresponding lines) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheetComponent.kt:219— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheetComponent.kt:219-242 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheetComponent.kt:367-393 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (24 corresponding lines) core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/content_pickers/FileMaker.kt:85— core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/content_pickers/FileMaker.kt:85-109 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/content_pickers/FolderPicker.kt:71-94 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (6 lines × 3) feature/period/src/main/java/com/wanbaohe/period/service/PeriodService.kt:91— feature/period/src/main/java/com/wanbaohe/period/service/PeriodService.kt:91-96 | feature/period/src/main/java/com/wanbaohe/period/service/PeriodService.kt:116-121 | feature/period/src/main/java/com/wanbaohe/period/service/PeriodService.kt:150-155 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `feature/period/src/main/java/com/wanbaohe/period/service/PeriodService.kt:149` calls `toEpochDay` and `feature/period/src/main/java/com/wanbaohe/period/service/PeriodService.kt:90` 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 (6 lines × 3) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidRequirementSubPipeline.kt:137— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidRequirementSubPipeline.kt:137-142 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlActivitySubPipeline.kt:486-491 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlStateSubPipeline.kt:179-184 — 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 `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidRequirementSubPipeline.kt:137` 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 × 3) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/quad_components/NumberColorModelQuadItem.kt:60— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/quad_components/NumberColorModelQuadItem.kt:60-65 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/quad_components/NumberQuadItem.kt:52-57 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberTripleItem.kt:51-56 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/quad_components/NumberColorModelQuadItem.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/quad_components/NumberQuadItem.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 40 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/quad_components/NumberColorModelQuadItem.kt:66` calls `remember`, `mutableStateOf`, `toColor` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberTripleItem.kt:58` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 3) feature/ai/src/main/java/com/shifenmiao/ai/ui/JsonTreeViewer.kt:170— feature/ai/src/main/java/com/shifenmiao/ai/ui/JsonTreeViewer.kt:170-175 | feature/ai/src/main/java/com/shifenmiao/ai/ui/JsonTreeViewer.kt:221-226 | feature/settings/src/main/java/com/wanbaohe/setting/authcode/screen/AuthCodeSettingsScreen.kt:440-445 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (6 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/GameQueryUseCase.kt:52— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/GameQueryUseCase.kt:52-57 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/GameQueryUseCase.kt:52-57 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/GameQueryUseCase.kt:47-52 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/GameQueryUseCase.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/GameQueryUseCase.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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: `GameStatus` names `com.wanbaohe.chess.domain.model.GameStatus` in one and `com.wanbaohe.gomoku.domain.model.GameStatus` 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 × 3) feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt:161— feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt:161-166 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/OnlineMatchScreen.kt:161-166 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/OnlineMatchScreen.kt:161-166 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/OnlineMatchScreen.kt` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 428 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. Note first that the copies are not typed on the same thing: `FenCodec` names `com.wanbaohe.chess.domain.FenCodec` in one and `com.wanbaohe.gomoku.domain.FenCodec` 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 × 3) feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeAddEventScreen.kt:341— feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeAddEventScreen.kt:341-346 | feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeScreen.kt:724-729 | feature/lifetime/src/main/java/com/shifenmiao/lifetime/ui/EventPickerSheet.kt:279-284 — 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 (6 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/GameQueryUseCase.kt:73— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/GameQueryUseCase.kt:73-78 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/GameQueryUseCase.kt:71-76 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/GameQueryUseCase.kt:66-71 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/GameQueryUseCase.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/GameQueryUseCase.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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. Note first that the copies are not typed on the same thing: `GameDetail` names `com.wanbaohe.chess.application.dto.GameDetail` in one and `com.wanbaohe.gomoku.application.dto.GameDetail` 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 × 3) feature/chess/src/main/java/com/wanbaohe/chess/data/online/SignalingClientImpl.kt:245— feature/chess/src/main/java/com/wanbaohe/chess/data/online/SignalingClientImpl.kt:245-250 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/online/SignalingClientImpl.kt:245-250 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/online/SignalingClientImpl.kt:245-250 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/data/online/SignalingClientImpl.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/online/SignalingClientImpl.kt` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 129 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. Note first that the copies are not typed on the same thing: `OnlineRoomConfig` names `com.wanbaohe.chess.domain.model.OnlineRoomConfig` in one and `com.wanbaohe.gomoku.domain.model.OnlineRoomConfig` 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 × 3) feature/chess/src/main/java/com/wanbaohe/chess/domain/BoardSetupDraft.kt:115— feature/chess/src/main/java/com/wanbaohe/chess/domain/BoardSetupDraft.kt:115-120 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/domain/BoardSetupDraft.kt:109-114 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/domain/BoardSetupDraft.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.
Duplicated block (6 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt:499— feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt:499-504 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/router/screenLogic/GomokuRouterComponent.kt:443-448 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/router/screenLogic/XiangqiRouterComponent.kt:464-469 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/router/screenLogic/GomokuRouterComponent.kt` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 136 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 × 3) feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt:568— feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt:568-573 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/router/screenLogic/GomokuRouterComponent.kt:512-517 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/router/screenLogic/XiangqiRouterComponent.kt:533-538 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/router/screenLogic/GomokuRouterComponent.kt` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 136 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `template` to `ChessTTSTemplate` in one and `GomokuTTSTemplate` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (6 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt:575— feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt:575-580 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/router/screenLogic/GomokuRouterComponent.kt:519-524 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/router/screenLogic/XiangqiRouterComponent.kt:540-545 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/router/screenLogic/GomokuRouterComponent.kt` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 136 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `template` to `ChessTTSTemplate` in one and `GomokuTTSTemplate` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (6 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt:777— feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt:777-782 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/OnlineMatchScreen.kt:777-782 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/OnlineMatchScreen.kt:777-782 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/OnlineMatchScreen.kt` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 428 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 `feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt:777` 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) core/image-generation/src/main/java/com/shifenmiao/imagegeneration/di/ImageGenerationModule.kt:114— core/image-generation/src/main/java/com/shifenmiao/imagegeneration/di/ImageGenerationModule.kt:114-119 | core/image-generation/src/main/java/com/shifenmiao/imagegeneration/di/ImageGenerationModule.kt:138-143 | core/image-generation/src/overseas/java/com/shifenmiao/imagegeneration/di/OpenAiImageModule.kt:60-65 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `core/image-generation/src/main/java/com/shifenmiao/imagegeneration/di/ImageGenerationModule.kt:114` 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) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/preferences/PreferenceItemsGrid.kt:97— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/preferences/PreferenceItemsGrid.kt:97-102 | feature/app/src/main/java/com/wanbaohe/app/components/AddMenuFloatingPanel.kt:103-108 | feature/common/src/main/java/com/shifenmiao/common/components/FeaturedComponents.kt:435-440 — 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `index` to `Int): PreferenceItemTheme = when (index % 4` in one and `Int): AddMenuItemTheme = when (index % 4` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (6 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt:595— feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt:595-600 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/router/screenLogic/GomokuRouterComponent.kt:539-544 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/router/screenLogic/XiangqiRouterComponent.kt:560-565 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/router/screenLogic/GomokuRouterComponent.kt` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 136 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. Note first that the copies are not typed on the same thing: `R` names `com.wanbaohe.chess.R` in one and `com.wanbaohe.gomoku.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 (6 lines × 3) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupProjectStore.kt:428— feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupProjectStore.kt:428-434 | feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/recipe/AndroidRecipeStore.kt:54-59 | feature/text-card/src/main/java/com/wanbaohe/textcard/data/project/AndroidTextCardProjectStore.kt:356-362 — before extracting anything, compare `feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupProjectStore.kt` and `feature/text-card/src/main/java/com/wanbaohe/textcard/data/project/AndroidTextCardProjectStore.kt` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 256 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 `feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupProjectStore.kt:428` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication· Edited copy of a member (10 corresponding lines) · ×17
Edited copy of a member (10 corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlArchimateSubPipeline.kt:400— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlArchimateSubPipeline.kt:400-409 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlC4SubPipeline.kt:531-541 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidArchitectureSubPipeline.kt:445— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidArchitectureSubPipeline.kt:445-454 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidC4SubPipeline.kt:585-594 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/screenLogic/MarkupLayersComponent.kt:1470— feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/screenLogic/MarkupLayersComponent.kt:1470-1480 | feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/screenLogic/MarkupLayersComponent.kt:1928-1937 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/dsl/DynamicUiBuilder.kt:350— core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/dsl/DynamicUiBuilder.kt:350-365 | core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/modifier/ModifierRegistry.kt:113-122 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/parser/SchemaToIrMapper.kt:181— core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/parser/SchemaToIrMapper.kt:181-196 | core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/parser/SchemaToIrMapper.kt:198-207 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) feature/device-status/src/main/java/com/wanbaohe/devicestatus/screen/PhoneStatusFormatter.kt:122— feature/device-status/src/main/java/com/wanbaohe/devicestatus/screen/PhoneStatusFormatter.kt:122-131 | feature/speed-test/src/main/java/com/wanbaohe/speedtest/data/SpeedTestRepositoryImpl.kt:197-206 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) feature/calendar/src/main/java/com/wanbaohe/calendar/data/LunarJavaBridge.kt:259— feature/calendar/src/main/java/com/wanbaohe/calendar/data/LunarJavaBridge.kt:259-269 | feature/calendar/src/main/java/com/wanbaohe/calendar/data/LunarJavaBridge.kt:271-280 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) feature/dsh-client/src/main/java/com/wanbaohe/dsh/session/SessionStore.kt:598— feature/dsh-client/src/main/java/com/wanbaohe/dsh/session/SessionStore.kt:598-607 | feature/dsh-client/src/main/java/com/wanbaohe/dsh/session/SessionStore.kt:669-678 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) feature/dsh-client/src/main/java/com/wanbaohe/dsh/session/GoalStore.kt:57— feature/dsh-client/src/main/java/com/wanbaohe/dsh/session/GoalStore.kt:57-66 | feature/dsh-client/src/main/java/com/wanbaohe/dsh/session/GoalStore.kt:74-84 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/screenLogic/CloudStorageComponent.kt:284— feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/screenLogic/CloudStorageComponent.kt:284-296 | feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/screenLogic/CloudStorageComponent.kt:298-307 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) core/data/src/main/java/com/t8rin/imagetoolbox/core/data/image/AndroidShareProvider.kt:307— core/data/src/main/java/com/t8rin/imagetoolbox/core/data/image/AndroidShareProvider.kt:307-318 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/ContextUtils.kt:762-771 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) feature/settings/src/main/java/com/wanbaohe/setting/ai/component/AIEngineSettingsDetailComponent.kt:356— feature/settings/src/main/java/com/wanbaohe/setting/ai/component/AIEngineSettingsDetailComponent.kt:356-365 | feature/settings/src/main/java/com/wanbaohe/setting/ai/component/AIAddEngineComponent.kt:176-185 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheetComponent.kt:188— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheetComponent.kt:188-197 | feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/screenLogic/SingleEditComponent.kt:613-623 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/screenLogic/ImageStackingComponent.kt:231— feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/screenLogic/ImageStackingComponent.kt:231-240 | feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/screenLogic/ImageStitchingComponent.kt:297-306 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/adapter/S3CompatAdapter.kt:238— feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/adapter/S3CompatAdapter.kt:238-247 | REDACTED:238-248 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/AliyunOssAdapter.kt:55— feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/AliyunOssAdapter.kt:55-65 | feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/HuaweiObsAdapter.kt:48-57 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) feature/code-editor/src/main/java/com/wanbaohe/code/editor/component/CodeEditorComponent.kt:339— feature/code-editor/src/main/java/com/wanbaohe/code/editor/component/CodeEditorComponent.kt:339-350 | feature/markdown-edit/src/main/java/com/wanbaohe/markdown/edit/component/MarkdownEditorComponent.kt:513-522 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (21 lines × 2) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RubberStampParamsItem.kt:104— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RubberStampParamsItem.kt:104-124 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/VoronoiCrystallizeParamsItem.kt:124-144 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RubberStampParamsItem.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/VoronoiCrystallizeParamsItem.kt` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 96 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 `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RubberStampParamsItem.kt:104` 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 (21 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/UriUtils.kt:70— core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/UriUtils.kt:70-90 | core/utils/src/main/java/com/t8rin/imagetoolbox/core/utils/UriUtils.kt:88-108 — before extracting anything, compare `core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/UriUtils.kt` and `core/utils/src/main/java/com/t8rin/imagetoolbox/core/utils/UriUtils.kt` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 61 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 after the matched lines, `core/utils/src/main/java/com/t8rin/imagetoolbox/core/utils/UriUtils.kt:111` calls `fromSingleUri`, `lastModified`, `printStackTrace` and `core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/UriUtils.kt:92` 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 (21 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/editor/ToolRail.kt:70— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/editor/ToolRail.kt:70-90 | feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/editor/EditorScaffold.kt:1588-1608 — 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 (21 lines × 2) feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:582— feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:582-602 | feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt:565-585 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 625 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 `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:582` 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: `Close` names `androidx.compose.material.icons.outlined.Close` in one and `com.t8rin.imagetoolbox.core.resources.icons.Close` 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 (21 lines × 2) feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:774— feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:774-794 | feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt:736-756 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 625 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 `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:774` 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 (21 lines × 2) feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:1099— feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:1099-1119 | feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt:1093-1113 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 625 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 `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:1099` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (21 lines × 2) feature/app/src/main/java/com/wanbaohe/app/ui/WebViewModalBottomSheet.kt:129— feature/app/src/main/java/com/wanbaohe/app/ui/WebViewModalBottomSheet.kt:129-149 | feature/app/src/main/java/com/wanbaohe/app/ui/WebViewModalBottomSheet.kt:153-173 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/app/src/main/java/com/wanbaohe/app/ui/WebViewModalBottomSheet.kt:129` 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) feature/edit-exif/src/main/java/com/t8rin/imagetoolbox/feature/edit_exif/presentation/EditExifContent.kt:255— feature/edit-exif/src/main/java/com/t8rin/imagetoolbox/feature/edit_exif/presentation/EditExifContent.kt:255-275 | feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt:419-439 — 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 `feature/edit-exif/src/main/java/com/t8rin/imagetoolbox/feature/edit_exif/presentation/EditExifContent.kt:255` 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 (21 lines × 2) feature/markdown-edit/src/main/java/com/wanbaohe/markdown/edit/dialogs/ImageInsertDialog.kt:64— feature/markdown-edit/src/main/java/com/wanbaohe/markdown/edit/dialogs/ImageInsertDialog.kt:64-84 | feature/markdown-edit/src/main/java/com/wanbaohe/markdown/edit/dialogs/LinkInsertDialog.kt:64-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 `feature/markdown-edit/src/main/java/com/wanbaohe/markdown/edit/dialogs/ImageInsertDialog.kt:64` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (21 lines × 2) feature/marktodo/src/main/java/com/shifenmiao/marktodo/screen/AddCategoryScreen.kt:220— feature/marktodo/src/main/java/com/shifenmiao/marktodo/screen/AddCategoryScreen.kt:220-240 | feature/marktodo/src/main/java/com/shifenmiao/marktodo/screen/AddTodoScreen.kt:411-431 — 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 (21 lines × 2) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupProjectStore.kt:532— feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupProjectStore.kt:532-552 | feature/text-card/src/main/java/com/wanbaohe/textcard/data/project/AndroidTextCardProjectStore.kt:434-454 — before extracting anything, compare `feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupProjectStore.kt` and `feature/text-card/src/main/java/com/wanbaohe/textcard/data/project/AndroidTextCardProjectStore.kt` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 256 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 (21 lines × 2) feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt:311— feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt:311-331 | feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/SingleEditContent.kt:280-300 — 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 (21 lines × 2) feature/settings/src/main/java/com/wanbaohe/setting/ai/screen/AIFeatureSettingsScreen.kt:185— feature/settings/src/main/java/com/wanbaohe/setting/ai/screen/AIFeatureSettingsScreen.kt:185-205 | feature/settings/src/main/java/com/wanbaohe/setting/ai/screen/AIFeatureSettingsScreen.kt:234-254 — 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/settings/src/main/java/com/wanbaohe/setting/ai/screen/AIFeatureSettingsScreen.kt:185` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (21 lines × 2) feature/settings/src/main/java/com/wanbaohe/setting/authcode/screen/AuthCodeSettingsScreen.kt:590— feature/settings/src/main/java/com/wanbaohe/setting/authcode/screen/AuthCodeSettingsScreen.kt:590-610 | feature/settings/src/main/java/com/wanbaohe/setting/authcode/screen/AuthCodeSettingsScreen.kt:637-657 — 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/settings/src/main/java/com/wanbaohe/setting/authcode/screen/AuthCodeSettingsScreen.kt:590` 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 (21 lines × 2) feature/sudoku/src/main/java/com/wanbaohe/sudoku/screen/SudokuCompleteContent.kt:252— feature/sudoku/src/main/java/com/wanbaohe/sudoku/screen/SudokuCompleteContent.kt:252-272 | feature/sudoku/src/main/java/com/wanbaohe/sudoku/screen/SudokuStatsContent.kt:226-246 — 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 `feature/sudoku/src/main/java/com/wanbaohe/sudoku/screen/SudokuCompleteContent.kt:252` 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 (21 lines × 2) core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:291— core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:291-311 | core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:332-352 — 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 `core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:291` 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, `core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:289` calls `propBool`, `parseKeyboardType`, `propString` and `core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:331` 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 (21 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/modifier/ObservePointersCount.kt:73— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/modifier/ObservePointersCount.kt:73-93 | libs/gesture/src/main/java/com/t8rin/gesture/TransformGesture.kt:365-385 — before extracting anything, compare `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/modifier/ObservePointersCount.kt` and `libs/gesture/src/main/java/com/t8rin/gesture/TransformGesture.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 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.
D4 · Code Duplication· Edited copy of a member (19 corresponding lines) · ×16
Edited copy of a member (19 corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidBlockSubPipeline.kt:106— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidBlockSubPipeline.kt:106-124 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlActivitySubPipeline.kt:576-595 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) feature/habit-tracker/src/main/java/com/wanbaohe/habittracker/service/HabitService.kt:74— feature/habit-tracker/src/main/java/com/wanbaohe/habittracker/service/HabitService.kt:74-95 | feature/habit-tracker/src/main/java/com/wanbaohe/habittracker/service/HabitService.kt:98-116 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:651— feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:651-669 | feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIPromptComponent.kt:679-697 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) feature/settings/src/main/java/com/wanbaohe/setting/ai/screen/AIPersonalizationScreen.kt:157— feature/settings/src/main/java/com/wanbaohe/setting/ai/screen/AIPersonalizationScreen.kt:157-175 | feature/settings/src/main/java/com/wanbaohe/setting/ai/screen/AIServiceHubScreen.kt:221-239 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ManageGameUseCase.kt:207— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ManageGameUseCase.kt:207-225 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/ManageGameUseCase.kt:177-202 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/service/AgentCreationService.kt:179— feature/ai/src/main/java/com/shifenmiao/ai/service/AgentCreationService.kt:179-197 | feature/ai/src/main/java/com/shifenmiao/ai/service/PromptCreationService.kt:173-191 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/domain/model/MediaOrder.kt:35— feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/domain/model/MediaOrder.kt:35-53 | feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/domain/model/MediaOrder.kt:55-73 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/AddBookkeepingRecordTool.kt:102— feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/AddBookkeepingRecordTool.kt:102-120 | feature/record-center/src/main/java/com/wanbaohe/recordcenter/ai/tool/AddHealthRecordTool.kt:114-132 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/logic/ChatInputComponent.kt:239— feature/ai/src/main/java/com/shifenmiao/ai/logic/ChatInputComponent.kt:239-260 | feature/file-viewer/src/main/java/com/wanbaohe/fileviewer/data/ContentResolverDocumentSource.kt:53-71 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) feature/household-items/src/main/java/com/wanbaohe/householditems/screen/HouseholdItemsScreen.kt:286— feature/household-items/src/main/java/com/wanbaohe/householditems/screen/HouseholdItemsScreen.kt:286-304 | feature/period/src/main/java/com/wanbaohe/period/screen/PeriodMainScreen.kt:197-216 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/utils/DrawPathModeUtils.kt:279— feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/utils/DrawPathModeUtils.kt:279-297 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/utils/DrawPathModeUtils.kt:304-324 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/screen/components/ObjectDetailSheet.kt:198— feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/screen/components/ObjectDetailSheet.kt:198-216 | feature/zip/src/main/java/com/t8rin/imagetoolbox/feature/zip/presentation/components/ZipArchiveList.kt:378-397 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/components/TextEditDialog.kt:683— feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/components/TextEditDialog.kt:683-701 | feature/text-card/src/main/java/com/wanbaohe/textcard/presentation/editor/panels/PanelControls.kt:91-113 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/selection/AlphaSelector.kt:52— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/selection/AlphaSelector.kt:52-70 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/LineWidthSelector.kt:49-68 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) feature/app/src/main/java/com/wanbaohe/app/ui/AIQuestionContent.kt:234— feature/app/src/main/java/com/wanbaohe/app/ui/AIQuestionContent.kt:234-252 | feature/app/src/main/java/com/wanbaohe/app/ui/AIQuestionContent.kt:261-279 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) feature/marktodo/src/main/java/com/shifenmiao/marktodo/data/MarkTodoMapper.kt:84— feature/marktodo/src/main/java/com/shifenmiao/marktodo/data/MarkTodoMapper.kt:84-102 | feature/marktodo/src/main/java/com/shifenmiao/marktodo/data/MarkTodoMapper.kt:104-122 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (26 corresponding lines) · ×16
Edited copy of a member (26 corresponding lines) REDACTED:278— REDACTED:278-314 | REDACTED:338-363 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (26 corresponding lines) feature/marktodo/src/main/java/com/shifenmiao/marktodo/service/MarkTodoServiceImpl.kt:94— feature/marktodo/src/main/java/com/shifenmiao/marktodo/service/MarkTodoServiceImpl.kt:94-121 | feature/marktodo/src/main/java/com/shifenmiao/marktodo/service/MarkTodoServiceImpl.kt:127-152 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (26 corresponding lines) core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDatePickerDialog.kt:103— core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDatePickerDialog.kt:103-128 | core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDateRangePickerDialog.kt:97-124 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (26 corresponding lines) feature/online/src/main/java/com/shifenmiao/online/component/CreateHtmlComponent.kt:174— feature/online/src/main/java/com/shifenmiao/online/component/CreateHtmlComponent.kt:174-199 | feature/online/src/main/java/com/shifenmiao/online/component/EditPromptComponent.kt:206-231 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (26 corresponding lines) feature/record-center/src/main/java/com/wanbaohe/recordcenter/screen/tab/RecordsTab.kt:76— feature/record-center/src/main/java/com/wanbaohe/recordcenter/screen/tab/RecordsTab.kt:76-102 | feature/record-center/src/main/java/com/wanbaohe/recordcenter/screen/tab/TrendsTab.kt:84-109 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (26 corresponding lines) feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeScreen.kt:485— feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeScreen.kt:485-510 | feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeScreen.kt:519-544 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (26 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/DiscoverAppsTool.kt:106— feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/DiscoverAppsTool.kt:106-134 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/DiscoverToolsTool.kt:107-132 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (26 corresponding lines) feature/file-browser/src/main/java/com/wanbaohe/file/browser/ui/RecentAccessGridItem.kt:107— feature/file-browser/src/main/java/com/wanbaohe/file/browser/ui/RecentAccessGridItem.kt:107-132 | feature/file-browser/src/main/java/com/wanbaohe/file/browser/ui/RecentAccessListItem.kt:124-154 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (26 corresponding lines) feature/habit-tracker/src/main/java/com/wanbaohe/habittracker/reminder/HabitReminderReceiver.kt:62— feature/habit-tracker/src/main/java/com/wanbaohe/habittracker/reminder/HabitReminderReceiver.kt:62-88 | feature/schedule/src/main/java/com/wanbaohe/schedule/reminder/ScheduleReminderReceiver.kt:54-79 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (26 corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessSettingsScreen.kt:309— feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessSettingsScreen.kt:309-334 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuSettingsScreen.kt:313-338 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (26 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/PickFilesTool.kt:108— feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/PickFilesTool.kt:108-135 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/PickFolderTool.kt:100-125 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (26 corresponding lines) feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/screen/component/Chips.kt:77— feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/screen/component/Chips.kt:77-104 | feature/unit-converter/src/main/java/com/wanbaohe/unitconverter/screen/UnitConverterScreen.kt:1126-1151 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (26 corresponding lines) feature/compass/src/main/java/com/wanbaohe/compass/ui/luopan/LuopanPage.kt:197— feature/compass/src/main/java/com/wanbaohe/compass/ui/luopan/LuopanPage.kt:197-222 | feature/compass/src/main/java/com/wanbaohe/compass/ui/luopan/LuopanPage.kt:226-253 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (26 corresponding lines) feature/calendar/src/main/java/com/wanbaohe/calendar/ui/CalendarTab.kt:1168— feature/calendar/src/main/java/com/wanbaohe/calendar/ui/CalendarTab.kt:1168-1196 | feature/calendar/src/main/java/com/wanbaohe/calendar/ui/CalendarTab.kt:1199-1224 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (26 corresponding lines) feature/zip/src/main/java/com/t8rin/imagetoolbox/feature/zip/presentation/screenLogic/ZipBrowserComponent.kt:222— feature/zip/src/main/java/com/t8rin/imagetoolbox/feature/zip/presentation/screenLogic/ZipBrowserComponent.kt:222-247 | feature/zip/src/main/java/com/t8rin/imagetoolbox/feature/zip/presentation/screenLogic/ZipBrowserComponent.kt:253-282 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (26 corresponding lines) feature/ocr-document/src/main/java/com/shifenmiao/feature/document/repository/PaddleOcrRepository.kt:105— feature/ocr-document/src/main/java/com/shifenmiao/feature/document/repository/PaddleOcrRepository.kt:105-131 | feature/ocr-document/src/main/java/com/shifenmiao/feature/document/repository/PaddleOcrRepository.kt:147-172 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (22 lines × 2) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionItem.kt:175— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionItem.kt:175-196 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/TemplateFilterSelectionItem.kt:139-160 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionItem.kt:175` 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 (22 lines × 2) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheet.kt:469— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheet.kt:469-490 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/sheets/ProcessImagesPreferenceSheet.kt:163-184 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheet.kt` and `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/sheets/ProcessImagesPreferenceSheet.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 133 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 `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheet.kt:469` 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: `ArrowBack` names `androidx.compose.material.icons.automirrored.rounded.ArrowBack` in one and `com.t8rin.imagetoolbox.core.resources.icons.ArrowBack` 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 (22 lines × 2) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheet.kt:508— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheet.kt:508-529 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/sheets/AddExifSheet.kt:210-231 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheet.kt` and `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/sheets/AddExifSheet.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 120 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 `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheet.kt:508` 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: `Search` names `androidx.compose.material.icons.rounded.Search` in one and `com.t8rin.imagetoolbox.core.resources.icons.Search` 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 (22 lines × 2) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ArcParamsItem.kt:101— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ArcParamsItem.kt:101-122 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SmearParamsItem.kt:96-117 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ArcParamsItem.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SmearParamsItem.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 50 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 `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ArcParamsItem.kt:101` 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 (22 lines × 2) core/ui/src/main/java/com/wanbaohe/base/ui/image/IconImageBox.kt:59— core/ui/src/main/java/com/wanbaohe/base/ui/image/IconImageBox.kt:59-80 | core/ui/src/main/java/com/wanbaohe/base/ui/image/IconImageBox.kt:150-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 `core/ui/src/main/java/com/wanbaohe/base/ui/image/IconImageBox.kt:59` 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 (22 lines × 2) core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDatePickerDialog.kt:285— core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDatePickerDialog.kt:285-306 | core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDateRangePickerDialog.kt:230-251 — before extracting anything, compare `core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDatePickerDialog.kt` and `core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDateRangePickerDialog.kt` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 147 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 (22 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/FileReorderVerticalList.kt:121— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/FileReorderVerticalList.kt:121-142 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/ImageReorderCarousel.kt:107-128 — before extracting anything, compare `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/FileReorderVerticalList.kt` and `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/ImageReorderCarousel.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 75 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 (22 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassCustomRangeSlider.kt:92— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassCustomRangeSlider.kt:92-113 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassCustomSlider.kt:109-130 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassCustomRangeSlider.kt:92` 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 (22 lines × 2) feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageTodoTool.kt:632— feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageTodoTool.kt:632-653 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageTodoTool.kt:679-700 — 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/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageTodoTool.kt:632` 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 (22 lines × 2) feature/ai/src/main/java/com/shifenmiao/ai/service/AgentCreationService.kt:275— feature/ai/src/main/java/com/shifenmiao/ai/service/AgentCreationService.kt:275-296 | feature/ai/src/main/java/com/shifenmiao/ai/service/PromptCreationService.kt:270-291 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/service/AgentCreationService.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/service/PromptCreationService.kt` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 107 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 `feature/ai/src/main/java/com/shifenmiao/ai/service/AgentCreationService.kt:275` 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 (22 lines × 2) feature/app/src/main/java/com/wanbaohe/app/ui/VerifyContactSheet.kt:120— feature/app/src/main/java/com/wanbaohe/app/ui/VerifyContactSheet.kt:120-141 | feature/profile/src/main/java/com/wanbaohe/profile/screen/BindEmailSheet.kt:90-111 — before extracting anything, compare `feature/app/src/main/java/com/wanbaohe/app/ui/VerifyContactSheet.kt` and `feature/profile/src/main/java/com/wanbaohe/profile/screen/BindEmailSheet.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 75 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 `feature/app/src/main/java/com/wanbaohe/app/ui/VerifyContactSheet.kt:120` 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) feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/screen/components/CloudFileGrid.kt:356— feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/screen/components/CloudFileGrid.kt:356-377 | feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/screen/components/CloudFileGrid.kt:491-512 — 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/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/screen/components/CloudFileGrid.kt:356` 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 (22 lines × 2) feature/ocr-document/src/main/java/com/shifenmiao/feature/document/component/DocConvertTaskListComponent.kt:456— feature/ocr-document/src/main/java/com/shifenmiao/feature/document/component/DocConvertTaskListComponent.kt:456-477 | feature/ocr-document/src/main/java/com/shifenmiao/feature/document/component/OcrTaskListComponent.kt:283-304 — before extracting anything, compare `feature/ocr-document/src/main/java/com/shifenmiao/feature/document/component/DocConvertTaskListComponent.kt` and `feature/ocr-document/src/main/java/com/shifenmiao/feature/document/component/OcrTaskListComponent.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 71 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 lines × 2) feature/profile/src/main/java/com/wanbaohe/profile/viewmodel/PayComponent.kt:358— feature/profile/src/main/java/com/wanbaohe/profile/viewmodel/PayComponent.kt:358-379 | feature/profile/src/main/java/com/wanbaohe/profile/viewmodel/PayComponent.kt:433-454 — 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/profile/src/main/java/com/wanbaohe/profile/viewmodel/PayComponent.kt:358` 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 (22 lines × 2) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidErSubPipeline.kt:518— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidErSubPipeline.kt:518-539 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlErdSubPipeline.kt:624-645 — before extracting anything, compare `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidErSubPipeline.kt` and `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlErdSubPipeline.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 144 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 `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidErSubPipeline.kt:518` 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 (22 lines × 2) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/data/utils/DrawRepeatedPath.kt:35— feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/data/utils/DrawRepeatedPath.kt:35-56 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/utils/DrawRepeatedPath.kt:35-56 — before extracting anything, compare `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/data/utils/DrawRepeatedPath.kt` and `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/utils/DrawRepeatedPath.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 (10 lines × 3) core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/ColumnSelectorRenderer.kt:57— core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/ColumnSelectorRenderer.kt:57-66 | core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/ListSelectorRenderer.kt:64-73 | core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/RowSelectorRenderer.kt:59-68 — before extracting anything, compare `core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/ColumnSelectorRenderer.kt` and `core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/RowSelectorRenderer.kt` as WHOLE FILES: this scan already matched 4 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. 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 × 3) core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/ColumnSelectorRenderer.kt:66— core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/ColumnSelectorRenderer.kt:66-75 | core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/GridSelectorRenderer.kt:69-78 | core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/RowSelectorRenderer.kt:68-77 — before extracting anything, compare `core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/ColumnSelectorRenderer.kt` and `core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/GridSelectorRenderer.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. 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/GridSelectorRenderer.kt:68` calls `resolveInt`, `coerceAtLeast` and `core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/ColumnSelectorRenderer.kt:65` 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 (10 lines × 3) feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/AddBookkeepingRecordTool.kt:324— feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/AddBookkeepingRecordTool.kt:324-333 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/QueryBookkeepingRecordsTool.kt:215-224 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/QueryBookkeepingSummaryTool.kt:178-187 — 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. 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 × 3) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/AiOrchestrationUseCase.kt:168— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/AiOrchestrationUseCase.kt:168-177 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/AiOrchestrationUseCase.kt:154-163 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/AiOrchestrationUseCase.kt:145-154 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/AiOrchestrationUseCase.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/AiOrchestrationUseCase.kt` as WHOLE FILES: this scan already matched 5 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 `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/AiOrchestrationUseCase.kt:168` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/CreateGameUseCase.kt:93— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/CreateGameUseCase.kt:93-102 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/CreateGameUseCase.kt:100-109 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/CreateGameUseCase.kt:106-115 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/CreateGameUseCase.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/CreateGameUseCase.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 71 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: `FenCodec` names `com.wanbaohe.chess.domain.FenCodec` in one and `com.wanbaohe.gomoku.domain.FenCodec` 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 (10 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt:228— feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt:228-237 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/router/screenLogic/GomokuRouterComponent.kt:226-235 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/router/screenLogic/XiangqiRouterComponent.kt:253-262 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/router/screenLogic/GomokuRouterComponent.kt` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 136 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 `feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt:228` 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: `EngineSlot` names `com.wanbaohe.chess.application.port.outbound.EngineSlot` in one and `com.wanbaohe.gomoku.application.port.outbound.EngineSlot` 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 (10 lines × 3) feature/decision-wheel/src/main/java/com/wanbaohe/decisionwheel/screen/DecisionWheelSettingsScreen.kt:66— feature/decision-wheel/src/main/java/com/wanbaohe/decisionwheel/screen/DecisionWheelSettingsScreen.kt:66-75 | feature/sudoku/src/main/java/com/wanbaohe/sudoku/screen/SudokuHomeContent.kt:81-90 | feature/sudoku/src/main/java/com/wanbaohe/sudoku/screen/SudokuSettingsContent.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 `feature/decision-wheel/src/main/java/com/wanbaohe/decisionwheel/screen/DecisionWheelSettingsScreen.kt:66` 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.wanbaohe.decisionwheel.R` in one and `com.wanbaohe.sudoku.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 (10 lines × 3) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/tool/PixelationCommands.kt:197— feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/tool/PixelationCommands.kt:197-206 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/tool/PixelationCommands.kt:213-222 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/tool/PixelationCommands.kt:272-281 — 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/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/tool/PixelationCommands.kt:197` 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) feature/login/src/main/java/com/shifenmiao/login/BindPhoneSheet.kt:66— feature/login/src/main/java/com/shifenmiao/login/BindPhoneSheet.kt:66-75 | feature/profile/src/main/java/com/wanbaohe/profile/screen/ChangePasswordSheet.kt:90-99 | feature/profile/src/main/java/com/wanbaohe/profile/screen/VerifyEmailSheet.kt:83-92 — before extracting anything, compare `feature/profile/src/main/java/com/wanbaohe/profile/screen/ChangePasswordSheet.kt` and `feature/profile/src/main/java/com/wanbaohe/profile/screen/VerifyEmailSheet.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 85 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 `feature/login/src/main/java/com/shifenmiao/login/BindPhoneSheet.kt:66` 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 × 3) libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1055— libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1055-1064 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:618-627 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:471-480 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 524 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 `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1055` 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) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidArchitectureSubPipeline.kt:392— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidArchitectureSubPipeline.kt:392-401 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidC4SubPipeline.kt:456-465 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidC4SubPipeline.kt:528-537 — before extracting anything, compare `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidArchitectureSubPipeline.kt` and `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidC4SubPipeline.kt` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 91 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 `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidArchitectureSubPipeline.kt:392` 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) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidClassSubPipeline.kt:261— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidClassSubPipeline.kt:261-270 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidStateSubPipeline.kt:229-238 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlStateSubPipeline.kt:299-308 — before extracting anything, compare `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidClassSubPipeline.kt` and `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidStateSubPipeline.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 55 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidClassSubPipeline.kt:261` 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) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/OnlinePlayUseCase.kt:424— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/OnlinePlayUseCase.kt:424-433 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/OnlinePlayUseCase.kt:465-474 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/OnlinePlayUseCase.kt:346-355 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/OnlinePlayUseCase.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/OnlinePlayUseCase.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 67 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. Note first that the copies are not typed on the same thing: `ConnectionState` names `com.wanbaohe.chess.domain.model.ConnectionState` in one and `com.wanbaohe.gomoku.domain.model.ConnectionState` 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 (10 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/data/AiTaskDaoAdapter.kt:46— feature/chess/src/main/java/com/wanbaohe/chess/data/AiTaskDaoAdapter.kt:46-55 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/AiTaskDaoAdapter.kt:46-55 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/AiTaskDaoAdapter.kt:46-55 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/data/AiTaskDaoAdapter.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/AiTaskDaoAdapter.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. Note first that the copies are not typed on the same thing: `AiTaskEntity` names `com.wanbaohe.chess.application.port.outbound.AiTaskEntity` in one and `com.wanbaohe.gomoku.application.port.outbound.AiTaskEntity` 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 (10 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/data/online/SignalingClientImpl.kt:82— feature/chess/src/main/java/com/wanbaohe/chess/data/online/SignalingClientImpl.kt:82-91 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/online/SignalingClientImpl.kt:82-91 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/online/SignalingClientImpl.kt:82-91 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/data/online/SignalingClientImpl.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/online/SignalingClientImpl.kt` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 129 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 (10 lines × 3) feature/lifetime/src/main/java/com/shifenmiao/lifetime/component/LifeTimeAddCountdownComponent.kt:68— feature/lifetime/src/main/java/com/shifenmiao/lifetime/component/LifeTimeAddCountdownComponent.kt:68-77 | feature/lifetime/src/main/java/com/shifenmiao/lifetime/component/LifeTimeAddEventComponent.kt:69-78 | feature/lifetime/src/main/java/com/shifenmiao/lifetime/component/LifeTimeAddMilestoneComponent.kt:69-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.
Duplicated block (8 lines × 3) core/data/src/main/java/com/t8rin/imagetoolbox/core/data/utils/UriUtils.kt:258— core/data/src/main/java/com/t8rin/imagetoolbox/core/data/utils/UriUtils.kt:258-265 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/UriUtils.kt:192-199 | core/utils/src/main/java/com/t8rin/imagetoolbox/core/utils/UriUtils.kt:238-245 — before extracting anything, compare `core/data/src/main/java/com/t8rin/imagetoolbox/core/data/utils/UriUtils.kt` and `core/utils/src/main/java/com/t8rin/imagetoolbox/core/utils/UriUtils.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 77 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 × 3) core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDatePickerDialog.kt:360— core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDatePickerDialog.kt:360-367 | core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDatePickerDialog.kt:378-385 | core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDatePickerDialog.kt:396-403 — 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 `core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDatePickerDialog.kt:360` 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) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/AudioFeedbackUseCase.kt:93— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/AudioFeedbackUseCase.kt:93-100 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/AudioFeedbackUseCase.kt:93-100 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/AudioFeedbackUseCase.kt:97-104 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/AudioFeedbackUseCase.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/AudioFeedbackUseCase.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. 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: `AudioSettings` names `com.wanbaohe.chess.application.port.outbound.AudioSettings` in one and `com.wanbaohe.gomoku.application.port.outbound.AudioSettings` 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 × 3) feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:920— feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:920-927 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuGameComponent.kt:1047-1054 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiGameComponent.kt:847-854 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuGameComponent.kt` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 106 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 `feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:920` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: `FenCodec` names `com.wanbaohe.chess.domain.FenCodec` in one and `com.wanbaohe.gomoku.domain.FenCodec` 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 × 3) feature/chess/src/main/java/com/wanbaohe/chess/router/ChessRouterScreen.kt:123— feature/chess/src/main/java/com/wanbaohe/chess/router/ChessRouterScreen.kt:123-130 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/router/GomokuRouterScreen.kt:123-130 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/router/XiangqiRouterScreen.kt:140-147 — 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 `feature/chess/src/main/java/com/wanbaohe/chess/router/ChessRouterScreen.kt:123` 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 × 3) libs/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:319— libs/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:319-326 | libs/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:380-387 | libs/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:466-473 — 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 `libs/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:319` 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 × 3) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidArchitectureSubPipeline.kt:383— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidArchitectureSubPipeline.kt:383-390 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidC4SubPipeline.kt:446-453 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidC4SubPipeline.kt:518-525 — before extracting anything, compare `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidArchitectureSubPipeline.kt` and `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidC4SubPipeline.kt` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 91 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 `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidArchitectureSubPipeline.kt:383` 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, `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidC4SubPipeline.kt:454` calls `Point` and `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidArchitectureSubPipeline.kt:391` 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 lines × 3) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:978— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:978-985 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlErdSubPipeline.kt:497-504 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlUsecaseSubPipeline.kt:362-369 — 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 `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:978` 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 × 3) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlC4SubPipeline.kt:147— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlC4SubPipeline.kt:147-154 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlObjectSubPipeline.kt:159-166 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlUsecaseSubPipeline.kt:171-178 — before extracting anything, compare `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlObjectSubPipeline.kt` and `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlUsecaseSubPipeline.kt` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 150 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 (8 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:1026— feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:1026-1033 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuGameComponent.kt:1144-1151 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiGameComponent.kt:956-963 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuGameComponent.kt` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 106 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 × 3) feature/chess/src/main/java/com/wanbaohe/chess/data/LlmMoveChooser.kt:105— feature/chess/src/main/java/com/wanbaohe/chess/data/LlmMoveChooser.kt:105-112 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/LlmMoveChooser.kt:105-112 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/LlmMoveChooser.kt:104-111 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/data/LlmMoveChooser.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/LlmMoveChooser.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 47 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 × 3) feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt:517— feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt:517-524 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/router/screenLogic/GomokuRouterComponent.kt:461-468 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/router/screenLogic/XiangqiRouterComponent.kt:482-489 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/router/screenLogic/GomokuRouterComponent.kt` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 136 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 × 3) libs/diagram/src/upstream/java/com/hrm/diagram/render/export/FamilyOneShotRenderers.kt:481— libs/diagram/src/upstream/java/com/hrm/diagram/render/export/FamilyOneShotRenderers.kt:481-488 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidPieSubPipeline.kt:135-142 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlPieSubPipeline.kt:140-147 — before extracting anything, compare `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidPieSubPipeline.kt` and `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlPieSubPipeline.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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) feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt:614— feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt:614-621 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/router/screenLogic/GomokuRouterComponent.kt:558-565 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/router/screenLogic/XiangqiRouterComponent.kt:579-587 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/router/screenLogic/GomokuRouterComponent.kt` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 136 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 × 3) feature/profile/src/main/java/com/wanbaohe/profile/screen/AboutUsScreen.kt:100— feature/profile/src/main/java/com/wanbaohe/profile/screen/AboutUsScreen.kt:100-107 | feature/profile/src/main/java/com/wanbaohe/profile/screen/AboutUsScreen.kt:112-119 | feature/profile/src/main/java/com/wanbaohe/profile/screen/AboutUsScreen.kt:124-131 — 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/profile/src/main/java/com/wanbaohe/profile/screen/AboutUsScreen.kt:100` 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 (8 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/domain/model/GameSetup.kt:75— feature/chess/src/main/java/com/wanbaohe/chess/domain/model/GameSetup.kt:75-82 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/domain/model/GameSetup.kt:75-82 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/domain/model/GameSetup.kt:73-80 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/domain/model/GameSetup.kt` and `feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/domain/model/GameSetup.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.
Duplicated block (7 lines × 3) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassButton.kt:106— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassButton.kt:106-112 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassOutlinedButton.kt:98-104 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassTonalButton.kt:86-92 — before extracting anything, compare `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassOutlinedButton.kt` and `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassTonalButton.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 41 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassButton.kt:106` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassOutlinedButton.kt:96` calls `Suppress`, `MutableInteractionSource` and `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassButton.kt:103` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/data/online/SignalingClientImpl.kt:104— feature/chess/src/main/java/com/wanbaohe/chess/data/online/SignalingClientImpl.kt:104-110 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/online/SignalingClientImpl.kt:104-110 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/online/SignalingClientImpl.kt:104-110 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/data/online/SignalingClientImpl.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/online/SignalingClientImpl.kt` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 129 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 × 3) feature/profile/src/main/java/com/wanbaohe/profile/ProfileScreen.kt:188— feature/profile/src/main/java/com/wanbaohe/profile/ProfileScreen.kt:188-196 | feature/profile/src/main/java/com/wanbaohe/profile/screen/UserInfoScreen.kt:469-475 | feature/profile/src/main/java/com/wanbaohe/profile/screen/UserInfoScreen.kt:488-494 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `feature/profile/src/main/java/com/wanbaohe/profile/ProfileScreen.kt:188` 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 (7 lines × 3) libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:817— libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:817-823 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:457-463 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:559-565 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt` as WHOLE FILES: this scan already matched 49 separate duplicated blocks between them, totalling at least 509 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 `libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:817` 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 × 3) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlActivitySubPipeline.kt:559— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlActivitySubPipeline.kt:559-565 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlDeploymentSubPipeline.kt:498-504 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlObjectSubPipeline.kt:309-315 — 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 `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlActivitySubPipeline.kt:559` 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 × 3) core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/blessing/BlessingEffectHost.kt:373— core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/blessing/BlessingEffectHost.kt:373-379 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/blessing/BlessingEffectHost.kt:404-410 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/blessing/BlessingEffectHost.kt:523-529 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/blessing/BlessingEffectHost.kt:373` 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 × 3) core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:250— core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:250-256 | core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:261-267 | core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:272-278 — 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 `core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:250` 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 × 3) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/AudioFeedbackUseCase.kt:55— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/AudioFeedbackUseCase.kt:55-61 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/AudioFeedbackUseCase.kt:56-62 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/AudioFeedbackUseCase.kt:54-60 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/AudioFeedbackUseCase.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/AudioFeedbackUseCase.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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: `AudioSettings` names `com.wanbaohe.chess.application.port.outbound.AudioSettings` in one and `com.wanbaohe.gomoku.application.port.outbound.AudioSettings` 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 × 3) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/CreateGameUseCase.kt:158— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/CreateGameUseCase.kt:158-164 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/CreateGameUseCase.kt:166-172 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/CreateGameUseCase.kt:176-182 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/CreateGameUseCase.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/CreateGameUseCase.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 71 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 `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/CreateGameUseCase.kt:158` 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 × 3) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/OnlinePlayUseCase.kt:152— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/OnlinePlayUseCase.kt:152-158 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/OnlinePlayUseCase.kt:207-213 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/OnlinePlayUseCase.kt:122-128 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/OnlinePlayUseCase.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/OnlinePlayUseCase.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 67 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 `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/OnlinePlayUseCase.kt:152` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: `OnlineRoomConfig` names `com.wanbaohe.chess.domain.model.OnlineRoomConfig` in one and `com.wanbaohe.gomoku.domain.model.OnlineRoomConfig` 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 × 3) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/OnlinePlayUseCase.kt:411— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/OnlinePlayUseCase.kt:411-417 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/OnlinePlayUseCase.kt:452-458 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/OnlinePlayUseCase.kt:333-339 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/OnlinePlayUseCase.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/OnlinePlayUseCase.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 67 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. Note first that the copies are not typed on the same thing: `OnlineMessage` names `com.wanbaohe.chess.domain.model.OnlineMessage` in one and `com.wanbaohe.gomoku.domain.model.OnlineMessage` 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 × 3) feature/chess/src/main/java/com/wanbaohe/chess/data/ChessAiPrefsAdapter.kt:52— feature/chess/src/main/java/com/wanbaohe/chess/data/ChessAiPrefsAdapter.kt:52-58 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/GomokuAiPrefsAdapter.kt:52-58 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/XiangqiAiPrefsAdapter.kt:52-58 — 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `config` to `ChessAiConfig` in one and `GomokuAiConfig` 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 × 3) feature/chess/src/main/java/com/wanbaohe/chess/data/search/ChessSearch.kt:259— feature/chess/src/main/java/com/wanbaohe/chess/data/search/ChessSearch.kt:259-265 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/search/GomokuSearch.kt:204-210 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/search/XiangqiSearch.kt:291-298 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/data/search/ChessSearch.kt` and `feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/search/XiangqiSearch.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 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 × 3) feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt:560— feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt:560-566 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/router/screenLogic/GomokuRouterComponent.kt:504-510 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/router/screenLogic/XiangqiRouterComponent.kt:525-531 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/router/screenLogic/GomokuRouterComponent.kt` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 136 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 × 3) feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt:680— feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt:680-686 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/router/screenLogic/GomokuRouterComponent.kt:624-630 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/router/screenLogic/XiangqiRouterComponent.kt:646-652 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/router/screenLogic/GomokuRouterComponent.kt` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 136 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 (5 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/data/online/SignalingClientImpl.kt:253— feature/chess/src/main/java/com/wanbaohe/chess/data/online/SignalingClientImpl.kt:253-257 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/online/SignalingClientImpl.kt:253-257 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/online/SignalingClientImpl.kt:253-257 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/data/online/SignalingClientImpl.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/online/SignalingClientImpl.kt` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 129 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 `feature/chess/src/main/java/com/wanbaohe/chess/data/online/SignalingClientImpl.kt:253` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: `OnlineRoomConfig` names `com.wanbaohe.chess.domain.model.OnlineRoomConfig` in one and `com.wanbaohe.gomoku.domain.model.OnlineRoomConfig` 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 (5 lines × 3) feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/AwsS3Adapter.kt:36— feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/AwsS3Adapter.kt:36-42 | feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/BaiduBosAdapter.kt:36-42 | feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/TencentCosAdapter.kt:35-39 — before extracting anything, compare `feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/AwsS3Adapter.kt` and `feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/BaiduBosAdapter.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 50 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 `feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/AwsS3Adapter.kt:36` 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 (5 lines × 3) feature/lifetime/src/main/java/com/shifenmiao/lifetime/ui/HourglassHeroCard.kt:190— feature/lifetime/src/main/java/com/shifenmiao/lifetime/ui/HourglassHeroCard.kt:190-194 | feature/lifetime/src/main/java/com/shifenmiao/lifetime/ui/HourglassHeroCard.kt:196-200 | feature/lifetime/src/main/java/com/shifenmiao/lifetime/ui/HourglassHeroCard.kt:202-206 — 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/lifetime/src/main/java/com/shifenmiao/lifetime/ui/HourglassHeroCard.kt:190` 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 (5 lines × 3) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlArchimateSubPipeline.kt:621— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlArchimateSubPipeline.kt:621-625 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlDitaaSubPipeline.kt:348-352 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlUsecaseSubPipeline.kt:398-402 — 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 `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlArchimateSubPipeline.kt:621` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 3) core/data/src/main/java/com/t8rin/imagetoolbox/core/data/utils/UriUtils.kt:52— core/data/src/main/java/com/t8rin/imagetoolbox/core/data/utils/UriUtils.kt:52-56 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/UriUtils.kt:182-186 | core/utils/src/main/java/com/t8rin/imagetoolbox/core/utils/UriUtils.kt:228-232 — before extracting anything, compare `core/data/src/main/java/com/t8rin/imagetoolbox/core/data/utils/UriUtils.kt` and `core/utils/src/main/java/com/t8rin/imagetoolbox/core/utils/UriUtils.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 77 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 × 3) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/AudioFeedbackUseCase.kt:102— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/AudioFeedbackUseCase.kt:102-106 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/AudioFeedbackUseCase.kt:102-106 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/AudioFeedbackUseCase.kt:106-110 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/AudioFeedbackUseCase.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/AudioFeedbackUseCase.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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: `AudioSettings` names `com.wanbaohe.chess.application.port.outbound.AudioSettings` in one and `com.wanbaohe.gomoku.application.port.outbound.AudioSettings` 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 (5 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/component/ChessAnalysisComponent.kt:233— feature/chess/src/main/java/com/wanbaohe/chess/component/ChessAnalysisComponent.kt:233-237 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuAnalysisComponent.kt:247-251 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiAnalysisComponent.kt:224-228 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/component/ChessAnalysisComponent.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuAnalysisComponent.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 77 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 × 3) feature/chess/src/main/java/com/wanbaohe/chess/data/LlmMoveChooser.kt:155— feature/chess/src/main/java/com/wanbaohe/chess/data/LlmMoveChooser.kt:155-159 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/LlmMoveChooser.kt:161-165 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/LlmMoveChooser.kt:155-159 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/data/LlmMoveChooser.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/LlmMoveChooser.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 47 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. Note first that the copies are not typed on the same thing: `EngineSlot` names `com.wanbaohe.chess.application.port.outbound.EngineSlot` in one and `com.wanbaohe.gomoku.application.port.outbound.EngineSlot` 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 (5 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/domain/model/OnlineMessage.kt:57— feature/chess/src/main/java/com/wanbaohe/chess/domain/model/OnlineMessage.kt:57-61 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/domain/model/OnlineMessage.kt:57-61 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/domain/model/OnlineMessage.kt:56-60 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/domain/model/OnlineMessage.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/domain/model/OnlineMessage.kt` as WHOLE FILES: 97% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (5 lines × 3) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidArchitectureSubPipeline.kt:222— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidArchitectureSubPipeline.kt:222-226 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlArchimateSubPipeline.kt:194-198 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlNetworkSubPipeline.kt:251-255 — 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) feature/chess/src/main/java/com/wanbaohe/chess/component/ChessAnalysisComponent.kt:127— feature/chess/src/main/java/com/wanbaohe/chess/component/ChessAnalysisComponent.kt:127-132 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuAnalysisComponent.kt:140-144 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiAnalysisComponent.kt:127-131 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/component/ChessAnalysisComponent.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuAnalysisComponent.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 77 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. Note first that the copies are not typed on the same thing: `AudioSettings` names `com.wanbaohe.chess.application.port.outbound.AudioSettings` in one and `com.wanbaohe.gomoku.application.port.outbound.AudioSettings` 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 (5 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:674— feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:674-678 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuGameComponent.kt:734-738 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiGameComponent.kt:587-591 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuGameComponent.kt` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 106 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. Note first that the copies are not typed on the same thing: `GameMode` names `com.wanbaohe.chess.domain.model.GameMode` in one and `com.wanbaohe.gomoku.domain.model.GameMode` 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 (5 lines × 3) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidKanbanSubPipeline.kt:69— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidKanbanSubPipeline.kt:69-73 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidPieSubPipeline.kt:75-79 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidTimelineSubPipeline.kt:89-96 — 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 `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidKanbanSubPipeline.kt:69` 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) core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/FilePickerRenderer.kt:59— core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/FilePickerRenderer.kt:59-63 | core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/FolderPickerRenderer.kt:56-60 | core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/ImagePickerRenderer.kt:57-61 — before extracting anything, compare `core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/FilePickerRenderer.kt` and `core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/ImagePickerRenderer.kt` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/FilePickerRenderer.kt:64` calls `resolveBoolean`, `resolveString` and `core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/FolderPickerRenderer.kt:62` 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 × 3) fastlane/fetch_listing.py:48— fastlane/fetch_listing.py:48-52 | fastlane/push_images.py:145-149 | fastlane/push_listing.py:76-80 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
D4 · Code Duplication· Edited copy of a member (6 corresponding lines) · ×14
Edited copy of a member (6 corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlArchimateSubPipeline.kt:581— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlArchimateSubPipeline.kt:581-587 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlC4SubPipeline.kt:347-352 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlArchimateSubPipeline.kt:411— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlArchimateSubPipeline.kt:411-416 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlC4SubPipeline.kt:543-549 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) feature/app/src/main/java/com/wanbaohe/app/app_screen/FavoriteScreen.kt:999— feature/app/src/main/java/com/wanbaohe/app/app_screen/FavoriteScreen.kt:999-1004 | feature/translator/src/main/java/com/wanbaohe/translator/component/TranslatorComponent.kt:350-355 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/domain/model/TextLayerRichText.kt:66— feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/domain/model/TextLayerRichText.kt:66-71 | feature/text-card/src/main/java/com/wanbaohe/textcard/domain/model/TextBlock.kt:179-184 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) feature/color-tools/src/main/java/com/t8rin/imagetoolbox/color_tools/presentation/components/ColorInfoDisplay.kt:309— feature/color-tools/src/main/java/com/t8rin/imagetoolbox/color_tools/presentation/components/ColorInfoDisplay.kt:309-314 | feature/color-tools/src/main/java/com/t8rin/imagetoolbox/color_tools/presentation/components/ColorInfoDisplay.kt:322-327 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/graph/GraphClusterLayout.kt:24— libs/diagram/src/upstream/java/com/hrm/diagram/render/graph/GraphClusterLayout.kt:24-31 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:201-206 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/domain/model/BoardPoint.kt:41— feature/chess/src/main/java/com/wanbaohe/chess/domain/model/BoardPoint.kt:41-46 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/domain/model/BoardPoint.kt:41-46 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/internal/layout/engine/BlockMeasurementKernel.kt:229— libs/markdown/src/upstream/java/com/hrm/markdown/renderer/internal/layout/engine/BlockMeasurementKernel.kt:229-234 | libs/markdown/src/upstream/java/com/hrm/markdown/renderer/internal/layout/inline/InlineFlowLayoutEngine.kt:221-226 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) core/base/src/main/java/com/shifenmiao/base/utils/NetWorkUtils.kt:35— core/base/src/main/java/com/shifenmiao/base/utils/NetWorkUtils.kt:35-40 | feature/file-transfer/src/main/java/com/wanbaohe/file_transfer/util/NetworkUtils.kt:97-105 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/component/AIStreamAnswerComponent.kt:211— feature/ai/src/main/java/com/shifenmiao/ai/component/AIStreamAnswerComponent.kt:211-216 | feature/marktodo/src/main/java/com/shifenmiao/marktodo/screenLogic/QuickAddTodoComponent.kt:417-423 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) feature/dsh-client/src/main/java/com/wanbaohe/dsh/connection/DshApiClient.kt:328— feature/dsh-client/src/main/java/com/wanbaohe/dsh/connection/DshApiClient.kt:328-333 | feature/dsh-client/src/main/java/com/wanbaohe/dsh/connection/DshConnectionController.kt:584-589 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) core/image-generation/src/main/java/com/shifenmiao/imagegeneration/di/ImageGenerationModule.kt:126— core/image-generation/src/main/java/com/shifenmiao/imagegeneration/di/ImageGenerationModule.kt:126-131 | core/network/src/main/java/com/shifenmiao/network/di/NetworkModule.kt:155-161 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) feature/ocr-document/src/main/java/com/shifenmiao/feature/document/component/DocConvertTaskListComponent.kt:172— feature/ocr-document/src/main/java/com/shifenmiao/feature/document/component/DocConvertTaskListComponent.kt:172-177 | feature/ocr-document/src/main/java/com/shifenmiao/feature/document/component/OcrTaskListComponent.kt:161-166 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) core/theme/src/main/java/com/shifenmiao/theme/AppColors.kt:213— core/theme/src/main/java/com/shifenmiao/theme/AppColors.kt:213-220 | feature/settings/src/main/java/com/wanbaohe/setting/image/screen/ImageGenerationSettingsScreen.kt:367-372 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (9 lines × 3) core/image-generation/src/main/java/com/shifenmiao/imagegeneration/provider/hunyuan/HunyuanImageProvider.kt:159— core/image-generation/src/main/java/com/shifenmiao/imagegeneration/provider/hunyuan/HunyuanImageProvider.kt:159-167 | core/image-generation/src/main/java/com/shifenmiao/imagegeneration/provider/openai/OpenAiImageProvider.kt:140-148 | core/image-generation/src/main/java/com/shifenmiao/imagegeneration/provider/qwen/QwenImageProvider.kt:165-173 — 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 (9 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/domain/model/OnlineMessage.kt:67— feature/chess/src/main/java/com/wanbaohe/chess/domain/model/OnlineMessage.kt:67-75 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/domain/model/OnlineMessage.kt:67-75 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/domain/model/OnlineMessage.kt:66-74 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/domain/model/OnlineMessage.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/domain/model/OnlineMessage.kt` as WHOLE FILES: 97% 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 (9 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt:288— feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt:288-296 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuAnalysisScreen.kt:295-303 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiAnalysisScreen.kt:288-296 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuAnalysisScreen.kt` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 187 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 `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt:288` 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) feature/online/src/main/java/com/shifenmiao/online/component/CreateHtmlComponent.kt:175— feature/online/src/main/java/com/shifenmiao/online/component/CreateHtmlComponent.kt:175-183 | feature/online/src/main/java/com/shifenmiao/online/component/CreateNoteComponent.kt:156-164 | feature/online/src/main/java/com/shifenmiao/online/component/EditPromptComponent.kt:207-215 — before extracting anything, compare `feature/online/src/main/java/com/shifenmiao/online/component/CreateHtmlComponent.kt` and `feature/online/src/main/java/com/shifenmiao/online/component/EditPromptComponent.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 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 `feature/online/src/main/java/com/shifenmiao/online/component/CreateHtmlComponent.kt:175` 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) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:624— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:624-632 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:817-825 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:559-567 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt` as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 518 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 `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:624` 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) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidStateSubPipeline.kt:160— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidStateSubPipeline.kt:160-168 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlSequenceSubPipeline.kt:224-232 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlStateSubPipeline.kt:250-258 — before extracting anything, compare `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidStateSubPipeline.kt` and `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlStateSubPipeline.kt` as WHOLE FILES: this scan already matched 7 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 `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidStateSubPipeline.kt:160` 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 × 3) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlActivitySubPipeline.kt:448— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlActivitySubPipeline.kt:448-456 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlActivitySubPipeline.kt:512-520 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlActivitySubPipeline.kt:525-533 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlActivitySubPipeline.kt:446` calls `labelTextOf`, `isBlank` and `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlActivitySubPipeline.kt:511` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 3) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlActivitySubPipeline.kt:460— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlActivitySubPipeline.kt:460-468 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlActivitySubPipeline.kt:512-520 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlActivitySubPipeline.kt:525-533 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (9 lines × 3) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlStateSubPipeline.kt:146— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlStateSubPipeline.kt:146-154 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlStateSubPipeline.kt:158-166 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlStateSubPipeline.kt:215-223 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (9 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:1035— feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:1035-1043 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuGameComponent.kt:1153-1161 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiGameComponent.kt:965-973 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuGameComponent.kt` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 106 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 × 3) feature/chess/src/main/java/com/wanbaohe/chess/data/online/SignalingClientImpl.kt:112— feature/chess/src/main/java/com/wanbaohe/chess/data/online/SignalingClientImpl.kt:112-120 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/online/SignalingClientImpl.kt:112-120 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/online/SignalingClientImpl.kt:112-120 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/data/online/SignalingClientImpl.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/online/SignalingClientImpl.kt` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 129 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. Note first that the copies are not typed on the same thing: `SignalingClient` names `com.wanbaohe.chess.application.port.outbound.SignalingClient` in one and `com.wanbaohe.gomoku.application.port.outbound.SignalingClient` 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 (9 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/domain/BoardSetupDraft.kt:82— feature/chess/src/main/java/com/wanbaohe/chess/domain/BoardSetupDraft.kt:82-90 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/domain/BoardSetupDraft.kt:82-90 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/domain/BoardSetupDraft.kt:79-87 — 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) feature/chess/src/main/java/com/wanbaohe/chess/domain/BoardSetupDraft.kt:92— feature/chess/src/main/java/com/wanbaohe/chess/domain/BoardSetupDraft.kt:92-100 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/domain/BoardSetupDraft.kt:92-100 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/domain/BoardSetupDraft.kt:89-97 — 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) feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt:452— feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt:452-460 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/router/screenLogic/GomokuRouterComponent.kt:402-410 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/router/screenLogic/XiangqiRouterComponent.kt:432-440 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/router/screenLogic/GomokuRouterComponent.kt` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 136 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.
D4 · Code Duplication· Edited copy of a member (27 corresponding lines) · ×13
Edited copy of a member (27 corresponding lines) feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/AiOrchestrationUseCase.kt:58— feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/AiOrchestrationUseCase.kt:58-90 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/AiOrchestrationUseCase.kt:59-85 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (27 corresponding lines) feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/AiOrchestrationUseCase.kt:132— feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/AiOrchestrationUseCase.kt:132-163 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/AiOrchestrationUseCase.kt:128-154 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (27 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:804— feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:804-839 | feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIPromptComponent.kt:829-855 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (27 corresponding lines) feature/household-items/src/main/java/com/wanbaohe/householditems/service/HouseholdService.kt:91— feature/household-items/src/main/java/com/wanbaohe/householditems/service/HouseholdService.kt:91-117 | feature/household-items/src/main/java/com/wanbaohe/householditems/service/HouseholdService.kt:124-156 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (27 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/service/AgentCreationService.kt:312— feature/ai/src/main/java/com/shifenmiao/ai/service/AgentCreationService.kt:312-343 | feature/ai/src/main/java/com/shifenmiao/ai/service/PromptCreationService.kt:311-337 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (27 corresponding lines) feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/screen/tab/StatsTab.kt:483— feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/screen/tab/StatsTab.kt:483-509 | feature/household-items/src/main/java/com/wanbaohe/householditems/screen/HouseholdStatsTab.kt:427-455 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (27 corresponding lines) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/tools/ai/AiRectSelectOverlay.kt:138— feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/tools/ai/AiRectSelectOverlay.kt:138-165 | feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/tools/crop/CropToolScreen.kt:405-431 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (27 corresponding lines) feature/common/src/main/java/com/shifenmiao/common/manager/AIEngineCatalogManager.kt:683— feature/common/src/main/java/com/shifenmiao/common/manager/AIEngineCatalogManager.kt:683-717 | feature/common/src/main/java/com/shifenmiao/common/manager/AIEngineCatalogManager.kt:723-749 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (27 corresponding lines) core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/SaveResultHandler.kt:75— core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/SaveResultHandler.kt:75-103 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/SaveResultHandler.kt:105-131 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (27 corresponding lines) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/block/TableRenderer.kt:111— libs/markdown/src/upstream/java/com/hrm/markdown/renderer/block/TableRenderer.kt:111-139 | libs/markdown/src/upstream/java/com/hrm/markdown/renderer/block/TableRenderer.kt:242-268 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (27 corresponding lines) feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeScreen.kt:587— feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeScreen.kt:587-613 | feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeScreen.kt:681-707 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (27 corresponding lines) feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/screenLogic/ImageStackingComponent.kt:185— feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/screenLogic/ImageStackingComponent.kt:185-211 | feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/screenLogic/ImageStackingComponent.kt:242-270 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (27 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/ui/AiBottomSheetCommon.kt:64— feature/ai/src/main/java/com/shifenmiao/ai/ui/AiBottomSheetCommon.kt:64-91 | feature/common/src/main/java/com/shifenmiao/common/ui/ai/AIModelPickerSheet.kt:254-280 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (20 corresponding lines) · ×13
Edited copy of a member (20 corresponding lines) core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/ChoicePickerRenderer.kt:68— core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/ChoicePickerRenderer.kt:68-87 | core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/SelectorSupport.kt:57-77 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/model/BookkeepingBackup.kt:111— feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/model/BookkeepingBackup.kt:111-130 | feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/model/BookkeepingBackup.kt:132-152 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) feature/scan-qr-code/src/main/java/com/t8rin/imagetoolbox/feature/scan_qr_code/presentation/components/QrInfo.kt:264— feature/scan-qr-code/src/main/java/com/t8rin/imagetoolbox/feature/scan_qr_code/presentation/components/QrInfo.kt:264-283 | feature/scan-qr-code/src/main/java/com/t8rin/imagetoolbox/feature/scan_qr_code/presentation/components/QrInfo.kt:288-312 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ProcessFileTool.kt:154— feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ProcessFileTool.kt:154-173 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ProcessFileTool.kt:175-195 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/block/TableRenderer.kt:147— libs/markdown/src/upstream/java/com/hrm/markdown/renderer/block/TableRenderer.kt:147-170 | libs/markdown/src/upstream/java/com/hrm/markdown/renderer/block/TableRenderer.kt:361-380 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/EditFileTool.kt:190— feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/EditFileTool.kt:190-209 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/EditFileTool.kt:214-234 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/ui/ToolCenterBottomSheet.kt:397— feature/ai/src/main/java/com/shifenmiao/ai/ui/ToolCenterBottomSheet.kt:397-418 | feature/common/src/main/java/com/shifenmiao/common/ui/CreationMetaConfigSheet.kt:1013-1032 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/GameDaoAdapter.kt:105— feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/GameDaoAdapter.kt:105-124 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/GameDaoAdapter.kt:105-124 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) core/network/src/main/java/com/shifenmiao/network/utils/NetworkUtils.kt:237— core/network/src/main/java/com/shifenmiao/network/utils/NetworkUtils.kt:237-257 | core/network/src/main/java/com/shifenmiao/network/utils/NetworkUtils.kt:259-278 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) feature/media-player/src/main/java/com/wanbaohe/media/ui/MediaControls.kt:188— feature/media-player/src/main/java/com/wanbaohe/media/ui/MediaControls.kt:188-209 | feature/media-player/src/main/java/com/wanbaohe/media/ui/MediaLibraryContent.kt:306-325 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) feature/scan-qr-code/src/main/java/com/t8rin/imagetoolbox/feature/scan_qr_code/presentation/screenLogic/ScanQrCodeComponent.kt:149— feature/scan-qr-code/src/main/java/com/t8rin/imagetoolbox/feature/scan_qr_code/presentation/screenLogic/ScanQrCodeComponent.kt:149-169 | feature/scan-qr-code/src/main/java/com/t8rin/imagetoolbox/feature/scan_qr_code/presentation/screenLogic/ScanQrCodeComponent.kt:180-199 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/presentation/components/ExportConfigPanel.kt:193— feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/presentation/components/ExportConfigPanel.kt:193-214 | feature/id-photo/src/main/java/com/wanbaohe/idphoto/presentation/components/IdPhotoExportConfigPanel.kt:201-220 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) libs/cropper/src/main/java/com/t8rin/cropper/state/DynamicCropState.kt:248— libs/cropper/src/main/java/com/t8rin/cropper/state/DynamicCropState.kt:248-270 | libs/cropper/src/main/java/com/t8rin/cropper/state/StaticCropState.kt:107-126 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (20 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/selection/ImageFormatSelector.kt:237— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/selection/ImageFormatSelector.kt:237-256 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/selection/ImageFormatSelector.kt:296-315 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/selection/ImageFormatSelector.kt:237` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (20 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/image/ImagePager.kt:314— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/image/ImagePager.kt:314-333 | feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaImagePager.kt:311-330 — before extracting anything, compare `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/image/ImagePager.kt` and `feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaImagePager.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 208 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/image/ImagePager.kt:314` 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, `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/image/ImagePager.kt:312` calls `rememberFilename`, `rememberFileSize` and `feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaImagePager.kt:310` 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 (20 lines × 2) feature/ai-detect/src/main/java/com/wanbaohe/aidetect/screen/ImageDetectTab.kt:92— feature/ai-detect/src/main/java/com/wanbaohe/aidetect/screen/ImageDetectTab.kt:92-111 | feature/ai-detect/src/main/java/com/wanbaohe/aidetect/screen/TextDetectTab.kt:72-91 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `feature/ai-detect/src/main/java/com/wanbaohe/aidetect/screen/ImageDetectTab.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 (20 lines × 2) feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:772— feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:772-791 | feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIPromptComponent.kt:801-820 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIPromptComponent.kt` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 360 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 `feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:772` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (20 lines × 2) feature/ascii-art/src/main/java/com/t8rin/imagetoolbox/feature/ascii_art/presentation/AsciiArtContent.kt:140— feature/ascii-art/src/main/java/com/t8rin/imagetoolbox/feature/ascii_art/presentation/AsciiArtContent.kt:140-159 | feature/edit-exif/src/main/java/com/t8rin/imagetoolbox/feature/edit_exif/presentation/EditExifContent.kt:169-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 `feature/ascii-art/src/main/java/com/t8rin/imagetoolbox/feature/ascii_art/presentation/AsciiArtContent.kt:140` 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `component` to `AsciiArtComponent` in one and `EditExifComponent` 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 (20 lines × 2) feature/calendar/src/main/java/com/wanbaohe/calendar/share/CalendarShareCardRenderer.kt:792— feature/calendar/src/main/java/com/wanbaohe/calendar/share/CalendarShareCardRenderer.kt:792-811 | feature/calendar/src/main/java/com/wanbaohe/calendar/share/CalendarShareCardRenderer.kt:907-926 — 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/calendar/src/main/java/com/wanbaohe/calendar/share/CalendarShareCardRenderer.kt:792` 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 (20 lines × 2) feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/presentation/components/ExportConfigPanel.kt:164— feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/presentation/components/ExportConfigPanel.kt:164-183 | feature/id-photo/src/main/java/com/wanbaohe/idphoto/presentation/components/IdPhotoExportConfigPanel.kt:172-191 — before extracting anything, compare `feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/presentation/components/ExportConfigPanel.kt` and `feature/id-photo/src/main/java/com/wanbaohe/idphoto/presentation/components/IdPhotoExportConfigPanel.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 49 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 (20 lines × 2) feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/ImageStitchingContent.kt:257— feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/ImageStitchingContent.kt:257-276 | feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt:332-351 — 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 `feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/ImageStitchingContent.kt:257` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (20 lines × 2) feature/ocr-document/src/main/java/com/shifenmiao/feature/document/repository/PaddleOcrRepository.kt:251— feature/ocr-document/src/main/java/com/shifenmiao/feature/document/repository/PaddleOcrRepository.kt:251-270 | feature/ocr-document/src/main/java/com/shifenmiao/feature/document/repository/PaddleOcrRepository.kt:286-305 — 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/ocr-document/src/main/java/com/shifenmiao/feature/document/repository/PaddleOcrRepository.kt:251` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (20 lines × 2) feature/scan-qr-code/src/main/java/com/t8rin/imagetoolbox/feature/scan_qr_code/presentation/components/editor/QrCalendarEditField.kt:198— feature/scan-qr-code/src/main/java/com/t8rin/imagetoolbox/feature/scan_qr_code/presentation/components/editor/QrCalendarEditField.kt:198-217 | feature/scan-qr-code/src/main/java/com/t8rin/imagetoolbox/feature/scan_qr_code/presentation/components/editor/QrCalendarEditField.kt:231-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 `feature/scan-qr-code/src/main/java/com/t8rin/imagetoolbox/feature/scan_qr_code/presentation/components/editor/QrCalendarEditField.kt:198` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (20 lines × 2) libs/diagram/src/main/java/com/wanbaohe/diagram/HeadlessDiagramRenderer.kt:98— libs/diagram/src/main/java/com/wanbaohe/diagram/HeadlessDiagramRenderer.kt:98-117 | libs/diagram/src/main/java/com/wanbaohe/diagram/OneBoxDiagramTheme.kt:15-34 — 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 `libs/diagram/src/main/java/com/wanbaohe/diagram/HeadlessDiagramRenderer.kt:98` 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 (20 lines × 2) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlSubPipelineRegistry.kt:300— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlSubPipelineRegistry.kt:300-319 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlSubPipelineRegistry.kt:537-556 — 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) feature/ai/src/main/java/com/shifenmiao/ai/ui/ToolCenterBottomSheet.kt:105— feature/ai/src/main/java/com/shifenmiao/ai/ui/ToolCenterBottomSheet.kt:105-124 | feature/common/src/main/java/com/shifenmiao/common/ui/CreationMetaConfigSheet.kt:166-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.
Duplicated block (14 lines × 3) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/setting/GlassmorphismSettingItem.kt:120— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/setting/GlassmorphismSettingItem.kt:120-133 | feature/settings/src/main/java/com/wanbaohe/setting/display/screen/DisplaySettingsScreen.kt:475-488 | feature/settings/src/main/java/com/wanbaohe/setting/display/screen/DisplaySettingsScreen.kt:521-534 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/setting/GlassmorphismSettingItem.kt:120` 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: `Check` names `androidx.compose.material.icons.filled.Check` in one and `com.t8rin.imagetoolbox.core.resources.icons.Check` 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 (14 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/AudioFeedbackUseCase.kt:77— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/AudioFeedbackUseCase.kt:77-90 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/AudioFeedbackUseCase.kt:77-90 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/AudioFeedbackUseCase.kt:81-94 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/AudioFeedbackUseCase.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/AudioFeedbackUseCase.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. 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: `AudioSettings` names `com.wanbaohe.chess.application.port.outbound.AudioSettings` in one and `com.wanbaohe.gomoku.application.port.outbound.AudioSettings` 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 (14 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/CreateGameUseCase.kt:134— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/CreateGameUseCase.kt:134-147 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/CreateGameUseCase.kt:142-155 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/CreateGameUseCase.kt:145-158 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/CreateGameUseCase.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/CreateGameUseCase.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 71 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 `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/CreateGameUseCase.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. Note first that the copies are not typed on the same thing: `GameStatus` names `com.wanbaohe.chess.domain.model.GameStatus` in one and `com.wanbaohe.gomoku.domain.model.GameStatus` 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 (14 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ManageGameUseCase.kt:66— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ManageGameUseCase.kt:66-79 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/ManageGameUseCase.kt:55-68 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/ManageGameUseCase.kt:55-68 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ManageGameUseCase.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/ManageGameUseCase.kt` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 94 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 `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ManageGameUseCase.kt:66` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note first that the copies are not typed on the same thing: `GameResultResolver` names `com.wanbaohe.chess.domain.GameResultResolver` in one and `com.wanbaohe.gomoku.domain.GameResultResolver` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/ManageGameUseCase.kt:54` calls `getById` and `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ManageGameUseCase.kt:65` 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 (14 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/PlayMoveUseCase.kt:140— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/PlayMoveUseCase.kt:140-153 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/PlayMoveUseCase.kt:105-118 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/PlayMoveUseCase.kt:83-96 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/PlayMoveUseCase.kt` and `feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/PlayMoveUseCase.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 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 `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/PlayMoveUseCase.kt:140` 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: `GameResultResolver` names `com.wanbaohe.chess.domain.GameResultResolver` in one and `com.wanbaohe.gomoku.domain.GameResultResolver` 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 (14 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessSettingsScreen.kt:343— feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessSettingsScreen.kt:343-356 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuSettingsScreen.kt:347-360 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiSettingsScreen.kt:434-447 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessSettingsScreen.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuSettingsScreen.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 138 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 `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessSettingsScreen.kt:343` 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, `feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiSettingsScreen.kt:448` calls `Column`, `weight` and `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessSettingsScreen.kt:357` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (14 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/screen/ExportDialog.kt:107— feature/chess/src/main/java/com/wanbaohe/chess/screen/ExportDialog.kt:107-120 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/ExportDialog.kt:107-120 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/ExportDialog.kt:107-120 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/screen/ExportDialog.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/ExportDialog.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 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 `feature/chess/src/main/java/com/wanbaohe/chess/screen/ExportDialog.kt:107` 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 × 3) feature/chess/src/main/java/com/wanbaohe/chess/screen/NewGameDropMenu.kt:129— feature/chess/src/main/java/com/wanbaohe/chess/screen/NewGameDropMenu.kt:129-142 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/NewGameDropMenu.kt:133-146 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/NewGameDropMenu.kt:130-143 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/screen/NewGameDropMenu.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/NewGameDropMenu.kt` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 109 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 `feature/chess/src/main/java/com/wanbaohe/chess/screen/NewGameDropMenu.kt:129` 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 × 3) feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt:444— feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt:444-457 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/OnlineMatchScreen.kt:444-457 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/OnlineMatchScreen.kt:444-457 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/OnlineMatchScreen.kt` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 428 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 `feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt:444` 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 × 3) feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt:556— feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt:556-569 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/OnlineMatchScreen.kt:556-569 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/OnlineMatchScreen.kt:556-569 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/OnlineMatchScreen.kt` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 428 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 `feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt:556` 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 × 3) feature/settings/src/main/java/com/wanbaohe/setting/display/screen/DisplaySettingsScreen.kt:430— feature/settings/src/main/java/com/wanbaohe/setting/display/screen/DisplaySettingsScreen.kt:430-443 | feature/settings/src/main/java/com/wanbaohe/setting/display/screen/DisplaySettingsScreen.kt:565-578 | feature/settings/src/main/java/com/wanbaohe/setting/display/screen/DisplaySettingsScreen.kt:664-677 — 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/settings/src/main/java/com/wanbaohe/setting/display/screen/DisplaySettingsScreen.kt:430` 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: `Check` names `androidx.compose.material.icons.filled.Check` in one and `com.t8rin.imagetoolbox.core.resources.icons.Check` 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 (14 lines × 3) libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1123— libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1123-1136 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:619-632 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:472-485 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 524 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 `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1123` 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 × 3) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/OnlinePlayUseCase.kt:383— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/OnlinePlayUseCase.kt:383-396 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/OnlinePlayUseCase.kt:424-437 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/OnlinePlayUseCase.kt:305-318 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/OnlinePlayUseCase.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/OnlinePlayUseCase.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 67 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. Note first that the copies are not typed on the same thing: `ConnectionState` names `com.wanbaohe.chess.domain.model.ConnectionState` in one and `com.wanbaohe.gomoku.domain.model.ConnectionState` 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.
Repeated repair: feature/common/src/main/java/com/shifenmiao/common/components/OperateBar.kt feature/common/src/main/java/com/shifenmiao/common/components/OperateBar.kt:53— feature/common/src/main/java/com/shifenmiao/common/components/OperateBar.kt changed 10 times in last 90 days and 7 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 4 (its worst body is OperateBarKt.OperateBar at line 53), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(i18n): improve localized UI and compact layouts”; “fix(ui): 功能卡片改成应用内入口,操作面板跟卡片主题走”; “fix(i18n): 日期格式跟随 locale、长分类 chip 与 FAB 标签允许两行、积分按 locale 千分位”; “fix(ui): 长文案不再用 marquee,改自动降字号 + 省略号”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 20:11:02 +08:00' --until='2026-11-16 20:11:02 +08:00' --full-history --no-merges -- feature/common/src/main/java/com/shifenmiao/common/components/OperateBar.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.
Repeated repair: core/database/src/main/java/com/shifenmiao/database/item/dao/ItemEntityDao.kt core/database/src/main/java/com/shifenmiao/database/item/dao/ItemEntityDao.kt:562— core/database/src/main/java/com/shifenmiao/database/item/dao/ItemEntityDao.kt changed 9 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is ItemEntityDao.insertItemWithCategoriesFromSync at line 562), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(database): dedupe sync items by source/listType/title to survive documentId drift”; “fix(navigation): 深链打开功能时补记最近访问”; “fix(online): 分类 chip 按 document_id 选主分类, 修复中英切换后同卡片显示不同分类”; “fix(i18n): es 语域统一为 tú, 充值加载失败改专用文案, 弹幕条目补 marquesina 搜索别名与陈旧默认词刷新”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 20:11:02 +08:00' --until='2026-11-16 20:11:02 +08:00' --full-history --no-merges -- core/database/src/main/java/com/shifenmiao/database/item/dao/ItemEntityDao.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.
Repeated repair: feature/ai/src/main/java/com/shifenmiao/ai/component/AIChatBaseComponent.kt feature/ai/src/main/java/com/shifenmiao/ai/component/AIChatBaseComponent.kt:235— feature/ai/src/main/java/com/shifenmiao/ai/component/AIChatBaseComponent.kt changed 9 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 4 (its worst body is AIChatBaseComponent.initConversation at line 235), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(ai): 结算与落库分离——暂停→续跑不再重复扣分/重复计数”; “fix(ai): 助手同一条消息渲染两次——占位快照按行主键驱逐,完成落库去重”; “fix(ai): 聊天页构造期回调 onModelChanged 导致 NPE(1.4.1 回归)”; “fix(ai): 空态引导接入全局 AI 助手 Tab,填充词预填输入框并精简各端文案”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 20:11:02 +08:00' --until='2026-11-16 20:11:02 +08:00' --full-history --no-merges -- feature/ai/src/main/java/com/shifenmiao/ai/component/AIChatBaseComponent.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.
Repeated repair: feature/common/src/main/java/com/shifenmiao/common/sync/ItemSyncManager.kt feature/common/src/main/java/com/shifenmiao/common/sync/ItemSyncManager.kt:134— feature/common/src/main/java/com/shifenmiao/common/sync/ItemSyncManager.kt changed 7 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 6 (its worst body is ItemSyncManager.syncAllOnAppLaunch at line 134), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(privacy): stop clipboard re-read on recomposition and gate pre-consent item sync”; “fix(sync): 下拉刷新/进页同步加 10s 超时,断网挂起时复位 spinner 并提示网络异常”; “fix(i18n): es 语域统一为 tú, 充值加载失败改专用文案, 弹幕条目补 marquesina 搜索别名与陈旧默认词刷新”; “fix(sync): 同步主键切换为 documentId,修复条目重发后重复/孤儿”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 20:11:02 +08:00' --until='2026-11-16 20:11:02 +08:00' --full-history --no-merges -- feature/common/src/main/java/com/shifenmiao/common/sync/ItemSyncManager.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.
Repeated repair: scripts/publish_gitcode_release.py scripts/publish_gitcode_release.py:147— scripts/publish_gitcode_release.py changed 6 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 15 (its worst body is publish_gitcode_release.upload at line 147), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(ci): raise create_release timeout to 90m and fix GitCode attachment deletion”; “fix(release): GitCode 附件上传容忍网络层异常并重试”; “fix(ci): GitCode 发布脚本打印前抹掉令牌, 网络异常不再回带鉴权的 URL”; “fix(ci): GitCode 发布脚本逐个上传, 不再因单个失败短路”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 20:11:02 +08:00' --until='2026-11-16 20:11:02 +08:00' --full-history --no-merges -- scripts/publish_gitcode_release.py`: 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.
Repeated repair: feature/common/src/main/java/com/shifenmiao/common/components/text/TextSelectionToolbar.kt feature/common/src/main/java/com/shifenmiao/common/components/text/TextSelectionToolbar.kt:236— feature/common/src/main/java/com/shifenmiao/common/components/text/TextSelectionToolbar.kt changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is TextSelectionToolbarKt.TextSelectionActionButton at line 236), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(ai): 修复 AI 互聊记录/标题/选区工具条,补齐求好评上报”; “fix(ai): 文本选中菜单改用选区配色并贴回选区”; “fix(ai): align selection toolbar with chat selection”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 20:11:02 +08:00' --until='2026-11-16 20:11:02 +08:00' --full-history --no-merges -- feature/common/src/main/java/com/shifenmiao/common/components/text/TextSelectionToolbar.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.
Repeated repair: feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaPickerRootContentEmbeddable.kt feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaPickerRootContentEmbeddable.kt:80— feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaPickerRootContentEmbeddable.kt changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is MediaPickerRootContentEmbeddableKt.MediaPickerRootContentEmbeddable at line 80), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(permissions): show a purpose dialog before every runtime permission request”; “fix(ui): 把选图、保存提示和搜索说明收成完整句子”; “fix(ai): 修复海外语音输入权限死循环,系统识别不再申请多余录音权限”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 20:11:02 +08:00' --until='2026-11-16 20:11:02 +08:00' --full-history --no-merges -- feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaPickerRootContentEmbeddable.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.
Repeated repair: feature/media-player/src/main/java/com/wanbaohe/media/ui/MediaDateAnchorBar.kt feature/media-player/src/main/java/com/wanbaohe/media/ui/MediaDateAnchorBar.kt:61— feature/media-player/src/main/java/com/wanbaohe/media/ui/MediaDateAnchorBar.kt changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 4 (its worst body is MediaDateAnchorBarKt.MediaDateAnchorBar at line 61), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(media-player): 媒体菜单上下留白改为对称”; “fix(media-player): 媒体菜单统一用 surfaceContainerLowest 并补顶部留白”; “fix(media-player): 日期与顶栏菜单统一用带箭头气泡”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 20:11:02 +08:00' --until='2026-11-16 20:11:02 +08:00' --full-history --no-merges -- feature/media-player/src/main/java/com/wanbaohe/media/ui/MediaDateAnchorBar.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.
Repeated repair: feature/record-center/src/main/java/com/wanbaohe/recordcenter/service/HealthInsightService.kt feature/record-center/src/main/java/com/wanbaohe/recordcenter/service/HealthInsightService.kt:83— feature/record-center/src/main/java/com/wanbaohe/recordcenter/service/HealthInsightService.kt changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is HealthInsightService.buildInput at line 83), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(i18n): 空内容兜底文案本地化, 易经解读跟随应用语言”; “fix(i18n): AI 生成类提示词跟随应用语言, 不再一律输出中文”; “fix(ai): 创建智能体/提示词补登录与积分闸, 修复全局 401 兜底失效”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 20:11:02 +08:00' --until='2026-11-16 20:11:02 +08:00' --full-history --no-merges -- feature/record-center/src/main/java/com/wanbaohe/recordcenter/service/HealthInsightService.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.
Repeated repair: feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/ManageGameUseCase.kt feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/ManageGameUseCase.kt:48— feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/ManageGameUseCase.kt changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 3 (its worst body is ManageGameUseCase.start at line 48), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(i18n): 活动日志与提词器文案本地化,清理代码硬编码中文”; “fix(games): 棋类游戏(chess/gomoku/xiangqi)再来一局保留历史对局、返回栈底兜底”; “fix(xiangqi): 修棋谱正确性与回放可用性, 统一结果词汇”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 20:11:02 +08:00' --until='2026-11-16 20:11:02 +08:00' --full-history --no-merges -- feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/ManageGameUseCase.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.
Repeated repair: core/base/src/main/java/com/shifenmiao/base/utils/DateUtils.kt core/base/src/main/java/com/shifenmiao/base/utils/DateUtils.kt:60— core/base/src/main/java/com/shifenmiao/base/utils/DateUtils.kt changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 4 (its worst body is DateUtils.getTimePassedInHourMinSec at line 60), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(ui): 阿语跟随 RTL 布局,修正日期 bidi、卡片对齐与搜索高亮”; “fix(i18n): 日期格式跟随 locale、长分类 chip 与 FAB 标签允许两行、积分按 locale 千分位”; “fix(i18n): 修复复数/占位/日文残留/转盘命名/时间硬编码”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 20:11:02 +08:00' --until='2026-11-16 20:11:02 +08:00' --full-history --no-merges -- core/base/src/main/java/com/shifenmiao/base/utils/DateUtils.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.
Repeated repair: feature/lifetime/src/main/java/com/shifenmiao/lifetime/domain/MilestoneInsightService.kt feature/lifetime/src/main/java/com/shifenmiao/lifetime/domain/MilestoneInsightService.kt:50— feature/lifetime/src/main/java/com/shifenmiao/lifetime/domain/MilestoneInsightService.kt changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 3 (its worst body is MilestoneInsightService.generateAndSave at line 50), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(i18n): 空内容兜底文案本地化, 易经解读跟随应用语言”; “fix(i18n): AI 生成类提示词跟随应用语言, 不再一律输出中文”; “fix(ai): 创建智能体/提示词补登录与积分闸, 修复全局 401 兜底失效”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 20:11:02 +08:00' --until='2026-11-16 20:11:02 +08:00' --full-history --no-merges -- feature/lifetime/src/main/java/com/shifenmiao/lifetime/domain/MilestoneInsightService.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.
D4 · Code Duplication· Edited copy of a member (30 corresponding lines) · ×12
Edited copy of a member (30 corresponding lines) libs/documentscanner/src/main/java/com/t8rin/documentscanner/utils/ImageUtil.kt:122— libs/documentscanner/src/main/java/com/t8rin/documentscanner/utils/ImageUtil.kt:122-168 | libs/opencv-tools/src/main/java/com/t8rin/opencv_tools/free_corners_crop/FreeCrop.kt:51-91 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (30 corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlObjectSubPipeline.kt:182— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlObjectSubPipeline.kt:182-211 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlUsecaseSubPipeline.kt:197-231 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (30 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/screen/TokenUsageScreen.kt:485— feature/ai/src/main/java/com/shifenmiao/ai/screen/TokenUsageScreen.kt:485-514 | feature/ai/src/main/java/com/shifenmiao/ai/screen/TokenUsageScreen.kt:520-554 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (30 corresponding lines) feature/online/src/main/java/com/shifenmiao/online/component/CreateHtmlComponent.kt:140— feature/online/src/main/java/com/shifenmiao/online/component/CreateHtmlComponent.kt:140-172 | feature/online/src/main/java/com/shifenmiao/online/component/CreateNoteComponent.kt:124-153 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (30 corresponding lines) feature/common/src/main/java/com/shifenmiao/common/handle/UrlNavigator.kt:344— feature/common/src/main/java/com/shifenmiao/common/handle/UrlNavigator.kt:344-378 | feature/scan-qr-code/src/main/java/com/t8rin/imagetoolbox/feature/scan_qr_code/data/DefaultScanCodeResultResolver.kt:81-110 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (30 corresponding lines) core/base/src/main/java/com/wanbaohe/base/ui/MakeDown.kt:245— core/base/src/main/java/com/wanbaohe/base/ui/MakeDown.kt:245-274 | core/base/src/main/java/com/wanbaohe/base/ui/MakeDown.kt:282-312 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (30 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/ui/ToolCenterBottomSheet.kt:506— feature/ai/src/main/java/com/shifenmiao/ai/ui/ToolCenterBottomSheet.kt:506-535 | feature/common/src/main/java/com/shifenmiao/common/ui/CreationMetaConfigSheet.kt:1050-1082 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (30 corresponding lines) feature/common/src/main/java/com/shifenmiao/common/components/comments/CommentsComponent.kt:277— feature/common/src/main/java/com/shifenmiao/common/components/comments/CommentsComponent.kt:277-306 | feature/common/src/main/java/com/shifenmiao/common/components/comments/CommentsComponent.kt:308-337 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (30 corresponding lines) feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/screenLogic/FormatConversionComponent.kt:309— feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/screenLogic/FormatConversionComponent.kt:309-338 | feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:447-484 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (30 corresponding lines) feature/id-photo/src/main/java/com/wanbaohe/idphoto/presentation/screenLogic/IdPhotoComponent.kt:277— feature/id-photo/src/main/java/com/wanbaohe/idphoto/presentation/screenLogic/IdPhotoComponent.kt:277-309 | feature/id-photo/src/main/java/com/wanbaohe/idphoto/presentation/screenLogic/IdPhotoComponent.kt:341-370 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (30 corresponding lines) feature/webview/src/main/java/com/shifenmiao/webview/WebViewComponent.kt:362— feature/webview/src/main/java/com/shifenmiao/webview/WebViewComponent.kt:362-392 | feature/webview/src/main/java/com/shifenmiao/webview/WebViewComponent.kt:749-778 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (30 corresponding lines) feature/lifetime/src/main/java/com/shifenmiao/lifetime/ui/CountdownEventCard.kt:54— feature/lifetime/src/main/java/com/shifenmiao/lifetime/ui/CountdownEventCard.kt:54-87 | feature/lifetime/src/main/java/com/shifenmiao/lifetime/ui/PersonalMilestoneCard.kt:47-76 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (31 corresponding lines) · ×12
Edited copy of a member (31 corresponding lines) libs/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:85— libs/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:85-119 | libs/collages/src/main/java/com/t8rin/collages/utils/CollageLayoutFactory.kt:116-146 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (31 corresponding lines) feature/gomoku/src/main/java/com/wanbaohe/gomoku/ui/board/GomokuBoard.kt:249— feature/gomoku/src/main/java/com/wanbaohe/gomoku/ui/board/GomokuBoard.kt:249-283 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/ui/board/XiangqiBoard.kt:351-381 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (31 corresponding lines) feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuGameComponent.kt:337— feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuGameComponent.kt:337-367 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiGameComponent.kt:218-248 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (31 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/EditExifTool.kt:95— feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/EditExifTool.kt:95-127 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ProcessFileTool.kt:106-136 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (31 corresponding lines) feature/compass/src/main/java/com/wanbaohe/compass/screen/CompassScreen.kt:188— feature/compass/src/main/java/com/wanbaohe/compass/screen/CompassScreen.kt:188-218 | feature/measurement/src/main/java/com/wanbaohe/measurement/screen/MeasurementScreen.kt:462-492 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (31 corresponding lines) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassCheckbox.kt:58— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassCheckbox.kt:58-88 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassRadioButton.kt:54-98 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (31 corresponding lines) feature/dsh-client/src/main/java/com/wanbaohe/dsh/screen/PairingScreen.kt:565— feature/dsh-client/src/main/java/com/wanbaohe/dsh/screen/PairingScreen.kt:565-596 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiLibraryScreen.kt:444-474 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (31 corresponding lines) feature/boardgame/src/main/java/com/wanbaohe/boardgame/ui/GameCard.kt:276— feature/boardgame/src/main/java/com/wanbaohe/boardgame/ui/GameCard.kt:276-307 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiLibraryScreen.kt:407-437 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (31 corresponding lines) feature/online/src/main/java/com/shifenmiao/online/ui/NoteCategoryChips.kt:59— feature/online/src/main/java/com/shifenmiao/online/ui/NoteCategoryChips.kt:59-101 | feature/online/src/main/java/com/shifenmiao/online/ui/NoteCategoryChips.kt:108-138 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (31 corresponding lines) feature/settings/src/main/java/com/wanbaohe/setting/ai/screen/AIFeatureSettingsScreen.kt:184— feature/settings/src/main/java/com/wanbaohe/setting/ai/screen/AIFeatureSettingsScreen.kt:184-221 | feature/settings/src/main/java/com/wanbaohe/setting/ai/screen/AIFeatureSettingsScreen.kt:233-263 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (31 corresponding lines) feature/load-net-image/src/main/java/com/t8rin/imagetoolbox/feature/load_net_image/presentation/screenLogic/LoadNetImageComponent.kt:181— feature/load-net-image/src/main/java/com/t8rin/imagetoolbox/feature/load_net_image/presentation/screenLogic/LoadNetImageComponent.kt:181-212 | feature/wallpapers-export/src/main/java/com/t8rin/imagetoolbox/feature/wallpapers_export/presentation/screenLogic/WallpapersExportComponent.kt:181-211 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (31 corresponding lines) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedButtonGroup.kt:145— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedButtonGroup.kt:145-175 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedButtonGroup.kt:219-255 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (22 corresponding lines) · ×12
Edited copy of a member (22 corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlMindmapSubPipeline.kt:169— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlMindmapSubPipeline.kt:169-190 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlWbsSubPipeline.kt:163-184 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (22 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/screen/AIDuelChatScreen.kt:1421— feature/ai/src/main/java/com/shifenmiao/ai/screen/AIDuelChatScreen.kt:1421-1447 | feature/household-items/src/main/java/com/wanbaohe/householditems/service/HouseholdService.kt:336-357 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (22 corresponding lines) feature/common/src/main/java/com/shifenmiao/common/voice/FunAsrClient.kt:78— feature/common/src/main/java/com/shifenmiao/common/voice/FunAsrClient.kt:78-101 | feature/common/src/main/java/com/shifenmiao/common/voice/IFlytekAsrClient.kt:91-112 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (22 corresponding lines) libs/cropper/src/main/java/com/t8rin/cropper/util/ImageContentScaleUtil.kt:51— libs/cropper/src/main/java/com/t8rin/cropper/util/ImageContentScaleUtil.kt:51-72 | libs/image/src/main/java/com/t8rin/image/util/ImageContentScaleUtil.kt:51-72 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (22 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/model/MessageUiModel.kt:392— feature/ai/src/main/java/com/shifenmiao/ai/model/MessageUiModel.kt:392-413 | feature/ai/src/main/java/com/shifenmiao/ai/model/MessageUiModel.kt:490-513 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (22 corresponding lines) feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/screenLogic/FormatConversionComponent.kt:204— feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/screenLogic/FormatConversionComponent.kt:204-225 | feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/screenLogic/SingleEditComponent.kt:488-514 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (22 corresponding lines) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/buttons/EraseModeButton.kt:50— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/buttons/EraseModeButton.kt:50-72 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/buttons/PanModeButton.kt:47-68 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (22 corresponding lines) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/sliders/custom_slider/CustomSliderDefaults.kt:220— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/sliders/custom_slider/CustomSliderDefaults.kt:220-241 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/sliders/custom_slider/CustomSliderDefaults.kt:261-282 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (22 corresponding lines) feature/poem/src/main/java/com/wanbaohe/poem/ai/tool/QueryPoemFavoritesTool.kt:115— feature/poem/src/main/java/com/wanbaohe/poem/ai/tool/QueryPoemFavoritesTool.kt:115-136 | feature/poem/src/main/java/com/wanbaohe/poem/ai/tool/SearchPoemTool.kt:147-171 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (22 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/InteractiveToolRuntime.kt:451— feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/InteractiveToolRuntime.kt:451-472 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/InteractiveToolRuntime.kt:476-497 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (22 corresponding lines) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/BrushSoftnessSelector.kt:46— feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/BrushSoftnessSelector.kt:46-67 | feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/components/SpacingSelector.kt:45-67 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (22 corresponding lines) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaExtensionHeader.kt:45— feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaExtensionHeader.kt:45-66 | feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaSizeFooter.kt:45-66 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
AC3 · Page structure· Page without a main landmark · ×11
Page without a main landmark web/file_viewer/src/docx.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark web/file_viewer/src/imgweb.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark web/file_viewer/src/md.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark web/file_viewer/src/odp.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark web/file_viewer/src/ppt.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark web/file_viewer/src/pptx.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark web/file_viewer/src/prose.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark web/file_viewer/src/text.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark web/file_viewer/src/unsupported.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark web/file_viewer/src/xlsx.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark web/milkdown-editor/index.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
D4 · Code Duplication· Edited copy of a member (21 corresponding lines) · ×11
Edited copy of a member (21 corresponding lines) feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/screenLogic/LimitsResizeComponent.kt:153— feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/screenLogic/LimitsResizeComponent.kt:153-175 | feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/screenLogic/WeightResizeComponent.kt:171-202 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) feature/common/src/main/java/com/shifenmiao/common/components/comments/CommentsBottomSheet.kt:1092— feature/common/src/main/java/com/shifenmiao/common/components/comments/CommentsBottomSheet.kt:1092-1117 | feature/notification/src/main/java/com/wanbaohe/notification/screen/NotificationScreen.kt:533-553 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/ManageGameUseCase.kt:47— feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/ManageGameUseCase.kt:47-68 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/ManageGameUseCase.kt:48-68 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:908— feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:908-928 | feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIPromptComponent.kt:943-964 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/service/AgentCreationService.kt:452— feature/ai/src/main/java/com/shifenmiao/ai/service/AgentCreationService.kt:452-472 | feature/ai/src/main/java/com/shifenmiao/ai/service/PromptCreationService.kt:387-407 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) core/data/src/main/java/com/t8rin/imagetoolbox/core/data/utils/UriUtils.kt:129— core/data/src/main/java/com/t8rin/imagetoolbox/core/data/utils/UriUtils.kt:129-151 | core/utils/src/main/java/com/t8rin/imagetoolbox/core/utils/UriUtils.kt:164-184 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) core/database/src/main/java/com/shifenmiao/database/activity/ActivityLogRecorder.kt:667— core/database/src/main/java/com/shifenmiao/database/activity/ActivityLogRecorder.kt:667-687 | core/database/src/main/java/com/shifenmiao/database/activity/ActivityLogRecorder.kt:707-728 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) feature/household-items/src/main/java/com/wanbaohe/householditems/screen/HouseholdItemsScreen.kt:442— feature/household-items/src/main/java/com/wanbaohe/householditems/screen/HouseholdItemsScreen.kt:442-462 | feature/household-items/src/main/java/com/wanbaohe/householditems/screen/HouseholdItemsScreen.kt:471-493 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) core/database/src/main/java/com/shifenmiao/database/ai/entity/ConversationEntity.kt:69— core/database/src/main/java/com/shifenmiao/database/ai/entity/ConversationEntity.kt:69-89 | core/database/src/main/java/com/shifenmiao/database/ai/entity/ConversationEntity.kt:91-114 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/data/GameDaoAdapter.kt:68— feature/chess/src/main/java/com/wanbaohe/chess/data/GameDaoAdapter.kt:68-88 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/GameDaoAdapter.kt:66-86 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/presentation/components/ImagePickerList.kt:97— feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/presentation/components/ImagePickerList.kt:97-117 | feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/presentation/components/StyleSelector.kt:122-143 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (23 corresponding lines) · ×11
Edited copy of a member (23 corresponding lines) core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/CheckboxRenderer.kt:46— core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/CheckboxRenderer.kt:46-68 | core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/SwitchRenderer.kt:46-68 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (23 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/service/AgentFileServiceImpl.kt:826— feature/ai/src/main/java/com/shifenmiao/ai/service/AgentFileServiceImpl.kt:826-848 | feature/ai/src/main/java/com/shifenmiao/ai/service/AgentFileServiceImpl.kt:850-872 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (23 corresponding lines) feature/dsh-client/src/main/java/com/wanbaohe/dsh/session/SubagentStore.kt:409— feature/dsh-client/src/main/java/com/wanbaohe/dsh/session/SubagentStore.kt:409-431 | feature/dsh-client/src/main/java/com/wanbaohe/dsh/session/SubagentStore.kt:434-456 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (23 corresponding lines) core/data/src/main/java/com/t8rin/imagetoolbox/core/data/image/AndroidImageGetter.kt:79— core/data/src/main/java/com/t8rin/imagetoolbox/core/data/image/AndroidImageGetter.kt:79-102 | core/data/src/main/java/com/t8rin/imagetoolbox/core/data/image/AndroidImageGetter.kt:138-160 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (23 corresponding lines) feature/file-transfer/src/main/java/com/wanbaohe/file_transfer/screenLogic/FileTransferComponent.kt:438— feature/file-transfer/src/main/java/com/wanbaohe/file_transfer/screenLogic/FileTransferComponent.kt:438-460 | feature/file-transfer/src/main/java/com/wanbaohe/file_transfer/screenLogic/FileTransferComponent.kt:465-488 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (23 corresponding lines) feature/visual-automation/src/main/java/com/wanbaohe/visual/automation/injector/TouchInjector.kt:42— feature/visual-automation/src/main/java/com/wanbaohe/visual/automation/injector/TouchInjector.kt:42-64 | feature/visual-automation/src/main/java/com/wanbaohe/visual/automation/injector/TouchInjector.kt:70-92 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (23 corresponding lines) feature/profile/src/main/java/com/wanbaohe/profile/viewmodel/PayComponent.kt:305— feature/profile/src/main/java/com/wanbaohe/profile/viewmodel/PayComponent.kt:305-334 | feature/profile/src/main/java/com/wanbaohe/profile/viewmodel/PayComponent.kt:386-408 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (23 corresponding lines) feature/zip/src/main/java/com/t8rin/imagetoolbox/feature/zip/presentation/components/ZipArchiveList.kt:155— feature/zip/src/main/java/com/t8rin/imagetoolbox/feature/zip/presentation/components/ZipArchiveList.kt:155-177 | feature/zip/src/main/java/com/t8rin/imagetoolbox/feature/zip/presentation/components/ZipArchiveList.kt:494-516 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (23 corresponding lines) feature/collage-maker/src/main/java/com/t8rin/imagetoolbox/collage_maker/presentation/screenLogic/CollageMakerComponent.kt:237— feature/collage-maker/src/main/java/com/t8rin/imagetoolbox/collage_maker/presentation/screenLogic/CollageMakerComponent.kt:237-262 | feature/collage-maker/src/main/java/com/t8rin/imagetoolbox/collage_maker/presentation/screenLogic/CollageMakerComponent.kt:266-288 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (23 corresponding lines) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/utils/FullscreenPopup.kt:130— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/utils/FullscreenPopup.kt:130-152 | libs/modalsheet/src/main/java/com/t8rin/modalsheet/FullscreenPopup.kt:155-178 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (23 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/InteractiveToolRuntime.kt:280— feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/InteractiveToolRuntime.kt:280-302 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/InteractiveToolRuntime.kt:309-331 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (4 corresponding lines) · ×11
Edited copy of a member (4 corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlDitaaSubPipeline.kt:183— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlDitaaSubPipeline.kt:183-186 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlDitaaSubPipeline.kt:197-200 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupDocumentCodec.kt:364— feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupDocumentCodec.kt:364-367 | feature/text-card/src/main/java/com/wanbaohe/textcard/data/project/TextCardDocumentCodec.kt:250-259 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlStructSubPipeline.kt:129— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlStructSubPipeline.kt:129-132 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlTreeRenderSupport.kt:43-49 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/DynamicUi.kt:465— core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/DynamicUi.kt:465-470 | feature/app/src/main/java/com/wanbaohe/app/ui/AISpecializedQuestionField.kt:389-392 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:663— feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:663-666 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiGameComponent.kt:580-583 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/data/ChessMoveFallback.kt:91— feature/chess/src/main/java/com/wanbaohe/chess/data/ChessMoveFallback.kt:91-94 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/GomokuMoveFallback.kt:136-139 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/service/ChessServiceImpl.kt:69— feature/chess/src/main/java/com/wanbaohe/chess/service/ChessServiceImpl.kt:69-72 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/service/XiangqiServiceImpl.kt:68-71 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupDocumentCodec.kt:786— feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupDocumentCodec.kt:786-789 | feature/text-card/src/main/java/com/wanbaohe/textcard/data/project/TextCardDocumentCodec.kt:644-647 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/signature/screenLogic/SignaturePdfToolComponent.kt:113— feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/signature/screenLogic/SignaturePdfToolComponent.kt:113-116 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/watermark/screenLogic/WatermarkPdfToolComponent.kt:109-112 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) feature/ai-detect/src/main/java/com/wanbaohe/aidetect/service/AiDetectService.kt:197— feature/ai-detect/src/main/java/com/wanbaohe/aidetect/service/AiDetectService.kt:197-200 | feature/household-items/src/main/java/com/wanbaohe/householditems/service/HouseholdService.kt:359-362 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) libs/twain/src/main/java/io/noties/markwon/prism4j/languages/Prism_c.java:28— libs/twain/src/main/java/io/noties/markwon/prism4j/languages/Prism_c.java:28-31 | libs/twain/src/main/java/io/noties/markwon/prism4j/languages/Prism_scala.java:25-28 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 4+ corresponding lines) · ×10
Edited copies of one member (3 members, 4+ corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlArchimateSubPipeline.kt:568— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlArchimateSubPipeline.kt:568-573 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlArchimateSubPipeline.kt:589-592 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlArchimateSubPipeline.kt:599-602 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 4+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ManageGameUseCase.kt:258— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ManageGameUseCase.kt:258-261 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/ManageGameUseCase.kt:218-221 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/ManageGameUseCase.kt:229-232 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 4+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/component/ChessAnalysisComponent.kt:239— feature/chess/src/main/java/com/wanbaohe/chess/component/ChessAnalysisComponent.kt:239-242 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuAnalysisComponent.kt:253-256 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiAnalysisComponent.kt:230-233 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 4+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/PlayMoveUseCase.kt:169— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/PlayMoveUseCase.kt:169-172 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/PlayMoveUseCase.kt:134-137 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/PlayMoveUseCase.kt:119-122 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 4+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/data/GameDaoAdapter.kt:44— feature/chess/src/main/java/com/wanbaohe/chess/data/GameDaoAdapter.kt:44-47 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/GameDaoAdapter.kt:42-45 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/GameDaoAdapter.kt:44-47 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 4+ corresponding lines) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedButton.kt:170— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedButton.kt:170-173 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedFloatingActionButton.kt:158-161 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedIconButton.kt:178-181 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 4+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/domain/GameInteraction.kt:50— feature/chess/src/main/java/com/wanbaohe/chess/domain/GameInteraction.kt:50-53 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/domain/GameInteraction.kt:48-51 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/domain/GameInteraction.kt:48-51 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 4+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/service/ChessServiceImpl.kt:98— feature/chess/src/main/java/com/wanbaohe/chess/service/ChessServiceImpl.kt:98-101 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/service/GomokuServiceImpl.kt:98-101 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/service/XiangqiServiceImpl.kt:91-94 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 4+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/GameQueryUseCase.kt:68— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/GameQueryUseCase.kt:68-71 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/GameQueryUseCase.kt:66-69 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/GameQueryUseCase.kt:61-64 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 4+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/domain/model/OnlineRoomConfig.kt:42— feature/chess/src/main/java/com/wanbaohe/chess/domain/model/OnlineRoomConfig.kt:42-45 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/domain/model/OnlineRoomConfig.kt:42-45 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/domain/model/OnlineRoomConfig.kt:41-44 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (9 corresponding lines) · ×10
Edited copy of a member (9 corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidMindmapSubPipeline.kt:208— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidMindmapSubPipeline.kt:208-217 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlTreeRenderSupport.kt:370-378 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ManageGameUseCase.kt:149— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ManageGameUseCase.kt:149-159 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/ManageGameUseCase.kt:124-132 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) feature/common/src/main/java/com/shifenmiao/common/file/PngAigcInjector.kt:133— feature/common/src/main/java/com/shifenmiao/common/file/PngAigcInjector.kt:133-141 | feature/common/src/main/java/com/shifenmiao/common/file/PngAigcInjector.kt:147-155 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/presentation/AiOpponentDisplay.kt:27— feature/chess/src/main/java/com/wanbaohe/chess/presentation/AiOpponentDisplay.kt:27-36 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/presentation/AiOpponentDisplay.kt:27-35 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) feature/compass/src/main/java/com/wanbaohe/compass/ui/CompassDial.kt:206— feature/compass/src/main/java/com/wanbaohe/compass/ui/CompassDial.kt:206-221 | feature/compass/src/main/java/com/wanbaohe/compass/ui/luopan/LuopanDial.kt:286-294 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupDocumentCodec.kt:698— feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupDocumentCodec.kt:698-706 | feature/text-card/src/main/java/com/wanbaohe/textcard/data/project/TextCardDocumentCodec.kt:552-563 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/LayoutComponents.kt:403— core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/LayoutComponents.kt:403-411 | core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/LayoutComponents.kt:413-424 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt:426— feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt:426-434 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/router/screenLogic/XiangqiRouterComponent.kt:402-410 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) feature/marktodo/src/main/java/com/shifenmiao/marktodo/service/MarkTodoServiceImpl.kt:544— feature/marktodo/src/main/java/com/shifenmiao/marktodo/service/MarkTodoServiceImpl.kt:544-552 | feature/marktodo/src/main/java/com/shifenmiao/marktodo/service/MarkTodoServiceImpl.kt:554-562 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/internal/layout/inline/InlineFlowLayoutCache.kt:23— libs/markdown/src/upstream/java/com/hrm/markdown/renderer/internal/layout/inline/InlineFlowLayoutCache.kt:23-33 | libs/markdown/src/upstream/java/com/hrm/markdown/renderer/internal/layout/inline/InlineRenderResultCache.kt:22-30 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (28 lines × 2) core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:1318— core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:1318-1345 | core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:1435-1462 — 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 `core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:1318` 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 (28 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/buttons/BottomButtonsBlock.kt:285— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/buttons/BottomButtonsBlock.kt:285-312 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/buttons/BottomButtonsBlock.kt:387-414 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/buttons/BottomButtonsBlock.kt:285` 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 (28 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/image/ImagePager.kt:391— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/image/ImagePager.kt:391-418 | feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaImagePager.kt:377-404 — before extracting anything, compare `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/image/ImagePager.kt` and `feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaImagePager.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 208 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/image/ImagePager.kt:391` 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 (28 lines × 2) feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:460— feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:460-487 | feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt:448-475 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 625 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 `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:460` 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 (28 lines × 2) feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:1039— feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:1039-1066 | feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt:1035-1062 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 625 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 `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:1039` 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: `Edit` names `androidx.compose.material.icons.outlined.Edit` in one and `com.t8rin.imagetoolbox.core.resources.icons.Edit` 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 (28 lines × 2) feature/audio-cover-extractor/src/main/java/com/t8rin/imagetoolbox/feature/audio_cover_extractor/ui/screenLogic/AudioCoverExtractorComponent.kt:128— feature/audio-cover-extractor/src/main/java/com/t8rin/imagetoolbox/feature/audio_cover_extractor/ui/screenLogic/AudioCoverExtractorComponent.kt:128-155 | feature/audio-cover-extractor/src/main/java/com/t8rin/imagetoolbox/feature/audio_cover_extractor/ui/screenLogic/AudioCoverExtractorComponent.kt:176-203 — 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/audio-cover-extractor/src/main/java/com/t8rin/imagetoolbox/feature/audio_cover_extractor/ui/screenLogic/AudioCoverExtractorComponent.kt:128` 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 (28 lines × 2) feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:257— feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:257-284 | feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt:355-382 — before extracting anything, compare `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt` and `feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 190 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 `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:257` 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 (28 lines × 2) libs/cropper/src/main/java/com/t8rin/cropper/image/ImageWithConstraints.kt:223— libs/cropper/src/main/java/com/t8rin/cropper/image/ImageWithConstraints.kt:223-250 | libs/image/src/main/java/com/t8rin/image/ImageWithConstraints.kt:223-250 — before extracting anything, compare `libs/cropper/src/main/java/com/t8rin/cropper/image/ImageWithConstraints.kt` and `libs/image/src/main/java/com/t8rin/image/ImageWithConstraints.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 124 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: `Canvas` names `androidx.compose.foundation.Canvas` in one and `androidx.compose.ui.graphics.Canvas` 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 (28 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/AuthorizationCodeScreen.kt:143— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/AuthorizationCodeScreen.kt:143-170 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/AuthorizationCodeScreen.kt:187-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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/AuthorizationCodeScreen.kt:143` 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: `Check` names `androidx.compose.material.icons.outlined.Check` in one and `com.t8rin.imagetoolbox.core.resources.icons.Check` 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 (28 lines × 2) feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageChessTool.kt:301— feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageChessTool.kt:301-328 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageGomokuTool.kt:301-328 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageChessTool.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageGomokuTool.kt` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 137 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.
Duplicated block (27 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/modifier/MeshGradient.kt:309— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/modifier/MeshGradient.kt:309-335 | feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/data/AndroidGradientMaker.kt:354-380 — before extracting anything, compare `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/modifier/MeshGradient.kt` and `feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/data/AndroidGradientMaker.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 134 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 (27 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/modifier/MeshGradient.kt:342— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/modifier/MeshGradient.kt:342-368 | feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/data/AndroidGradientMaker.kt:387-413 — before extracting anything, compare `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/modifier/MeshGradient.kt` and `feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/data/AndroidGradientMaker.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 134 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 (27 lines × 2) core/weather/src/nonfoss/java/com/wanbaohe/core/weather/data/source/QWeatherDataSource.kt:93— core/weather/src/nonfoss/java/com/wanbaohe/core/weather/data/source/QWeatherDataSource.kt:93-119 | core/weather/src/nonfoss/java/com/wanbaohe/core/weather/data/source/QWeatherDataSource.kt:139-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. Read the line range as the matched WINDOW rather than a finished unit: at `core/weather/src/nonfoss/java/com/wanbaohe/core/weather/data/source/QWeatherDataSource.kt:93` 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 (27 lines × 2) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:239— feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:239-265 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt:239-265 — before extracting anything, compare `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt` and `feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 239 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 `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:239` 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 (27 lines × 2) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessSettingsScreen.kt:345— feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessSettingsScreen.kt:345-371 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuSettingsScreen.kt:349-375 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessSettingsScreen.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuSettingsScreen.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 138 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 `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessSettingsScreen.kt:345` 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 (27 lines × 2) feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/NewGameDropMenu.kt:214— feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/NewGameDropMenu.kt:214-240 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/NewGameDropMenu.kt:211-237 — before extracting anything, compare `feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/NewGameDropMenu.kt` and `feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/NewGameDropMenu.kt` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 164 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 `feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/NewGameDropMenu.kt:214` 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 (27 lines × 2) feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeCountdownDetailScreen.kt:91— feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeCountdownDetailScreen.kt:91-117 | feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeMilestoneDetailScreen.kt:108-134 — 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 `feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeCountdownDetailScreen.kt:91` 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: `Delete` names `androidx.compose.material.icons.outlined.Delete` in one and `com.t8rin.imagetoolbox.core.resources.icons.Delete` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeCountdownDetailScreen.kt:118` calls `remember`, `CountdownCalculator`, `calculate` and `feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeMilestoneDetailScreen.kt:135` 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 (27 lines × 2) feature/text-card/src/main/java/com/wanbaohe/textcard/presentation/editor/TextCardEditorScreen.kt:506— feature/text-card/src/main/java/com/wanbaohe/textcard/presentation/editor/TextCardEditorScreen.kt:506-532 | feature/text-card/src/main/java/com/wanbaohe/textcard/presentation/editor/TextCardEditorScreen.kt:617-643 — 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 (27 lines × 2) feature/visual-automation/src/main/java/com/wanbaohe/visual/automation/ai/VisualAIClient.kt:112— feature/visual-automation/src/main/java/com/wanbaohe/visual/automation/ai/VisualAIClient.kt:112-138 | feature/visual-automation/src/main/java/com/wanbaohe/visual/automation/ai/VisualAIClient.kt:203-229 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/visual-automation/src/main/java/com/wanbaohe/visual/automation/ai/VisualAIClient.kt:112` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `feature/visual-automation/src/main/java/com/wanbaohe/visual/automation/ai/VisualAIClient.kt:139` calls `errorBody`, `orEmpty` and `feature/visual-automation/src/main/java/com/wanbaohe/visual/automation/ai/VisualAIClient.kt:230` 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 (27 lines × 2) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/MarkdownColors.kt:33— libs/markdown/src/upstream/java/com/hrm/markdown/renderer/MarkdownColors.kt:33-59 | libs/markdown/src/upstream/java/com/hrm/markdown/renderer/MarkdownColors.kt:61-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.
Duplicated block (24 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedRangeSliderItem.kt:189— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedRangeSliderItem.kt:189-212 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedSliderItem.kt:194-217 — before extracting anything, compare `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedRangeSliderItem.kt` and `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedSliderItem.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 136 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedRangeSliderItem.kt:189` 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 (24 lines × 2) feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:237— feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:237-260 | feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIPromptComponent.kt:269-292 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIPromptComponent.kt` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 360 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 `feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.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 (24 lines × 2) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:395— feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:395-418 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt:391-414 — before extracting anything, compare `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt` and `feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 239 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 `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:395` 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 (24 lines × 2) feature/decision-wheel/src/main/java/com/wanbaohe/decisionwheel/screen/DecisionWheelSettingsScreen.kt:168— feature/decision-wheel/src/main/java/com/wanbaohe/decisionwheel/screen/DecisionWheelSettingsScreen.kt:168-191 | feature/sudoku/src/main/java/com/wanbaohe/sudoku/screen/SudokuSettingsContent.kt:259-282 — 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 (24 lines × 2) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/screenLogic/FiltersComponent.kt:291— feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/screenLogic/FiltersComponent.kt:291-314 | feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/screenLogic/LimitsResizeComponent.kt:227-250 — 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 `feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/screenLogic/FiltersComponent.kt:291` 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 (24 lines × 2) feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeAddCountdownScreen.kt:111— feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeAddCountdownScreen.kt:111-134 | feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeAddMilestoneScreen.kt:106-129 — before extracting anything, compare `feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeAddCountdownScreen.kt` and `feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeAddMilestoneScreen.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 125 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 `feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeAddCountdownScreen.kt:111` 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 `initial` to `CountdownEvent?` in one and `PersonalMilestone?` 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 lines × 2) feature/login/src/main/java/com/shifenmiao/login/RegistrationBottomSheet.kt:107— feature/login/src/main/java/com/shifenmiao/login/RegistrationBottomSheet.kt:107-130 | feature/login/src/main/java/com/shifenmiao/login/RegistrationScreen.kt:94-117 — 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 `feature/login/src/main/java/com/shifenmiao/login/RegistrationBottomSheet.kt:107` 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) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupProjectStore.kt:229— feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupProjectStore.kt:229-252 | feature/text-card/src/main/java/com/wanbaohe/textcard/data/project/AndroidTextCardProjectStore.kt:190-213 — before extracting anything, compare `feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupProjectStore.kt` and `feature/text-card/src/main/java/com/wanbaohe/textcard/data/project/AndroidTextCardProjectStore.kt` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 256 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 `feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupProjectStore.kt:229` 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 (24 lines × 2) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlSubPipelineRegistry.kt:211— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlSubPipelineRegistry.kt:211-234 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlSubPipelineRegistry.kt:440-463 — 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 `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlSubPipelineRegistry.kt:211` 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) core/database/src/main/java/com/shifenmiao/database/agent/dao/ItemAgentDao.kt:81— core/database/src/main/java/com/shifenmiao/database/agent/dao/ItemAgentDao.kt:81-104 | core/database/src/main/java/com/shifenmiao/database/chat_prompt/dao/PromptDao.kt:137-160 — 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 (17 lines × 3) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheet.kt:479— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheet.kt:479-495 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/sheets/AddExifSheet.kt:181-197 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/sheets/ProcessImagesPreferenceSheet.kt:173-189 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheet.kt` and `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/sheets/AddExifSheet.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 120 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 `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheet.kt:479` 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: `Close` names `androidx.compose.material.icons.rounded.Close` in one and `com.t8rin.imagetoolbox.core.resources.icons.Close` 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 × 3) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:370— feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:370-386 | feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/GifToolsContent.kt:233-250 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt:368-384 — before extracting anything, compare `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt` and `feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 239 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 `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:370` 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 × 3) feature/app/src/main/java/com/wanbaohe/app/ui/VerifyContactSheet.kt:298— feature/app/src/main/java/com/wanbaohe/app/ui/VerifyContactSheet.kt:298-314 | feature/profile/src/main/java/com/wanbaohe/profile/screen/ChangePasswordSheet.kt:252-268 | feature/profile/src/main/java/com/wanbaohe/profile/screen/VerifyEmailSheet.kt:197-213 — before extracting anything, compare `feature/app/src/main/java/com/wanbaohe/app/ui/VerifyContactSheet.kt` and `feature/profile/src/main/java/com/wanbaohe/profile/screen/ChangePasswordSheet.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 75 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 `feature/app/src/main/java/com/wanbaohe/app/ui/VerifyContactSheet.kt:298` 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 × 3) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/OnlinePlayUseCase.kt:365— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/OnlinePlayUseCase.kt:365-381 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/OnlinePlayUseCase.kt:406-422 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/OnlinePlayUseCase.kt:287-303 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/OnlinePlayUseCase.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/OnlinePlayUseCase.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 67 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: `ConnectionState` names `com.wanbaohe.chess.domain.model.ConnectionState` in one and `com.wanbaohe.gomoku.domain.model.ConnectionState` 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 × 3) feature/chess/src/main/java/com/wanbaohe/chess/component/ChessAnalysisComponent.kt:144— feature/chess/src/main/java/com/wanbaohe/chess/component/ChessAnalysisComponent.kt:144-160 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuAnalysisComponent.kt:155-171 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiAnalysisComponent.kt:142-158 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/component/ChessAnalysisComponent.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuAnalysisComponent.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 77 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 `feature/chess/src/main/java/com/wanbaohe/chess/component/ChessAnalysisComponent.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 (17 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/screen/NewGameDropMenu.kt:174— feature/chess/src/main/java/com/wanbaohe/chess/screen/NewGameDropMenu.kt:174-190 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/NewGameDropMenu.kt:178-194 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/NewGameDropMenu.kt:175-191 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/screen/NewGameDropMenu.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/NewGameDropMenu.kt` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 109 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 `feature/chess/src/main/java/com/wanbaohe/chess/screen/NewGameDropMenu.kt:174` 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 × 3) feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt:698— feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt:698-714 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/OnlineMatchScreen.kt:698-714 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/OnlineMatchScreen.kt:698-714 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/OnlineMatchScreen.kt` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 428 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 `feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt:698` 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 (17 lines × 3) feature/crop/src/main/java/com/t8rin/imagetoolbox/feature/crop/presentation/CropContent.kt:135— feature/crop/src/main/java/com/t8rin/imagetoolbox/feature/crop/presentation/CropContent.kt:135-151 | feature/edit-exif/src/main/java/com/t8rin/imagetoolbox/feature/edit_exif/presentation/EditExifContent.kt:93-109 | feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/SingleEditContent.kt:106-122 — 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `component` to `CropComponent` in one and `EditExifComponent` 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 (17 lines × 3) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/components/TextEditDialog.kt:557— feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/components/TextEditDialog.kt:557-573 | feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/draw/BrushSettingsDialog.kt:236-252 | feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/tools/shape/ShapeToolSheet.kt:241-257 — 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 (17 lines × 3) libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1778— libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1778-1794 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:854-870 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:890-906 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 544 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 `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1778` 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) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RubberStampParamsItem.kt:138— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RubberStampParamsItem.kt:138-149 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SparkleParamsItem.kt:134-145 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/VoronoiCrystallizeParamsItem.kt:145-156 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RubberStampParamsItem.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SparkleParamsItem.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 47 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 `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RubberStampParamsItem.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.
Duplicated block (12 lines × 3) feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:805— feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:805-816 | feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt:766-777 | feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt:1139-1150 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 625 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 `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:805` 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) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ManageGameUseCase.kt:244— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ManageGameUseCase.kt:244-255 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/ManageGameUseCase.kt:204-215 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/ManageGameUseCase.kt:215-226 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ManageGameUseCase.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/ManageGameUseCase.kt` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 94 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: `GameResultResolver` names `com.wanbaohe.chess.domain.GameResultResolver` in one and `com.wanbaohe.gomoku.domain.GameResultResolver` 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 × 3) feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt:667— feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt:667-678 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/router/screenLogic/GomokuRouterComponent.kt:611-622 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/router/screenLogic/XiangqiRouterComponent.kt:633-644 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/router/screenLogic/GomokuRouterComponent.kt` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 136 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) feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt:709— feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt:709-720 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/router/screenLogic/GomokuRouterComponent.kt:662-673 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/router/screenLogic/XiangqiRouterComponent.kt:677-688 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/router/screenLogic/GomokuRouterComponent.kt` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 136 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: `GameQueryUseCase` names `com.wanbaohe.chess.application.usecase.GameQueryUseCase` in one and `com.wanbaohe.gomoku.application.usecase.GameQueryUseCase` 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 × 3) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessLibraryScreen.kt:117— feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessLibraryScreen.kt:117-128 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuLibraryScreen.kt:117-128 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiLibraryScreen.kt:133-144 — 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `component` to `ChessLibraryComponent` in one and `GomokuLibraryComponent` 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, `feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuLibraryScreen.kt:116` calls `toCardData` and `feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiLibraryScreen.kt:132` 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 × 3) feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rearrange/components/PdfPagesRearrangeGrid.kt:166— feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rearrange/components/PdfPagesRearrangeGrid.kt:166-177 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_pages/components/PdfPagesRemoveGrid.kt:184-195 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rotate/components/PdfPagesRotationGrid.kt:195-206 — before extracting anything, compare `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rearrange/components/PdfPagesRearrangeGrid.kt` and `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_pages/components/PdfPagesRemoveGrid.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 97 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 `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rearrange/components/PdfPagesRearrangeGrid.kt:166` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_pages/components/PdfPagesRemoveGrid.kt:181` calls `rememberLazyGridState` and `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rearrange/components/PdfPagesRearrangeGrid.kt:163` 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 (12 lines × 3) feature/settings/src/main/java/com/wanbaohe/setting/display/screen/DisplaySettingsScreen.kt:702— feature/settings/src/main/java/com/wanbaohe/setting/display/screen/DisplaySettingsScreen.kt:702-713 | feature/settings/src/main/java/com/wanbaohe/setting/display/screen/DisplaySettingsScreen.kt:782-793 | feature/settings/src/main/java/com/wanbaohe/setting/display/screen/DisplaySettingsScreen.kt:855-866 — 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/settings/src/main/java/com/wanbaohe/setting/display/screen/DisplaySettingsScreen.kt:702` 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) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/AiOrchestrationUseCase.kt:179— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/AiOrchestrationUseCase.kt:179-190 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/AiOrchestrationUseCase.kt:165-176 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/AiOrchestrationUseCase.kt:156-167 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/AiOrchestrationUseCase.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/AiOrchestrationUseCase.kt` as WHOLE FILES: this scan already matched 5 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. Note first that the copies are not typed on the same thing: `AiTaskEntity` names `com.wanbaohe.chess.application.port.outbound.AiTaskEntity` in one and `com.wanbaohe.gomoku.application.port.outbound.AiTaskEntity` 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 × 3) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/OnlinePlayUseCase.kt:398— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/OnlinePlayUseCase.kt:398-409 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/OnlinePlayUseCase.kt:439-450 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/OnlinePlayUseCase.kt:320-331 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/OnlinePlayUseCase.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/OnlinePlayUseCase.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 67 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. Note first that the copies are not typed on the same thing: `OnlineMessage` names `com.wanbaohe.chess.domain.model.OnlineMessage` in one and `com.wanbaohe.gomoku.domain.model.OnlineMessage` 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.
TodoComment libs/twain/src/main/java/io/noties/markwon/prism4j/languages/Prism_css.java:19— // todo: really important one.. — 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 libs/cropper/src/main/java/com/t8rin/cropper/state/CropStateImpl.kt:311— // TODO Add resetting back to bounds for rotated state as well — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment libs/cropper/src/main/java/com/t8rin/cropper/state/DynamicCropState.kt:308— // //TODO Change pan when zoom is bigger than 1f and touchRegion is inside overlay rect — 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 feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/screenLogic/LimitsResizeComponent.kt:254— //TODO: Remove unnecessary callbacks — 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 feature/dsh-client/src/main/java/com/wanbaohe/dsh/screen/node/ChatNodes.kt:614— // ───────────────────────────── todo / 检查点 / 统计行 ───────────────────────────── — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment feature/ai-image/src/main/java/com/shifenmiao/ai/image/controllers/AIImageComponent.kt:92— //TODO — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment feature/ai/src/main/java/com/shifenmiao/ai/request/LocalLlmRuntime.kt:117— // TODO(Phase 4): Phase 1 本地模型 supportToolCalls = false,tool 消息不会到达。 — 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 core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/modifier/AnimateContentSizeNoClip.kt:224— // TODO(b/322878517): Figure out a way to seamlessly continue the animation after — 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 core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/SafeUriHandler.kt:76— //todo open uri — 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· Edited copy of a member (39 corresponding lines) · ×9
Edited copy of a member (39 corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:311— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:311-349 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlDeploymentSubPipeline.kt:182-230 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (39 corresponding lines) core/base/src/main/java/com/shifenmiao/base/utils/FileUtils.kt:394— core/base/src/main/java/com/shifenmiao/base/utils/FileUtils.kt:394-432 | core/base/src/main/java/com/shifenmiao/base/utils/FileUtils.kt:434-472 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (39 corresponding lines) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:358— feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:358-396 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/screenLogic/WebpToolsComponent.kt:350-393 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (39 corresponding lines) feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/AwsSigV4Signer.kt:101— feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/AwsSigV4Signer.kt:101-139 | feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/BaiduBosSigner.kt:102-140 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (39 corresponding lines) feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuGameComponent.kt:597— feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuGameComponent.kt:597-635 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuGameComponent.kt:809-848 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (39 corresponding lines) feature/boardgame/src/main/java/com/wanbaohe/boardgame/ui/StatusCards.kt:118— feature/boardgame/src/main/java/com/wanbaohe/boardgame/ui/StatusCards.kt:118-156 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiGameScreen.kt:976-1014 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (39 corresponding lines) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/utils/FullscreenPopup.kt:62— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/utils/FullscreenPopup.kt:62-100 | libs/modalsheet/src/main/java/com/t8rin/modalsheet/FullscreenPopup.kt:80-122 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (39 corresponding lines) feature/sudoku/src/main/java/com/wanbaohe/sudoku/screen/SudokuCompleteContent.kt:243— feature/sudoku/src/main/java/com/wanbaohe/sudoku/screen/SudokuCompleteContent.kt:243-284 | feature/sudoku/src/main/java/com/wanbaohe/sudoku/screen/SudokuStatsContent.kt:222-260 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (39 corresponding lines) feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/presentation/screenLogic/CameraWatermarkComponent.kt:381— feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/presentation/screenLogic/CameraWatermarkComponent.kt:381-423 | feature/id-photo/src/main/java/com/wanbaohe/idphoto/presentation/screenLogic/IdPhotoComponent.kt:592-630 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (5 corresponding lines) · ×9
Edited copy of a member (5 corresponding lines) core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/UriUtils.kt:210— core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/UriUtils.kt:210-214 | core/utils/src/main/java/com/t8rin/imagetoolbox/core/utils/UriUtils.kt:256-260 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) feature/media-player/src/main/java/com/wanbaohe/media/playback/ExoInlineMediaPlaybackController.kt:143— feature/media-player/src/main/java/com/wanbaohe/media/playback/ExoInlineMediaPlaybackController.kt:143-148 | feature/media-player/src/main/java/com/wanbaohe/media/playback/ExoPlaybackEngine.kt:203-207 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlNetworkSubPipeline.kt:507— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlNetworkSubPipeline.kt:507-515 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlArchimateSubPipeline.kt:639-643 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/domain/MoveGenerator.kt:44— feature/chess/src/main/java/com/wanbaohe/chess/domain/MoveGenerator.kt:44-49 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/domain/MoveGenerator.kt:34-38 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) feature/common/src/main/java/com/shifenmiao/common/components/text/RichTextStyleSpan.kt:47— feature/common/src/main/java/com/shifenmiao/common/components/text/RichTextStyleSpan.kt:47-51 | feature/text-card/src/main/java/com/wanbaohe/textcard/domain/model/TextBlock.kt:111-117 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:602— feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:602-607 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiGameComponent.kt:527-531 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) feature/gomoku/src/main/java/com/wanbaohe/gomoku/domain/BoardSetupDraft.kt:102— feature/gomoku/src/main/java/com/wanbaohe/gomoku/domain/BoardSetupDraft.kt:102-106 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/domain/BoardSetupDraft.kt:99-103 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:1057— feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:1057-1061 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiGameComponent.kt:987-994 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) feature/gomoku/src/main/java/com/wanbaohe/gomoku/domain/FenCodec.kt:51— feature/gomoku/src/main/java/com/wanbaohe/gomoku/domain/FenCodec.kt:51-55 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/domain/FenCodec.kt:47-51 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (7 lines × 2 locations) web/code-editor/editor.src.js:268— web/code-editor/editor.src.js:268 · web/milkdown-editor/editor.src.js:916 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (7 lines × 2 locations) web/file_viewer/src/docx.js:137— web/file_viewer/src/docx.js:137 · web/file_viewer/src/prose-draw.js:123 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
Duplicated block (7 lines × 2 locations) REDACTED:87— REDACTED:87 · REDACTED:162 — 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 locations) web/file_viewer/src/prose-doc.js:1135— web/file_viewer/src/prose-doc.js:1135 · web/file_viewer/src/prose-doc.js:1187 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (7 lines × 2 locations) web/file_viewer/src/prose-doc.js:1454— web/file_viewer/src/prose-doc.js:1454 · web/file_viewer/src/prose-odt.js:582 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
Duplicated block (7 lines × 2 locations) web/file_viewer/src/prose-doc.js:1898— web/file_viewer/src/prose-doc.js:1898 · web/file_viewer/src/prose-odt.js:918 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (7 lines × 2 locations) web/file_viewer/src/prose-odt.js:252— web/file_viewer/src/prose-odt.js:252 · web/file_viewer/src/prose-odt.js:270 — 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 locations) web/file_viewer/src/prose-odt.js:587— web/file_viewer/src/prose-odt.js:587 · web/file_viewer/src/prose-rtf.js:330 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
Duplicated block (7 lines × 2 locations) web/milkdown-editor/editor.src.js:475— web/milkdown-editor/editor.src.js:475 · web/milkdown-editor/editor.src.js:487 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
X2 · Cancellation propagation· Async function without AbortSignal · ×9
Async function without AbortSignal: listFiles web/file_transfer/js/core/api.js:17— `listFiles` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: auth web/file_transfer/js/core/api.js:25— `auth` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: deviceInfo web/file_transfer/js/core/api.js:36— `deviceInfo` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: mkdir web/file_transfer/js/core/api.js:44— `mkdir` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: rename web/file_transfer/js/core/api.js:55— `rename` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: deletePaths web/file_transfer/js/core/api.js:66— `deletePaths` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: downloadProbe web/file_transfer/js/core/api.js:77— `downloadProbe` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: chatHistory web/file_transfer/js/core/api.js:138— `chatHistory` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Async function without AbortSignal: load web/file_transfer/js/core/i18n.js:69— `load` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
X2 · Cancellation propagation· Suspend function with a blocking request · ×9
Suspend function with a blocking request: downloadZip feature/on-device-ocr/src/main/java/com/wanbaohe/ocr/data/OcrModelStore.kt:77— `downloadZip` suspends, but makes its request with `URL(…).openConnection()`, 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: load core/network/src/main/java/com/shifenmiao/network/service/CloudflareNetworkInfoService.kt:55— `load` 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: request core/network/src/main/java/com/shifenmiao/network/service/HttpRequestService.kt:87— `request` 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: check core/network/src/main/java/com/shifenmiao/network/service/UrlCheckService.kt:71— `check` 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: downloadHtml core/network/src/main/java/com/shifenmiao/network/downloader/OkHttpHtmlDownloader.kt:42— `downloadHtml` 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: handle core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/action/handlers/BuiltinHandlers.kt:177— `handle` 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: downloadResources core/data/src/main/java/com/t8rin/imagetoolbox/core/data/remote/AndroidRemoteResourcesStore.kt:82— `downloadResources` suspends, but makes its request with `URL(…).openConnection()`, 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: getResourceLinks core/data/src/main/java/com/t8rin/imagetoolbox/core/data/remote/AndroidRemoteResourcesStore.kt:242— `getResourceLinks` suspends, but makes its request with `URL(…).openConnection()`, 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: getCachedFile core/base/src/main/java/com/shifenmiao/base/audio/NetworkAudioPlayer.kt:300— `getCachedFile` suspends, but makes its request with `URL(…).openStream()`, 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`.
D4 · Code Duplication· Edited copy of a member (32 corresponding lines) · ×8
Edited copy of a member (32 corresponding lines) libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1053— libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1053-1085 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:727-760 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (32 corresponding lines) feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/screen/BookkeepingScreen.kt:118— feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/screen/BookkeepingScreen.kt:118-149 | feature/household-items/src/main/java/com/wanbaohe/householditems/screen/HouseholdItemsScreen.kt:190-221 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (32 corresponding lines) feature/marktodo/src/main/java/com/shifenmiao/marktodo/service/MarkTodoServiceImpl.kt:208— feature/marktodo/src/main/java/com/shifenmiao/marktodo/service/MarkTodoServiceImpl.kt:208-241 | feature/marktodo/src/main/java/com/shifenmiao/marktodo/service/MarkTodoServiceImpl.kt:247-278 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (32 corresponding lines) feature/common/src/main/java/com/shifenmiao/common/components/DatabaseBackupRestoreSection.kt:51— feature/common/src/main/java/com/shifenmiao/common/components/DatabaseBackupRestoreSection.kt:51-82 | feature/pick-color/src/main/java/com/t8rin/imagetoolbox/feature/pick_color/presentation/components/PickColorColorCard.kt:210-247 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (32 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/AgentToolRegistry.kt:381— feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/AgentToolRegistry.kt:381-412 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/AgentToolRegistry.kt:424-463 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (32 corresponding lines) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/editor/ToolRail.kt:139— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/editor/ToolRail.kt:139-174 | feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/editor/EditorScaffold.kt:1931-1962 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (32 corresponding lines) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/LockScreen.kt:453— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/LockScreen.kt:453-484 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/LockScreen.kt:820-852 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (32 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/cloud/ManageCloudConnectionsTool.kt:181— feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/cloud/ManageCloudConnectionsTool.kt:181-212 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/cloud/ManageCloudConnectionsTool.kt:214-246 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (34 corresponding lines) · ×8
Edited copy of a member (34 corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlC4SubPipeline.kt:304— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlC4SubPipeline.kt:304-337 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlNetworkSubPipeline.kt:282-327 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (34 corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidErSubPipeline.kt:98— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidErSubPipeline.kt:98-138 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlErdSubPipeline.kt:85-118 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (34 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/GlobFilesTool.kt:80— feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/GlobFilesTool.kt:80-113 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/GrepFilesTool.kt:84-118 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (34 corresponding lines) feature/loan-calculator/src/main/java/com/wanbaohe/loancalculator/domain/LoanCalculator.kt:162— feature/loan-calculator/src/main/java/com/wanbaohe/loancalculator/domain/LoanCalculator.kt:162-210 | feature/loan-calculator/src/main/java/com/wanbaohe/loancalculator/domain/LoanCalculator.kt:217-250 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (34 corresponding lines) feature/file-browser/src/main/java/com/wanbaohe/file/browser/ui/RecentAccessGridItem.kt:62— feature/file-browser/src/main/java/com/wanbaohe/file/browser/ui/RecentAccessGridItem.kt:62-95 | feature/file-browser/src/main/java/com/wanbaohe/file/browser/ui/RecentAccessListItem.kt:66-111 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (34 corresponding lines) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedCircularProgressIndicator.kt:50— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedCircularProgressIndicator.kt:50-83 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedCircularProgressIndicator.kt:95-130 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (34 corresponding lines) core/ui/src/main/java/com/wanbaohe/base/ui/button/ExtendedFloatingActionButton.kt:60— core/ui/src/main/java/com/wanbaohe/base/ui/button/ExtendedFloatingActionButton.kt:60-93 | core/ui/src/main/java/com/wanbaohe/base/ui/button/ExtendedFloatingActionButton.kt:107-140 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (34 corresponding lines) feature/collage-maker/src/main/java/com/t8rin/imagetoolbox/collage_maker/presentation/screenLogic/CollageMakerComponent.kt:200— feature/collage-maker/src/main/java/com/t8rin/imagetoolbox/collage_maker/presentation/screenLogic/CollageMakerComponent.kt:200-233 | feature/noise-generation/src/main/java/com/t8rin/imagetoolbox/noise_generation/presentation/screenLogic/NoiseGenerationComponent.kt:99-136 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (33 corresponding lines) · ×8
Edited copy of a member (33 corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidPacketSubPipeline.kt:51— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidPacketSubPipeline.kt:51-83 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlStructSubPipeline.kt:54-88 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (33 corresponding lines) core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:470— core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:470-502 | core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:524-571 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (33 corresponding lines) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/AuthorizationCodeScreen.kt:141— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/AuthorizationCodeScreen.kt:141-173 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/AuthorizationCodeScreen.kt:185-218 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (33 corresponding lines) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupProjectStore.kt:448— feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupProjectStore.kt:448-480 | feature/text-card/src/main/java/com/wanbaohe/textcard/data/project/AndroidTextCardProjectStore.kt:383-419 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (33 corresponding lines) feature/calendar/src/main/java/com/wanbaohe/calendar/data/LunarJavaBridge.kt:181— feature/calendar/src/main/java/com/wanbaohe/calendar/data/LunarJavaBridge.kt:181-220 | feature/calendar/src/main/java/com/wanbaohe/calendar/data/LunarJavaBridge.kt:225-257 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (33 corresponding lines) libs/cropper/src/main/java/com/t8rin/cropper/state/CropStateImpl.kt:383— libs/cropper/src/main/java/com/t8rin/cropper/state/CropStateImpl.kt:383-415 | libs/cropper/src/main/java/com/t8rin/cropper/state/DynamicCropState.kt:351-383 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (33 corresponding lines) feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/presentation/components/StyleSelector.kt:82— feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/presentation/components/StyleSelector.kt:82-114 | feature/id-photo/src/main/java/com/wanbaohe/idphoto/presentation/components/SizeSelector.kt:73-108 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (33 corresponding lines) feature/boardgame/src/main/java/com/wanbaohe/boardgame/ui/StatusCards.kt:77— feature/boardgame/src/main/java/com/wanbaohe/boardgame/ui/StatusCards.kt:77-109 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiGameScreen.kt:935-967 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (29 corresponding lines) · ×8
Edited copy of a member (29 corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidErSubPipeline.kt:399— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidErSubPipeline.kt:399-458 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlErdSubPipeline.kt:557-585 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (29 corresponding lines) core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/blessing/BlessingEffectHost.kt:369— core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/blessing/BlessingEffectHost.kt:369-399 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/blessing/BlessingEffectHost.kt:402-430 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (29 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/service/AgentFileServiceImpl.kt:763— feature/ai/src/main/java/com/shifenmiao/ai/service/AgentFileServiceImpl.kt:763-791 | feature/ai/src/main/java/com/shifenmiao/ai/service/AgentFileServiceImpl.kt:793-824 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (29 corresponding lines) feature/decision-wheel/src/main/java/com/wanbaohe/decisionwheel/screen/DecisionWheelRouterScreen.kt:123— feature/decision-wheel/src/main/java/com/wanbaohe/decisionwheel/screen/DecisionWheelRouterScreen.kt:123-151 | feature/sudoku/src/main/java/com/wanbaohe/sudoku/screen/SudokuScreen.kt:109-137 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (29 corresponding lines) feature/household-items/src/main/java/com/wanbaohe/householditems/search/HouseholdSearchProvider.kt:38— feature/household-items/src/main/java/com/wanbaohe/householditems/search/HouseholdSearchProvider.kt:38-66 | feature/marktodo/src/main/java/com/shifenmiao/marktodo/search/MarkTodoSearchProvider.kt:38-68 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (29 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/service/AgentCreationService.kt:421— feature/ai/src/main/java/com/shifenmiao/ai/service/AgentCreationService.kt:421-450 | feature/ai/src/main/java/com/shifenmiao/ai/service/PromptCreationService.kt:357-385 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (29 corresponding lines) feature/device-status/src/main/java/com/wanbaohe/devicestatus/screen/DeviceStatusScreen.kt:223— feature/device-status/src/main/java/com/wanbaohe/devicestatus/screen/DeviceStatusScreen.kt:223-251 | feature/device-status/src/main/java/com/wanbaohe/devicestatus/screen/DeviceStatusScreen.kt:254-282 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (29 corresponding lines) feature/checksum-tools/src/main/java/com/t8rin/imagetoolbox/feature/checksum_tools/presentation/components/ChecksumEnterField.kt:50— feature/checksum-tools/src/main/java/com/t8rin/imagetoolbox/feature/checksum_tools/presentation/components/ChecksumEnterField.kt:50-78 | feature/checksum-tools/src/main/java/com/t8rin/imagetoolbox/feature/checksum_tools/presentation/components/ChecksumPreviewField.kt:50-81 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 7+ corresponding lines) · ×8
Edited copies of one member (3 members, 7+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/GameQueryUseCase.kt:51— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/GameQueryUseCase.kt:51-57 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/GameQueryUseCase.kt:51-57 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/GameQueryUseCase.kt:46-52 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 7+ corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidClassSubPipeline.kt:407— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidClassSubPipeline.kt:407-413 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidSequenceSubPipeline.kt:195-201 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidSequenceSubPipeline.kt:203-209 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 7+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:971— feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:971-977 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuGameComponent.kt:1093-1099 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiGameComponent.kt:900-906 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 7+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/domain/model/GameSetup.kt:48— feature/chess/src/main/java/com/wanbaohe/chess/domain/model/GameSetup.kt:48-54 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/domain/model/GameSetup.kt:48-54 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/domain/model/GameSetup.kt:47-53 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 7+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/domain/model/GameSetup.kt:65— feature/chess/src/main/java/com/wanbaohe/chess/domain/model/GameSetup.kt:65-71 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/domain/model/GameSetup.kt:65-71 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/domain/model/GameSetup.kt:63-69 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 7+ corresponding lines) feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuAnalysisComponent.kt:321— feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuAnalysisComponent.kt:321-327 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuGameComponent.kt:779-785 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiGameComponent.kt:610-619 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 7+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/application/dto/GamePreparation.kt:62— feature/chess/src/main/java/com/wanbaohe/chess/application/dto/GamePreparation.kt:62-68 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/dto/GamePreparation.kt:63-73 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/dto/GamePreparation.kt:52-62 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 7+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ImportGameUseCase.kt:360— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ImportGameUseCase.kt:360-366 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/ImportGameUseCase.kt:314-321 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/ImportGameUseCase.kt:194-200 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Duplicated block (23 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/color_picker/RecentAndFavoriteColorsCard.kt:170— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/color_picker/RecentAndFavoriteColorsCard.kt:170-192 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/color_picker/RecentAndFavoriteColorsCard.kt:279-301 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/color_picker/RecentAndFavoriteColorsCard.kt:170` 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 (23 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/image/ImagePager.kt:196— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/image/ImagePager.kt:196-218 | feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaImagePager.kt:194-216 — before extracting anything, compare `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/image/ImagePager.kt` and `feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaImagePager.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 208 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/image/ImagePager.kt:196` 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, `feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaImagePager.kt:217` calls `getOrNull` and `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/image/ImagePager.kt:219` 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 (23 lines × 2) feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:384— feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:384-406 | feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIPromptComponent.kt:421-443 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIPromptComponent.kt` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 360 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 `feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:384` 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 (23 lines × 2) feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:622— feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:622-644 | feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIPromptComponent.kt:650-672 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIPromptComponent.kt` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 360 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 `feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:622` 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 (23 lines × 2) feature/ocr-document/src/main/java/com/shifenmiao/feature/document/component/DocConvertTaskListComponent.kt:431— feature/ocr-document/src/main/java/com/shifenmiao/feature/document/component/DocConvertTaskListComponent.kt:431-453 | feature/ocr-document/src/main/java/com/shifenmiao/feature/document/component/OcrTaskListComponent.kt:258-280 — before extracting anything, compare `feature/ocr-document/src/main/java/com/shifenmiao/feature/document/component/DocConvertTaskListComponent.kt` and `feature/ocr-document/src/main/java/com/shifenmiao/feature/document/component/OcrTaskListComponent.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 71 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 (23 lines × 2) feature/online/src/main/java/com/shifenmiao/online/component/CreateHtmlComponent.kt:177— feature/online/src/main/java/com/shifenmiao/online/component/CreateHtmlComponent.kt:177-199 | feature/online/src/main/java/com/shifenmiao/online/component/EditPromptComponent.kt:209-231 — before extracting anything, compare `feature/online/src/main/java/com/shifenmiao/online/component/CreateHtmlComponent.kt` and `feature/online/src/main/java/com/shifenmiao/online/component/EditPromptComponent.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 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 `feature/online/src/main/java/com/shifenmiao/online/component/CreateHtmlComponent.kt:177` 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 (23 lines × 2) feature/settings/src/main/java/com/wanbaohe/setting/theme/screen/ThemeSettingsScreen.kt:954— feature/settings/src/main/java/com/wanbaohe/setting/theme/screen/ThemeSettingsScreen.kt:954-976 | feature/settings/src/main/java/com/wanbaohe/setting/theme/screen/ThemeSettingsScreen.kt:1504-1526 — 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/settings/src/main/java/com/wanbaohe/setting/theme/screen/ThemeSettingsScreen.kt:954` 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 (23 lines × 2) libs/gesture/src/main/java/com/t8rin/gesture/AwaitPointerMotionEvent.kt:101— libs/gesture/src/main/java/com/t8rin/gesture/AwaitPointerMotionEvent.kt:101-123 | libs/gesture/src/main/java/com/t8rin/gesture/AwaitPointerMotionEvent.kt:205-227 — 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 `libs/gesture/src/main/java/com/t8rin/gesture/AwaitPointerMotionEvent.kt:101` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `libs/gesture/src/main/java/com/t8rin/gesture/AwaitPointerMotionEvent.kt:100` calls `onDown` and `libs/gesture/src/main/java/com/t8rin/gesture/AwaitPointerMotionEvent.kt:204` 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 (15 lines × 3) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RubberStampParamsItem.kt:113— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RubberStampParamsItem.kt:113-127 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SparkleParamsItem.kt:122-136 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/VoronoiCrystallizeParamsItem.kt:133-147 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RubberStampParamsItem.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SparkleParamsItem.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 47 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 `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RubberStampParamsItem.kt:113` 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 × 3) feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageChessTool.kt:122— feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageChessTool.kt:122-136 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageGomokuTool.kt:122-136 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageXiangqiTool.kt:122-136 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageChessTool.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageGomokuTool.kt` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 137 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 `feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageChessTool.kt:122` 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) feature/chess/src/main/java/com/wanbaohe/chess/data/PlyDaoAdapter.kt:76— feature/chess/src/main/java/com/wanbaohe/chess/data/PlyDaoAdapter.kt:76-90 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/PlyDaoAdapter.kt:76-90 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/PlyDaoAdapter.kt:76-90 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/data/PlyDaoAdapter.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/PlyDaoAdapter.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 `feature/chess/src/main/java/com/wanbaohe/chess/data/PlyDaoAdapter.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 (15 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/data/online/SignalingClientImpl.kt:186— feature/chess/src/main/java/com/wanbaohe/chess/data/online/SignalingClientImpl.kt:186-200 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/online/SignalingClientImpl.kt:186-200 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/online/SignalingClientImpl.kt:186-200 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/data/online/SignalingClientImpl.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/online/SignalingClientImpl.kt` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 129 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 `feature/chess/src/main/java/com/wanbaohe/chess/data/online/SignalingClientImpl.kt:186` 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 × 3) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt:312— feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt:312-326 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuAnalysisScreen.kt:319-333 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiAnalysisScreen.kt:312-326 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuAnalysisScreen.kt` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 187 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 `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt:312` 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 × 3) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessPlayHomeScreen.kt:154— feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessPlayHomeScreen.kt:154-168 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuPlayHomeScreen.kt:152-166 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiPlayHomeScreen.kt:168-182 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessPlayHomeScreen.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuPlayHomeScreen.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessPlayHomeScreen.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 (15 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/screen/NewGameDropMenu.kt:224— feature/chess/src/main/java/com/wanbaohe/chess/screen/NewGameDropMenu.kt:224-238 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/NewGameDropMenu.kt:226-240 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/NewGameDropMenu.kt:223-237 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/screen/NewGameDropMenu.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/NewGameDropMenu.kt` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 109 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 `feature/chess/src/main/java/com/wanbaohe/chess/screen/NewGameDropMenu.kt:224` 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 × 3) feature/text-card/src/main/java/com/wanbaohe/textcard/presentation/editor/TextCardEditorScreen.kt:522— feature/text-card/src/main/java/com/wanbaohe/textcard/presentation/editor/TextCardEditorScreen.kt:522-536 | feature/text-card/src/main/java/com/wanbaohe/textcard/presentation/editor/TextCardEditorScreen.kt:569-583 | feature/text-card/src/main/java/com/wanbaohe/textcard/presentation/editor/TextCardEditorScreen.kt:633-647 — 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/text-card/src/main/java/com/wanbaohe/textcard/presentation/editor/TextCardEditorScreen.kt:522` 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–15 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/selection/ImageFormatSelector.kt:178— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/selection/ImageFormatSelector.kt:178-192 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/selection/ImageFormatSelector.kt:281-294 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/selection/ImageFormatSelector.kt:178` 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 (14–15 lines × 2) feature/ai-image/src/main/java/com/shifenmiao/ai/image/controllers/AIImageComponent.kt:117— feature/ai-image/src/main/java/com/shifenmiao/ai/image/controllers/AIImageComponent.kt:117-130 | feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/presentation/screenLogic/GradientMakerComponent.kt:492-506 — 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 `feature/ai-image/src/main/java/com/shifenmiao/ai/image/controllers/AIImageComponent.kt:117` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14–15 lines × 2) feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:707— feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:707-720 | feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIPromptComponent.kt:735-749 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIPromptComponent.kt` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 360 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 `feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:707` 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–15 lines × 2) feature/ai/src/main/java/com/shifenmiao/ai/screen/AIDuelChatScreen.kt:376— feature/ai/src/main/java/com/shifenmiao/ai/screen/AIDuelChatScreen.kt:376-390 | feature/ai/src/main/java/com/shifenmiao/ai/screen/AIDuelChatScreen.kt:510-523 — 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/ai/src/main/java/com/shifenmiao/ai/screen/AIDuelChatScreen.kt:376` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14–15 lines × 2) feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:676— feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:676-690 | feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt:645-658 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 625 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 `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:676` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14–15 lines × 2) feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/screen/components/CloudFileGrid.kt:284— feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/screen/components/CloudFileGrid.kt:284-297 | feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/screen/components/CloudFileGrid.kt:311-325 — 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–15 lines × 2) libs/dynamic-theme/src/main/java/com/t8rin/dynamic/theme/DynamicTheme.kt:227— libs/dynamic-theme/src/main/java/com/t8rin/dynamic/theme/DynamicTheme.kt:227-240 | libs/dynamic-theme/src/main/java/com/t8rin/dynamic/theme/DynamicTheme.kt:687-701 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `libs/dynamic-theme/src/main/java/com/t8rin/dynamic/theme/DynamicTheme.kt:685` calls `fromInt`, `toArgb` and `libs/dynamic-theme/src/main/java/com/t8rin/dynamic/theme/DynamicTheme.kt:225` 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 (14–15 lines × 2) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/inline/InlineModelAdapter.kt:226— libs/markdown/src/upstream/java/com/hrm/markdown/renderer/inline/InlineModelAdapter.kt:226-240 | libs/markdown/src/upstream/java/com/hrm/markdown/renderer/inline/InlineModelAdapter.kt:248-261 — 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 `libs/markdown/src/upstream/java/com/hrm/markdown/renderer/inline/InlineModelAdapter.kt:226` 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–13 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/editor/EditorLayerBox.kt:278— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/editor/EditorLayerBox.kt:278-290 | feature/text-card/src/main/java/com/wanbaohe/textcard/presentation/editor/TextBlockTransformHandles.kt:130-141 — before extracting anything, compare `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/editor/EditorLayerBox.kt` and `feature/text-card/src/main/java/com/wanbaohe/textcard/presentation/editor/TextBlockTransformHandles.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 74 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/editor/EditorLayerBox.kt:278` 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–13 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedModalBottomSheet.kt:146— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedModalBottomSheet.kt:146-157 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedModalBottomSheet.kt:229-241 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedModalBottomSheet.kt:146` 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 (12–13 lines × 2) feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/presentation/components/StyleSelector.kt:218— feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/presentation/components/StyleSelector.kt:218-229 | feature/id-photo/src/main/java/com/wanbaohe/idphoto/presentation/components/SizeSelector.kt:201-213 — 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 `feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/presentation/components/StyleSelector.kt:218` 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: `Edit` names `androidx.compose.material.icons.filled.Edit` in one and `com.t8rin.imagetoolbox.core.resources.icons.Edit` 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) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/data/AndroidImageDrawApplier.kt:281— feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/data/AndroidImageDrawApplier.kt:281-292 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/UiPathPaintCanvasAction.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 `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/data/AndroidImageDrawApplier.kt:281` 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–13 lines × 2) feature/dsh-client/src/main/java/com/wanbaohe/dsh/screen/node/ChatNodes.kt:301— feature/dsh-client/src/main/java/com/wanbaohe/dsh/screen/node/ChatNodes.kt:301-312 | feature/dsh-client/src/main/java/com/wanbaohe/dsh/screen/node/ChatNodes.kt:811-823 — 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/dsh-client/src/main/java/com/wanbaohe/dsh/screen/node/ChatNodes.kt:811` 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–13 lines × 2) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/editor/EditorScaffold.kt:1301— feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/editor/EditorScaffold.kt:1301-1313 | feature/watermarking/src/main/java/com/shifenmiao/app/watermarking/presentation/canvas/WatermarkCanvas.kt:189-200 — 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 `feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/editor/EditorScaffold.kt:1301` 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 (12–13 lines × 2) feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiSettingsScreen.kt:544— feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiSettingsScreen.kt:544-555 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiSettingsScreen.kt:659-671 — 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/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiSettingsScreen.kt:544` 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) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/internal/compose/DefaultMarkdownComposePainter.kt:359— libs/markdown/src/upstream/java/com/hrm/markdown/renderer/internal/compose/DefaultMarkdownComposePainter.kt:359-371 | libs/markdown/src/upstream/java/com/hrm/markdown/renderer/internal/compose/DefaultMarkdownComposePainter.kt:381-392 — 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 `libs/markdown/src/upstream/java/com/hrm/markdown/renderer/internal/compose/DefaultMarkdownComposePainter.kt:359` 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–11 lines × 2) core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/AndroidFileController.kt:442— core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/AndroidFileController.kt:442-452 | core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/AndroidFileController.kt:460-469 — 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 `core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/AndroidFileController.kt:442` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10–11 lines × 2) feature/ai/src/main/java/com/shifenmiao/ai/service/AgentCreationService.kt:221— feature/ai/src/main/java/com/shifenmiao/ai/service/AgentCreationService.kt:221-230 | feature/ai/src/main/java/com/shifenmiao/ai/service/PromptCreationService.kt:215-225 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/service/AgentCreationService.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/service/PromptCreationService.kt` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 107 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 `feature/ai/src/main/java/com/shifenmiao/ai/service/AgentCreationService.kt:221` 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 (10–11 lines × 2) feature/altitude/src/main/java/com/wanbaohe/altitude/ui/AltitudeTrendChart.kt:113— feature/altitude/src/main/java/com/wanbaohe/altitude/ui/AltitudeTrendChart.kt:113-123 | feature/habit-tracker/src/main/java/com/wanbaohe/habittracker/screen/tab/StatsTab.kt:348-357 — before extracting anything, compare `feature/altitude/src/main/java/com/wanbaohe/altitude/ui/AltitudeTrendChart.kt` and `feature/habit-tracker/src/main/java/com/wanbaohe/habittracker/screen/tab/StatsTab.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 40 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 `feature/altitude/src/main/java/com/wanbaohe/altitude/ui/AltitudeTrendChart.kt:113` 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 (10–11 lines × 2) feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/AiOrchestrationUseCase.kt:115— feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/AiOrchestrationUseCase.kt:115-124 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/AiOrchestrationUseCase.kt:110-120 — before extracting anything, compare `feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/AiOrchestrationUseCase.kt` and `feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/AiOrchestrationUseCase.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 57 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 `feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/AiOrchestrationUseCase.kt:115` 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: `GameArbiter` names `com.wanbaohe.gomoku.domain.GameArbiter` in one and `com.wanbaohe.xiangqi.domain.GameArbiter` 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 (10–11 lines × 2) feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuSetupScreen.kt:92— feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuSetupScreen.kt:92-101 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiSetupScreen.kt:99-109 — before extracting anything, compare `feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuSetupScreen.kt` and `feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiSetupScreen.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 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 `feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuSetupScreen.kt:92` 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–11 lines × 2) feature/ocr-document/src/main/java/com/shifenmiao/feature/document/component/DocConvertTaskListComponent.kt:246— feature/ocr-document/src/main/java/com/shifenmiao/feature/document/component/DocConvertTaskListComponent.kt:246-256 | feature/ocr-document/src/main/java/com/shifenmiao/feature/document/component/DocConvertTaskListComponent.kt:260-269 — 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/ocr-document/src/main/java/com/shifenmiao/feature/document/component/DocConvertTaskListComponent.kt:246` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10–11 lines × 2) feature/text-card/src/main/java/com/wanbaohe/textcard/data/render/AndroidTextCardExportRenderer.kt:172— feature/text-card/src/main/java/com/wanbaohe/textcard/data/render/AndroidTextCardExportRenderer.kt:172-182 | feature/text-card/src/main/java/com/wanbaohe/textcard/data/render/AndroidTextCardExportRenderer.kt:222-231 — 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/text-card/src/main/java/com/wanbaohe/textcard/data/render/AndroidTextCardExportRenderer.kt:172` 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 (10–11 lines × 2) libs/diagram/src/upstream/java/com/hrm/diagram/render/cache/DrawEntityKey.kt:35— libs/diagram/src/upstream/java/com/hrm/diagram/render/cache/DrawEntityKey.kt:35-45 | libs/diagram/src/upstream/java/com/hrm/diagram/render/family/EntityKeySegments.kt:9-18 — 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 `libs/diagram/src/upstream/java/com/hrm/diagram/render/family/EntityKeySegments.kt:9` 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.
Swallowed exception (caught, then discarded) web/file_viewer/src/docx-night.js:88— `catch (e)` 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, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included.
Swallowed exception (caught, then discarded) REDACTED:1827— `catch (e)` 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, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included.
Swallowed exception (caught, then discarded) REDACTED:1980— `catch (e)` 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, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included.
Swallowed exception (caught, then discarded) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/inline/InlineRenderUtils.kt:93— `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) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/inline/InlineRenderUtils.kt:100— `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) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/inline/InlineRenderUtils.kt:109— `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) feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/HeuristicMoveFallback.kt:48— `catch (_: 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) feature/webview/src/main/java/com/shifenmiao/webview/utils/Utils.kt:51— `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.
D4 · Code Duplication· Members sharing a duplicated core (5 members, 50+ identical tokens) · ×7
Members sharing a duplicated core (5 members, 50+ identical tokens) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionCubeLutBottomContent.kt:122— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionCubeLutBottomContent.kt:122-410 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheet.kt:141-542 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/sheets/AddExifSheet.kt:102-306 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/sheets/ProcessImagesPreferenceSheet.kt:105-299 | feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaPickerGridWithOverlays.kt:115-448 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) feature/ai-detect/src/main/java/com/wanbaohe/aidetect/screen/AiDetectScreen.kt:109— feature/ai-detect/src/main/java/com/wanbaohe/aidetect/screen/AiDetectScreen.kt:109-175 | feature/calendar/src/main/java/com/wanbaohe/calendar/router/CalendarRouterScreen.kt:62-144 | feature/password-vault/src/main/java/com/wanbaohe/passwordvault/router/PasswordVaultRouterScreen.kt:41-75 | feature/settings/src/main/java/com/wanbaohe/setting/ai/screen/AIPersonalizationScreen.kt:77-150 | feature/settings/src/main/java/com/wanbaohe/setting/ai/screen/AIServiceHubScreen.kt:90-214 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/AliyunOssAdapter.kt:116— feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/AliyunOssAdapter.kt:116-128 | feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/AwsS3Adapter.kt:116-130 | feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/BaiduBosAdapter.kt:119-134 | feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/HuaweiObsAdapter.kt:114-126 | feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/TencentCosAdapter.kt:113-125 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) feature/lifetime/src/main/java/com/shifenmiao/lifetime/domain/MilestoneInsightService.kt:50— feature/lifetime/src/main/java/com/shifenmiao/lifetime/domain/MilestoneInsightService.kt:50-69 | feature/poem/src/main/java/com/wanbaohe/poem/service/PoemInsightService.kt:55-77 | feature/poem/src/main/java/com/wanbaohe/poem/service/PoemInsightService.kt:84-104 | feature/poem/src/main/java/com/wanbaohe/poem/service/PoemInsightService.kt:107-127 | feature/record-center/src/main/java/com/wanbaohe/recordcenter/service/HealthInsightService.kt:63-81 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) libs/diagram/src/upstream/java/com/hrm/diagram/render/export/FamilyOneShotRenderers.kt:554— libs/diagram/src/upstream/java/com/hrm/diagram/render/export/FamilyOneShotRenderers.kt:554-565 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidClassSubPipeline.kt:444-453 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidSequenceSubPipeline.kt:222-231 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlClassSubPipeline.kt:376-387 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlSequenceSubPipeline.kt:399-411 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidGaugeSubPipeline.kt:57— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidGaugeSubPipeline.kt:57-146 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidKanbanSubPipeline.kt:62-166 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidPieSubPipeline.kt:59-133 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidTimelineSubPipeline.kt:73-202 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlPieSubPipeline.kt:55-138 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:515— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:515-541 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlDeploymentSubPipeline.kt:405-433 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlErdSubPipeline.kt:377-409 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlObjectSubPipeline.kt:443-468 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlUsecaseSubPipeline.kt:616-641 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication· Edited copy of a member (28 corresponding lines) · ×7
Edited copy of a member (28 corresponding lines) feature/code-editor/src/main/java/com/wanbaohe/code/editor/webview/CodeEditorPreloadConfig.kt:47— feature/code-editor/src/main/java/com/wanbaohe/code/editor/webview/CodeEditorPreloadConfig.kt:47-74 | feature/markdown-edit/src/main/java/com/wanbaohe/markdown/edit/webview/MarkdownPreloadConfig.kt:58-86 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (28 corresponding lines) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupProjectStore.kt:223— feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupProjectStore.kt:223-252 | feature/text-card/src/main/java/com/wanbaohe/textcard/data/project/AndroidTextCardProjectStore.kt:186-213 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (28 corresponding lines) core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/LayoutComponents.kt:161— core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/LayoutComponents.kt:161-190 | core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/LayoutComponents.kt:195-222 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (28 corresponding lines) feature/file-browser/src/main/java/com/wanbaohe/file/browser/utils/FileHelper.kt:351— feature/file-browser/src/main/java/com/wanbaohe/file/browser/utils/FileHelper.kt:351-378 | feature/file-browser/src/main/java/com/wanbaohe/file/browser/utils/FileHelper.kt:383-414 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (28 corresponding lines) feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/screenLogic/ImageStitchingComponent.kt:205— feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/screenLogic/ImageStitchingComponent.kt:205-232 | feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/screenLogic/ImageStitchingComponent.kt:308-336 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (28 corresponding lines) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/data/AndroidImageDrawApplier.kt:384— feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/data/AndroidImageDrawApplier.kt:384-411 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/utils/DrawUtils.kt:501-528 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (28 corresponding lines) core/base/src/main/java/com/wanbaohe/base/ui/TextFields.kt:141— core/base/src/main/java/com/wanbaohe/base/ui/TextFields.kt:141-172 | core/base/src/main/java/com/wanbaohe/base/ui/TextFields.kt:186-213 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (25 corresponding lines) · ×7
Edited copy of a member (25 corresponding lines) feature/marktodo/src/main/java/com/shifenmiao/marktodo/screenLogic/AddTodoComponent.kt:245— feature/marktodo/src/main/java/com/shifenmiao/marktodo/screenLogic/AddTodoComponent.kt:245-270 | feature/marktodo/src/main/java/com/shifenmiao/marktodo/screenLogic/TodoDetailComponent.kt:159-183 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (25 corresponding lines) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupProjectStore.kt:110— feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupProjectStore.kt:110-134 | feature/text-card/src/main/java/com/wanbaohe/textcard/data/project/AndroidTextCardProjectStore.kt:86-112 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (25 corresponding lines) libs/diagram/src/main/java/com/wanbaohe/diagram/HeadlessDiagramRenderer.kt:93— libs/diagram/src/main/java/com/wanbaohe/diagram/HeadlessDiagramRenderer.kt:93-117 | libs/diagram/src/main/java/com/wanbaohe/diagram/OneBoxDiagramTheme.kt:10-34 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (25 corresponding lines) feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/service/BookkeepingService.kt:179— feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/service/BookkeepingService.kt:179-204 | feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/service/BookkeepingService.kt:627-651 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (25 corresponding lines) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/block/HeadingRenderer.kt:148— libs/markdown/src/upstream/java/com/hrm/markdown/renderer/block/HeadingRenderer.kt:148-172 | libs/markdown/src/upstream/java/com/hrm/markdown/renderer/internal/layout/engine/DefaultMarkdownLayoutEngine.kt:642-667 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (25 corresponding lines) feature/common/src/main/java/com/shifenmiao/common/backup/BackupCenterScreen.kt:487— feature/common/src/main/java/com/shifenmiao/common/backup/BackupCenterScreen.kt:487-511 | feature/common/src/main/java/com/shifenmiao/common/backup/BackupCenterScreen.kt:517-548 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (25 corresponding lines) feature/demo/src/main/java/com/shifenmiao/demo/screen/A2uiComponentGalleryScreen.kt:315— feature/demo/src/main/java/com/shifenmiao/demo/screen/A2uiComponentGalleryScreen.kt:315-344 | feature/demo/src/main/java/com/shifenmiao/demo/screen/A2uiComponentGalleryScreen.kt:351-375 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 15+ corresponding lines) · ×7
Edited copies of one member (3 members, 15+ corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidBlockSubPipeline.kt:375— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidBlockSubPipeline.kt:375-389 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlC4SubPipeline.kt:485-502 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlDitaaSubPipeline.kt:317-334 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 15+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/CreateGameUseCase.kt:57— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/CreateGameUseCase.kt:57-71 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/CreateGameUseCase.kt:58-74 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/CreateGameUseCase.kt:61-84 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 15+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/component/ChessLibraryComponent.kt:102— feature/chess/src/main/java/com/wanbaohe/chess/component/ChessLibraryComponent.kt:102-120 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuLibraryComponent.kt:101-119 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiLibraryComponent.kt:107-121 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 15+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/data/GameDaoAdapter.kt:90— feature/chess/src/main/java/com/wanbaohe/chess/data/GameDaoAdapter.kt:90-105 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/GameDaoAdapter.kt:88-103 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/GameDaoAdapter.kt:89-103 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 15+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/GameQueryUseCase.kt:85— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/GameQueryUseCase.kt:85-99 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/GameQueryUseCase.kt:83-97 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/GameQueryUseCase.kt:78-94 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 15+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/component/ChessLibraryComponent.kt:160— feature/chess/src/main/java/com/wanbaohe/chess/component/ChessLibraryComponent.kt:160-174 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuLibraryComponent.kt:157-171 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiLibraryComponent.kt:161-175 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 15+ corresponding lines) feature/calendar/src/main/java/com/wanbaohe/calendar/ui/CalendarTab.kt:1394— feature/calendar/src/main/java/com/wanbaohe/calendar/ui/CalendarTab.kt:1394-1408 | feature/calendar/src/main/java/com/wanbaohe/calendar/ui/ConversionTab.kt:887-903 | feature/id-photo/src/main/java/com/wanbaohe/idphoto/presentation/components/IdPhotoExportConfigPanel.kt:295-310 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 12+ corresponding lines) · ×7
Edited copies of one member (3 members, 12+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/data/online/SignalingClientImpl.kt:252— feature/chess/src/main/java/com/wanbaohe/chess/data/online/SignalingClientImpl.kt:252-263 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/online/SignalingClientImpl.kt:252-263 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/online/SignalingClientImpl.kt:252-263 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 12+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ManageGameUseCase.kt:293— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ManageGameUseCase.kt:293-304 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/ManageGameUseCase.kt:85-98 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/ManageGameUseCase.kt:84-97 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 12+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt:722— feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt:722-733 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/router/screenLogic/GomokuRouterComponent.kt:675-686 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/router/screenLogic/XiangqiRouterComponent.kt:690-701 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 12+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/data/LlmMoveChooser.kt:114— feature/chess/src/main/java/com/wanbaohe/chess/data/LlmMoveChooser.kt:114-125 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/LlmMoveChooser.kt:114-125 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/LlmMoveChooser.kt:113-124 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 12+ corresponding lines) core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/DrawUtils.kt:41— core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/DrawUtils.kt:41-52 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/data/AndroidImageDrawApplier.kt:530-541 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/AndroidFilterMaskApplier.kt:185-196 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 12+ corresponding lines) feature/cipher/src/main/java/com/t8rin/imagetoolbox/feature/cipher/presentation/screenLogic/CipherComponent.kt:163— feature/cipher/src/main/java/com/t8rin/imagetoolbox/feature/cipher/presentation/screenLogic/CipherComponent.kt:163-174 | feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/screenLogic/GifToolsComponent.kt:202-214 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/screenLogic/WebpToolsComponent.kt:192-204 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 12+ corresponding lines) feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/screen/tab/StatsTab.kt:593— feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/screen/tab/StatsTab.kt:593-604 | feature/habit-tracker/src/main/java/com/wanbaohe/habittracker/screen/tab/StatsTab.kt:397-410 | feature/household-items/src/main/java/com/wanbaohe/householditems/screen/HouseholdStatsTab.kt:681-692 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Duplicated block (32 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassOutlinedTextField.kt:492— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassOutlinedTextField.kt:492-523 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassOutlinedTextField.kt:588-619 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassOutlinedTextField.kt:492` 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 (32 lines × 2) feature/compare/src/main/java/com/t8rin/imagetoolbox/feature/compare/presentation/components/CompareSheet.kt:121— feature/compare/src/main/java/com/t8rin/imagetoolbox/feature/compare/presentation/components/CompareSheet.kt:121-152 | feature/compare/src/main/java/com/t8rin/imagetoolbox/feature/compare/presentation/components/CompareSheet.kt:200-231 — 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/compare/src/main/java/com/t8rin/imagetoolbox/feature/compare/presentation/components/CompareSheet.kt:121` 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 (32 lines × 2) feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:229— feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:229-260 | feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/ImageCutterContent.kt:207-238 — before extracting anything, compare `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt` and `feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/ImageCutterContent.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 71 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 `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:229` 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 (32 lines × 2) feature/load-net-image/src/main/java/com/t8rin/imagetoolbox/feature/load_net_image/presentation/components/LoadNetImageActionButtons.kt:83— feature/load-net-image/src/main/java/com/t8rin/imagetoolbox/feature/load_net_image/presentation/components/LoadNetImageActionButtons.kt:83-114 | feature/wallpapers-export/src/main/java/com/t8rin/imagetoolbox/feature/wallpapers_export/presentation/components/WallpapersActionButtons.kt:82-113 — 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 `feature/load-net-image/src/main/java/com/t8rin/imagetoolbox/feature/load_net_image/presentation/components/LoadNetImageActionButtons.kt:83` 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 (32 lines × 2) feature/login/src/main/java/com/shifenmiao/login/ForgotPasswordBottomSheet.kt:97— feature/login/src/main/java/com/shifenmiao/login/ForgotPasswordBottomSheet.kt:97-128 | feature/login/src/main/java/com/shifenmiao/login/ForgotPasswordScreen.kt:86-117 — 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 `feature/login/src/main/java/com/shifenmiao/login/ForgotPasswordBottomSheet.kt:97` 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 (32 lines × 2) libs/opencv-tools/src/main/java/com/t8rin/opencv_tools/seam_carving/SeamCarver.kt:508— libs/opencv-tools/src/main/java/com/t8rin/opencv_tools/seam_carving/SeamCarver.kt:508-539 | libs/opencv-tools/src/main/java/com/t8rin/opencv_tools/seam_carving/SeamCarver.kt:684-715 — 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 `libs/opencv-tools/src/main/java/com/t8rin/opencv_tools/seam_carving/SeamCarver.kt:508` 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 (32 lines × 2) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidC4SubPipeline.kt:448— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidC4SubPipeline.kt:448-479 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidC4SubPipeline.kt:520-551 — 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 `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidC4SubPipeline.kt:448` 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 (25 lines × 2) core/base/src/main/java/com/shifenmiao/base/utils/FileUtils.kt:408— core/base/src/main/java/com/shifenmiao/base/utils/FileUtils.kt:408-432 | core/base/src/main/java/com/shifenmiao/base/utils/FileUtils.kt:448-472 — 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 `core/base/src/main/java/com/shifenmiao/base/utils/FileUtils.kt:408` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (25 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedButtonGroup.kt:151— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedButtonGroup.kt:151-175 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedButtonGroup.kt:231-255 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedButtonGroup.kt:151` 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 (25 lines × 2) feature/ai/src/main/java/com/shifenmiao/ai/upload/CloudFileUploadHandler.kt:150— feature/ai/src/main/java/com/shifenmiao/ai/upload/CloudFileUploadHandler.kt:150-174 | feature/ai/src/main/java/com/shifenmiao/ai/upload/FileAnalyzer.kt:653-677 — 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 (25 lines × 2) feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/AwsSigV4Signer.kt:115— feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/AwsSigV4Signer.kt:115-139 | feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/BaiduBosSigner.kt:116-140 — before extracting anything, compare `feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/AwsSigV4Signer.kt` and `feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/BaiduBosSigner.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 70 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 `feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/AwsSigV4Signer.kt:115` 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 (25 lines × 2) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/FiltersContentControls.kt:205— feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/FiltersContentControls.kt:205-229 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/FiltersContentControls.kt:326-350 — 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/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/FiltersContentControls.kt:205` 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 (25 lines × 2) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/components/TextEditDialog.kt:551— feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/components/TextEditDialog.kt:551-575 | feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/draw/BrushSettingsDialog.kt:230-254 — 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 `feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/components/TextEditDialog.kt:551` 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 (25 lines × 2) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlMindmapSubPipeline.kt:63— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlMindmapSubPipeline.kt:63-87 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlWbsSubPipeline.kt:65-89 — before extracting anything, compare `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlMindmapSubPipeline.kt` and `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlWbsSubPipeline.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 82 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 `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlMindmapSubPipeline.kt:63` 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 (18 lines × 3) core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/ColumnSelectorRenderer.kt:48— core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/ColumnSelectorRenderer.kt:48-65 | core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/GridSelectorRenderer.kt:50-67 | core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/RowSelectorRenderer.kt:50-67 — before extracting anything, compare `core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/ColumnSelectorRenderer.kt` and `core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/GridSelectorRenderer.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. 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 after the matched lines, `core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/GridSelectorRenderer.kt:68` calls `resolveInt`, `coerceAtLeast` and `core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/ColumnSelectorRenderer.kt:66` 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 (18 lines × 3) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/BilaterialBlurParamsItem.kt:94— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/BilaterialBlurParamsItem.kt:94-111 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/LinearGaussianParamsItem.kt:95-112 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SparkleParamsItem.kt:114-131 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/BilaterialBlurParamsItem.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/LinearGaussianParamsItem.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 83 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 `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/BilaterialBlurParamsItem.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 (18 lines × 3) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/resize_group/ResizeTypeSelector.kt:364— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/resize_group/ResizeTypeSelector.kt:364-381 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/DrawLineStyleSelector.kt:411-429 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/DrawModeSelector.kt:192-210 — before extracting anything, compare `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/DrawLineStyleSelector.kt` and `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/DrawModeSelector.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 72 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/resize_group/ResizeTypeSelector.kt:364` 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 (18 lines × 3) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:146— feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:146-163 | feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/GifToolsContent.kt:140-157 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt:145-162 — before extracting anything, compare `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt` and `feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 239 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 `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:146` 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 `component` to `ApngToolsComponent` in one and `GifToolsComponent` 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 × 3) feature/calendar/src/main/java/com/wanbaohe/calendar/ui/BaZiTab.kt:260— feature/calendar/src/main/java/com/wanbaohe/calendar/ui/BaZiTab.kt:260-277 | feature/calendar/src/main/java/com/wanbaohe/calendar/ui/CalendarTab.kt:349-366 | feature/calendar/src/main/java/com/wanbaohe/calendar/ui/ConversionTab.kt:491-508 — 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 `feature/calendar/src/main/java/com/wanbaohe/calendar/ui/BaZiTab.kt:260` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 3) feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/DeleteExifContent.kt:83— feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/DeleteExifContent.kt:83-100 | feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:87-104 | feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt:102-119 — before extracting anything, compare `feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/DeleteExifContent.kt` and `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 71 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `component` to `DeleteExifComponent` in one and `FormatConversionComponent` 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 after the matched lines, `feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/DeleteExifContent.kt:102` calls `mutableStateOf` and `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:106` 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 (18 lines × 3) libs/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:327— libs/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:327-344 | libs/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:408-425 | libs/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:480-497 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (17–18 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/selection/DataMultipleSelector.kt:200— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/selection/DataMultipleSelector.kt:200-217 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/selection/DataSelector.kt:196-212 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/selection/DataMultipleSelector.kt:200` 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 (17–18 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/switches/CupertinoSwitch.kt:160— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/switches/CupertinoSwitch.kt:160-176 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/switches/CupertinoSwitch.kt:293-310 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/switches/CupertinoSwitch.kt:160` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17–18 lines × 2) feature/ai/src/main/java/com/shifenmiao/ai/content/MessageComponents.kt:500— feature/ai/src/main/java/com/shifenmiao/ai/content/MessageComponents.kt:500-517 | feature/ai/src/main/java/com/shifenmiao/ai/screen/AIDuelChatScreen.kt:554-570 — 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 `feature/ai/src/main/java/com/shifenmiao/ai/content/MessageComponents.kt:500` 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–18 lines × 2) feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:493— feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:493-510 | feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt:479-495 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 625 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 `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:493` 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) feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/screen/components/BucketSwitcherSheet.kt:64— feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/screen/components/BucketSwitcherSheet.kt:64-81 | feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/screen/components/ConnectionSwitcherSheet.kt:95-111 — 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 `feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/screen/components/BucketSwitcherSheet.kt:64` 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, `feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/screen/components/ConnectionSwitcherSheet.kt:94` calls `navigationBarsPadding` and `feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/screen/components/BucketSwitcherSheet.kt:63` 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 (17–18 lines × 2) feature/loan-calculator/src/main/java/com/wanbaohe/loancalculator/ui/input/widget/RepaymentMethodSheet.kt:80— feature/loan-calculator/src/main/java/com/wanbaohe/loancalculator/ui/input/widget/RepaymentMethodSheet.kt:80-97 | feature/loan-calculator/src/main/java/com/wanbaohe/loancalculator/ui/input/widget/TermPickerSheet.kt:108-124 — 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 `feature/loan-calculator/src/main/java/com/wanbaohe/loancalculator/ui/input/widget/RepaymentMethodSheet.kt:80` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17–18 lines × 2) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/block/HeadingRenderer.kt:102— libs/markdown/src/upstream/java/com/hrm/markdown/renderer/block/HeadingRenderer.kt:102-119 | libs/markdown/src/upstream/java/com/hrm/markdown/renderer/block/HeadingRenderer.kt:122-138 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. 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 × 3) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/FloatPaletteImageModelTripleItem.kt:69— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/FloatPaletteImageModelTripleItem.kt:69-84 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberColorModelColorModelTripleItem.kt:63-78 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberColorModelPopArtTripleItem.kt:67-82 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberColorModelColorModelTripleItem.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberColorModelPopArtTripleItem.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 57 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 `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/FloatPaletteImageModelTripleItem.kt:69` 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 × 3) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ManageGameUseCase.kt:268— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ManageGameUseCase.kt:268-283 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/ManageGameUseCase.kt:228-243 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/ManageGameUseCase.kt:239-254 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ManageGameUseCase.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/ManageGameUseCase.kt` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 94 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 `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ManageGameUseCase.kt:268` 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: `FenCodec` names `com.wanbaohe.chess.domain.FenCodec` in one and `com.wanbaohe.gomoku.domain.FenCodec` 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 × 3) feature/chess/src/main/java/com/wanbaohe/chess/data/ChessMoveFallback.kt:47— feature/chess/src/main/java/com/wanbaohe/chess/data/ChessMoveFallback.kt:47-62 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/GomokuMoveFallback.kt:50-65 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/HeuristicMoveFallback.kt:45-60 — 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 `feature/chess/src/main/java/com/wanbaohe/chess/data/ChessMoveFallback.kt:47` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: `MoveDecision` names `com.wanbaohe.chess.application.port.outbound.MoveDecision` in one and `com.wanbaohe.gomoku.application.port.outbound.MoveDecision` 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 × 3) feature/chess/src/main/java/com/wanbaohe/chess/data/PlyDaoAdapter.kt:58— feature/chess/src/main/java/com/wanbaohe/chess/data/PlyDaoAdapter.kt:58-73 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/PlyDaoAdapter.kt:58-73 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/PlyDaoAdapter.kt:58-73 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/data/PlyDaoAdapter.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/PlyDaoAdapter.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. Note first that the copies are not typed on the same thing: `PlyEntity` names `com.wanbaohe.chess.application.port.outbound.PlyEntity` in one and `com.wanbaohe.gomoku.application.port.outbound.PlyEntity` 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 × 3) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessImportDialog.kt:43— feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessImportDialog.kt:43-58 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuImportDialog.kt:43-58 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiImportDialog.kt:43-58 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessImportDialog.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuImportDialog.kt` as WHOLE FILES: 85% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 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 `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessImportDialog.kt:43` 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 × 3) feature/collage-maker/src/main/java/com/t8rin/imagetoolbox/collage_maker/presentation/CollageMakerContent.kt:232— feature/collage-maker/src/main/java/com/t8rin/imagetoolbox/collage_maker/presentation/CollageMakerContent.kt:232-247 | feature/crop/src/main/java/com/t8rin/imagetoolbox/feature/crop/presentation/CropContent.kt:202-217 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/DrawContent.kt:228-243 — 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. Note first that the copies are not typed on the same thing: `Icons` names `androidx.compose.material.icons.Icons` in one and `com.t8rin.imagetoolbox.core.resources.Icons` 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 × 3) feature/settings/src/main/java/com/wanbaohe/setting/theme/screen/ThemeSettingsScreen.kt:789— feature/settings/src/main/java/com/wanbaohe/setting/theme/screen/ThemeSettingsScreen.kt:789-804 | feature/settings/src/main/java/com/wanbaohe/setting/theme/screen/ThemeSettingsScreen.kt:1131-1146 | feature/settings/src/main/java/com/wanbaohe/setting/theme/screen/ThemeSettingsScreen.kt:1408-1423 — 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/settings/src/main/java/com/wanbaohe/setting/theme/screen/ThemeSettingsScreen.kt:789` 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) feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/screen/tab/StatsTab.kt:451— feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/screen/tab/StatsTab.kt:451-465 | feature/household-items/src/main/java/com/wanbaohe/householditems/screen/HouseholdStatsTab.kt:390-405 — 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 `feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/screen/tab/StatsTab.kt:451` 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 (15–16 lines × 2) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessSetupScreen.kt:203— feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessSetupScreen.kt:203-218 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiSetupScreen.kt:201-215 — 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 `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessSetupScreen.kt:203` 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–16 lines × 2) feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:297— feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:297-312 | feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt:401-415 — before extracting anything, compare `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt` and `feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 190 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 `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:297` 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 (15–16 lines × 2) feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/GifToolsContent.kt:89— feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/GifToolsContent.kt:89-103 | feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/GifToolsContent.kt:109-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 `feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/GifToolsContent.kt:89` 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 (15–16 lines × 2) feature/ocr-document/src/main/java/com/shifenmiao/feature/document/component/DocConvertTaskListComponent.kt:134— feature/ocr-document/src/main/java/com/shifenmiao/feature/document/component/DocConvertTaskListComponent.kt:134-148 | feature/ocr-document/src/main/java/com/shifenmiao/feature/document/component/OcrTaskListComponent.kt:122-137 — before extracting anything, compare `feature/ocr-document/src/main/java/com/shifenmiao/feature/document/component/DocConvertTaskListComponent.kt` and `feature/ocr-document/src/main/java/com/shifenmiao/feature/document/component/OcrTaskListComponent.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 71 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 `feature/ocr-document/src/main/java/com/shifenmiao/feature/document/component/DocConvertTaskListComponent.kt:134` 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) feature/record-center/src/main/java/com/wanbaohe/recordcenter/screen/tab/RecordsTab.kt:137— feature/record-center/src/main/java/com/wanbaohe/recordcenter/screen/tab/RecordsTab.kt:137-152 | feature/record-center/src/main/java/com/wanbaohe/recordcenter/screen/tab/TrendsTab.kt:151-165 — 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 `feature/record-center/src/main/java/com/wanbaohe/recordcenter/screen/tab/RecordsTab.kt:137` 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, `feature/record-center/src/main/java/com/wanbaohe/recordcenter/screen/tab/TrendsTab.kt:166` calls `Column`, `padding` and `feature/record-center/src/main/java/com/wanbaohe/recordcenter/screen/tab/RecordsTab.kt:153` 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 (15–16 lines × 2) feature/text-card/src/main/java/com/wanbaohe/textcard/presentation/editor/panels/TextStylePanel.kt:610— feature/text-card/src/main/java/com/wanbaohe/textcard/presentation/editor/panels/TextStylePanel.kt:610-625 | feature/watermarking/src/main/java/com/shifenmiao/app/watermarking/presentation/components/FontStyleRow.kt:133-147 — 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 `feature/text-card/src/main/java/com/wanbaohe/textcard/presentation/editor/panels/TextStylePanel.kt:610` 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 × 4) core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/ColumnSelectorRenderer.kt:48— core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/ColumnSelectorRenderer.kt:48-55 | core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/GridSelectorRenderer.kt:50-57 | core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/ListSelectorRenderer.kt:54-61 | core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/RowSelectorRenderer.kt:50-57 — before extracting anything, compare `core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/ColumnSelectorRenderer.kt` and `core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/GridSelectorRenderer.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. 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 `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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/ListSelectorRenderer.kt:63` calls `resolveInt` and `core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/ColumnSelectorRenderer.kt:57` 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 lines × 4) feature/iching-divination/src/main/java/com/wanbaohe/iching/screen/IChingDivinationScreen.kt:412— feature/iching-divination/src/main/java/com/wanbaohe/iching/screen/IChingDivinationScreen.kt:412-419 | feature/iching-divination/src/main/java/com/wanbaohe/iching/screen/IChingDivinationScreen.kt:450-457 | feature/iching-divination/src/main/java/com/wanbaohe/iching/screen/IChingDivinationScreen.kt:552-559 | feature/iching-divination/src/main/java/com/wanbaohe/iching/screen/IChingDivinationScreen.kt:594-601 — 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 `feature/iching-divination/src/main/java/com/wanbaohe/iching/screen/IChingDivinationScreen.kt:412` 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 × 4) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:624— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:624-631 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1778-1787 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:854-863 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:890-899 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` as WHOLE FILES: this scan already matched 47 separate duplicated blocks between them, totalling at least 481 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 `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:624` 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 × 4) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidArchitectureSubPipeline.kt:325— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidArchitectureSubPipeline.kt:325-332 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidBlockSubPipeline.kt:186-193 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidC4SubPipeline.kt:286-293 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlDitaaSubPipeline.kt:141-148 — before extracting anything, compare `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidArchitectureSubPipeline.kt` and `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidC4SubPipeline.kt` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 91 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 `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidArchitectureSubPipeline.kt:325` 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, `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidC4SubPipeline.kt:294` calls `Hyperlink` and `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlDitaaSubPipeline.kt:149` 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 × 4) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:1025— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:1025-1032 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlDeploymentSubPipeline.kt:664-671 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlObjectSubPipeline.kt:390-397 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlUsecaseSubPipeline.kt:527-534 — before extracting anything, compare `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt` and `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlDeploymentSubPipeline.kt` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 163 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 `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:1025` 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 × 4) feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:409— feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:409-416 | feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:419-426 | feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIPromptComponent.kt:446-453 | feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIPromptComponent.kt:456-463 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIPromptComponent.kt` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 360 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.
Duplicated block (8 lines × 4) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidSessionPipeline.kt:225— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidSessionPipeline.kt:225-234 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidSessionPipeline.kt:245-252 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidSessionPipeline.kt:266-273 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidSessionPipeline.kt:285-292 — 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 `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidSessionPipeline.kt:225` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication· Edited copy of a member (62 corresponding lines) · ×6
Edited copy of a member (62 corresponding lines) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/components/LayersFloatingPanel.kt:185— feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/components/LayersFloatingPanel.kt:185-246 | feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/components/LayersSheet.kt:216-284 — These two members are one piece of code written twice and then edited apart: 62 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (62 corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/data/search/ChessSearch.kt:76— feature/chess/src/main/java/com/wanbaohe/chess/data/search/ChessSearch.kt:76-137 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/search/XiangqiSearch.kt:80-147 — These two members are one piece of code written twice and then edited apart: 62 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (62 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:342— feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:342-406 | feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIPromptComponent.kt:382-443 — These two members are one piece of code written twice and then edited apart: 62 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (62 corresponding lines) feature/load-net-image/src/main/java/com/t8rin/imagetoolbox/feature/load_net_image/presentation/components/LoadNetImageActionButtons.kt:53— feature/load-net-image/src/main/java/com/t8rin/imagetoolbox/feature/load_net_image/presentation/components/LoadNetImageActionButtons.kt:53-114 | feature/wallpapers-export/src/main/java/com/t8rin/imagetoolbox/feature/wallpapers_export/presentation/components/WallpapersActionButtons.kt:52-113 — These two members are one piece of code written twice and then edited apart: 62 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (62 corresponding lines) core/ui/src/main/java/com/wanbaohe/base/ui/image/IconImageBox.kt:56— core/ui/src/main/java/com/wanbaohe/base/ui/image/IconImageBox.kt:56-135 | core/ui/src/main/java/com/wanbaohe/base/ui/image/IconImageBox.kt:195-256 — These two members are one piece of code written twice and then edited apart: 62 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (62 corresponding lines) feature/compass/src/main/java/com/wanbaohe/compass/ui/ClassicCompassPage.kt:58— feature/compass/src/main/java/com/wanbaohe/compass/ui/ClassicCompassPage.kt:58-130 | feature/compass/src/main/java/com/wanbaohe/compass/ui/luopan/LuopanPage.kt:69-130 — These two members are one piece of code written twice and then edited apart: 62 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (36 corresponding lines) · ×6
Edited copy of a member (36 corresponding lines) feature/lifetime/src/main/java/com/shifenmiao/lifetime/domain/LifeTimeCalculator.kt:66— feature/lifetime/src/main/java/com/shifenmiao/lifetime/domain/LifeTimeCalculator.kt:66-101 | feature/lifetime/src/main/java/com/shifenmiao/lifetime/domain/LifeTimeCalculator.kt:106-149 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (36 corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/data/search/ChessSearch.kt:148— feature/chess/src/main/java/com/wanbaohe/chess/data/search/ChessSearch.kt:148-183 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/search/XiangqiSearch.kt:158-196 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (36 corresponding lines) feature/poem/src/main/java/com/wanbaohe/poem/ai/tool/QueryPoemFavoritesTool.kt:78— feature/poem/src/main/java/com/wanbaohe/poem/ai/tool/QueryPoemFavoritesTool.kt:78-113 | feature/poem/src/main/java/com/wanbaohe/poem/ai/tool/SearchPoemTool.kt:89-130 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (36 corresponding lines) feature/scan-qr-code/src/main/java/com/t8rin/imagetoolbox/feature/scan_qr_code/presentation/components/editor/QrEmailEditField.kt:49— feature/scan-qr-code/src/main/java/com/t8rin/imagetoolbox/feature/scan_qr_code/presentation/components/editor/QrEmailEditField.kt:49-92 | feature/scan-qr-code/src/main/java/com/t8rin/imagetoolbox/feature/scan_qr_code/presentation/components/editor/QrSmsEditField.kt:49-84 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (36 corresponding lines) core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/ClipboardUtils.kt:47— core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/ClipboardUtils.kt:47-85 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/ClipboardUtils.kt:88-123 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (36 corresponding lines) feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/screenLogic/ImageStackingComponent.kt:144— feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/screenLogic/ImageStackingComponent.kt:144-183 | feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/screenLogic/ImageStitchingComponent.kt:168-203 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (38 corresponding lines) · ×6
Edited copy of a member (38 corresponding lines) feature/password-vault/src/main/java/com/wanbaohe/passwordvault/detail/PasswordVaultDetailScreen.kt:312— feature/password-vault/src/main/java/com/wanbaohe/passwordvault/detail/PasswordVaultDetailScreen.kt:312-349 | feature/password-vault/src/main/java/com/wanbaohe/passwordvault/detail/PasswordVaultDetailScreen.kt:359-400 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (38 corresponding lines) feature/ai-detect/src/main/java/com/wanbaohe/aidetect/screen/AiDetectScreen.kt:205— feature/ai-detect/src/main/java/com/wanbaohe/aidetect/screen/AiDetectScreen.kt:205-243 | feature/record-center/src/main/java/com/wanbaohe/recordcenter/screen/RecordCenterScreen.kt:116-153 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (38 corresponding lines) feature/webview/src/main/java/com/shifenmiao/webview/browser/BrowserSettingsPage.kt:405— feature/webview/src/main/java/com/shifenmiao/webview/browser/BrowserSettingsPage.kt:405-448 | feature/webview/src/main/java/com/shifenmiao/webview/browser/BrowserSettingsPage.kt:457-494 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (38 corresponding lines) feature/file-browser/src/main/java/com/wanbaohe/file/browser/ui/EmptyStates.kt:133— feature/file-browser/src/main/java/com/wanbaohe/file/browser/ui/EmptyStates.kt:133-171 | feature/zip/src/main/java/com/t8rin/imagetoolbox/feature/zip/presentation/components/ZipArchiveList.kt:451-488 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (38 corresponding lines) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/data/AndroidMediaRetriever.kt:61— feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/data/AndroidMediaRetriever.kt:61-98 | feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/data/AndroidMediaRetriever.kt:112-153 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (38 corresponding lines) feature/profile/src/main/java/com/wanbaohe/profile/viewmodel/PayComponent.kt:342— feature/profile/src/main/java/com/wanbaohe/profile/viewmodel/PayComponent.kt:342-379 | feature/profile/src/main/java/com/wanbaohe/profile/viewmodel/PayComponent.kt:416-455 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 22+ corresponding lines) · ×6
Edited copies of one member (3 members, 22+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessOriginDialog.kt:42— feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessOriginDialog.kt:42-63 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuOriginDialog.kt:42-63 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiOriginDialog.kt:45-68 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 22 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 22+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/presentation/ChessGifReplay.kt:41— feature/chess/src/main/java/com/wanbaohe/chess/presentation/ChessGifReplay.kt:41-62 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/presentation/GomokuGifReplay.kt:41-62 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/presentation/XiangqiGifReplay.kt:41-62 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 22 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 22+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ManageGameUseCase.kt:267— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ManageGameUseCase.kt:267-288 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/ManageGameUseCase.kt:227-248 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/ManageGameUseCase.kt:238-259 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 22 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 22+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/GameQueryUseCase.kt:101— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/GameQueryUseCase.kt:101-122 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/GameQueryUseCase.kt:99-120 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/GameQueryUseCase.kt:98-119 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 22 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 22+ corresponding lines) feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/screenLogic/FormatConversionComponent.kt:149— feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/screenLogic/FormatConversionComponent.kt:149-171 | feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/screenLogic/ImageCutterComponent.kt:117-139 | feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:177-198 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 22 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 22+ corresponding lines) core/ui/src/main/java/com/wanbaohe/base/ui/empty/EmptyStateGuide.kt:165— core/ui/src/main/java/com/wanbaohe/base/ui/empty/EmptyStateGuide.kt:165-186 | feature/common/src/main/java/com/shifenmiao/common/markdown/OneBoxMarkdownCodeBlockHeader.kt:91-113 | feature/online/src/main/java/com/shifenmiao/online/ui/HomeCreationExperience.kt:178-200 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 22 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 13+ corresponding lines) · ×6
Edited copies of one member (3 members, 13+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt:239— feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt:239-252 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/router/screenLogic/GomokuRouterComponent.kt:237-250 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/router/screenLogic/XiangqiRouterComponent.kt:264-276 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 13+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/domain/BoardSetupDraft.kt:50— feature/chess/src/main/java/com/wanbaohe/chess/domain/BoardSetupDraft.kt:50-62 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/domain/BoardSetupDraft.kt:53-65 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/domain/BoardSetupDraft.kt:49-61 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 13+ corresponding lines) core/data/src/main/java/com/t8rin/imagetoolbox/core/data/image/AndroidImageGetter.kt:187— core/data/src/main/java/com/t8rin/imagetoolbox/core/data/image/AndroidImageGetter.kt:187-199 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/ContextUtils.kt:790-802 | core/utils/src/main/java/com/t8rin/imagetoolbox/core/utils/UriUtils.kt:150-162 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 13+ corresponding lines) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:319— feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:319-331 | feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/screenLogic/GifToolsComponent.kt:385-397 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/screenLogic/WebpToolsComponent.kt:311-323 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 13+ corresponding lines) feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rearrange/screenLogic/RearrangePdfToolComponent.kt:92— feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rearrange/screenLogic/RearrangePdfToolComponent.kt:92-104 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_pages/screenLogic/RemovePagesPdfToolComponent.kt:91-103 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rotate/screenLogic/RotatePdfToolComponent.kt:104-116 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 13+ corresponding lines) feature/blessing-wall/src/main/java/com/wanbaohe/blessingwall/component/BlessingWallComponent.kt:126— feature/blessing-wall/src/main/java/com/wanbaohe/blessingwall/component/BlessingWallComponent.kt:126-138 | feature/calendar/src/main/java/com/wanbaohe/calendar/share/CalendarShareComponent.kt:314-326 | feature/minesweeper/src/main/java/com/wanbaohe/minesweeper/component/MinesweeperComponent.kt:155-169 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 11+ corresponding lines) · ×6
Edited copies of one member (3 members, 11+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt:688— feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt:688-700 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/router/screenLogic/GomokuRouterComponent.kt:632-645 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/router/screenLogic/XiangqiRouterComponent.kt:654-664 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 11+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:823— feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:823-833 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuGameComponent.kt:947-957 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiGameComponent.kt:814-824 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 11+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt:266— feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt:266-276 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/router/screenLogic/GomokuRouterComponent.kt:260-270 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/router/screenLogic/XiangqiRouterComponent.kt:291-301 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 11+ corresponding lines) feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/component/BookkeepingComponent.kt:167— feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/component/BookkeepingComponent.kt:167-177 | feature/record-center/src/main/java/com/wanbaohe/recordcenter/component/RecordListComponent.kt:227-237 | feature/teleprompter/src/main/java/com/wanbaohe/teleprompter/component/TeleprompterComponent.kt:121-131 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 11+ corresponding lines) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:307— feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:307-317 | feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/screenLogic/GifToolsComponent.kt:373-383 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/screenLogic/WebpToolsComponent.kt:299-309 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 11+ corresponding lines) feature/decision-wheel/src/main/java/com/wanbaohe/decisionwheel/component/DecisionWheelRouterComponent.kt:189— feature/decision-wheel/src/main/java/com/wanbaohe/decisionwheel/component/DecisionWheelRouterComponent.kt:189-199 | feature/household-items/src/main/java/com/wanbaohe/householditems/component/HouseholdItemsComponent.kt:176-186 | feature/period/src/main/java/com/wanbaohe/period/component/PeriodComponent.kt:130-140 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 9+ corresponding lines) · ×6
Edited copies of one member (3 members, 9+ corresponding lines) feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeAddEventScreen.kt:339— feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeAddEventScreen.kt:339-347 | feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeScreen.kt:722-736 | feature/lifetime/src/main/java/com/shifenmiao/lifetime/ui/EventPickerSheet.kt:277-286 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 9+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/AudioFeedbackUseCase.kt:92— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/AudioFeedbackUseCase.kt:92-100 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/AudioFeedbackUseCase.kt:92-100 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/AudioFeedbackUseCase.kt:96-104 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 9+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/domain/BoardSetupDraft.kt:64— feature/chess/src/main/java/com/wanbaohe/chess/domain/BoardSetupDraft.kt:64-72 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/domain/BoardSetupDraft.kt:67-76 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/domain/BoardSetupDraft.kt:63-71 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 9+ corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageChessTool.kt:286— feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageChessTool.kt:286-294 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageGomokuTool.kt:286-294 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageXiangqiTool.kt:286-294 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 9+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/AudioFeedbackUseCase.kt:108— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/AudioFeedbackUseCase.kt:108-118 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/AudioFeedbackUseCase.kt:108-116 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/AudioFeedbackUseCase.kt:112-126 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 9+ corresponding lines) core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/DynamicUi.kt:455— core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/DynamicUi.kt:455-463 | core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:1535-1543 | core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/state/PromptCollector.kt:300-309 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Duplicated block (19 lines × 3) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/setting/GlassmorphismSettingItem.kt:342— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/setting/GlassmorphismSettingItem.kt:342-360 | feature/settings/src/main/java/com/wanbaohe/setting/theme/screen/ThemeSettingsScreen.kt:1024-1042 | feature/settings/src/main/java/com/wanbaohe/setting/theme/screen/ThemeSettingsScreen.kt:1565-1583 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/setting/GlassmorphismSettingItem.kt:342` 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 lines × 3) feature/audio-cover-extractor/src/main/java/com/t8rin/imagetoolbox/feature/audio_cover_extractor/ui/AudioCoverExtractorContent.kt:177— feature/audio-cover-extractor/src/main/java/com/t8rin/imagetoolbox/feature/audio_cover_extractor/ui/AudioCoverExtractorContent.kt:177-195 | feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/components/GifToolsImagePreview.kt:77-95 | feature/svg-maker/src/main/java/com/t8rin/imagetoolbox/feature/svg_maker/presentation/SvgMakerContent.kt:131-149 — 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 `feature/audio-cover-extractor/src/main/java/com/t8rin/imagetoolbox/feature/audio_cover_extractor/ui/AudioCoverExtractorContent.kt:177` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ManageGameUseCase.kt:169— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ManageGameUseCase.kt:169-187 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/ManageGameUseCase.kt:147-165 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/ManageGameUseCase.kt:140-158 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ManageGameUseCase.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/ManageGameUseCase.kt` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 94 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: `GameStatus` names `com.wanbaohe.chess.domain.model.GameStatus` in one and `com.wanbaohe.gomoku.domain.model.GameStatus` 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 (19 lines × 3) feature/dsh-client/src/main/java/com/wanbaohe/dsh/screen/ChatScreen.kt:859— feature/dsh-client/src/main/java/com/wanbaohe/dsh/screen/ChatScreen.kt:859-877 | feature/dsh-client/src/main/java/com/wanbaohe/dsh/screen/ChatScreen.kt:1469-1487 | feature/dsh-client/src/main/java/com/wanbaohe/dsh/screen/ChatScreen.kt:1506-1524 — 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/dsh-client/src/main/java/com/wanbaohe/dsh/screen/ChatScreen.kt:859` 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) feature/file-transfer/src/main/java/com/wanbaohe/file_transfer/server/FileTransferServer.kt:838— feature/file-transfer/src/main/java/com/wanbaohe/file_transfer/server/FileTransferServer.kt:838-856 | feature/file-transfer/src/main/java/com/wanbaohe/file_transfer/server/FileTransferServer.kt:948-966 | feature/file-transfer/src/main/java/com/wanbaohe/file_transfer/server/FileTransferServer.kt:1064-1082 — 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/file-transfer/src/main/java/com/wanbaohe/file_transfer/server/FileTransferServer.kt:838` 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 (19 lines × 3) feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rearrange/components/PdfPagesRearrangeGrid.kt:145— feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rearrange/components/PdfPagesRearrangeGrid.kt:145-163 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_pages/components/PdfPagesRemoveGrid.kt:162-180 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rotate/components/PdfPagesRotationGrid.kt:173-191 — before extracting anything, compare `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rearrange/components/PdfPagesRearrangeGrid.kt` and `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_pages/components/PdfPagesRemoveGrid.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 97 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 `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rearrange/components/PdfPagesRearrangeGrid.kt:145` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_pages/components/PdfPagesRemoveGrid.kt:181` calls `rememberLazyGridState` and `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rearrange/components/PdfPagesRearrangeGrid.kt:164` 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 (11–12 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/AdaptiveBottomScaffoldLayoutScreen.kt:149— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/AdaptiveBottomScaffoldLayoutScreen.kt:149-160 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/AdaptiveLayoutScreen.kt:168-178 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/AdaptiveBottomScaffoldLayoutScreen.kt:149` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: `ArrowBack` names `androidx.compose.material.icons.automirrored.rounded.ArrowBack` in one and `com.t8rin.imagetoolbox.core.resources.icons.ArrowBack` 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) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/model/FastBlurFilter.kt:159— feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/model/FastBlurFilter.kt:159-169 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/model/StackBlurFilter.kt:269-280 — before extracting anything, compare `feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/model/FastBlurFilter.kt` and `feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/model/StackBlurFilter.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. 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/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/model/FastBlurFilter.kt:159` 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–12 lines × 2) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/tool/PixelationCommands.kt:199— feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/tool/PixelationCommands.kt:199-210 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/tool/PixelationCommands.kt:274-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 `feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/tool/PixelationCommands.kt:199` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (11–12 lines × 2) feature/marktodo/src/main/java/com/shifenmiao/marktodo/components/ThemeGroupCard.kt:169— feature/marktodo/src/main/java/com/shifenmiao/marktodo/components/ThemeGroupCard.kt:169-180 | feature/marktodo/src/main/java/com/shifenmiao/marktodo/components/ThemeGroupCard.kt:304-314 — 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/marktodo/src/main/java/com/shifenmiao/marktodo/components/ThemeGroupCard.kt:169` 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–12 lines × 2) feature/record-center/src/main/java/com/wanbaohe/recordcenter/screen/AddRecordScreen.kt:123— feature/record-center/src/main/java/com/wanbaohe/recordcenter/screen/AddRecordScreen.kt:123-133 | feature/record-center/src/main/java/com/wanbaohe/recordcenter/screen/RecordListScreen.kt:141-152 — 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 `feature/record-center/src/main/java/com/wanbaohe/recordcenter/screen/AddRecordScreen.kt:123` 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–12 lines × 2) feature/webview/src/main/java/com/shifenmiao/webview/ColumnWebViewScreen.kt:53— feature/webview/src/main/java/com/shifenmiao/webview/ColumnWebViewScreen.kt:53-63 | feature/webview/src/main/java/com/shifenmiao/webview/PreviewWebViewScreen.kt:101-112 — 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 `feature/webview/src/main/java/com/shifenmiao/webview/ColumnWebViewScreen.kt:53` 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 (9–10 lines × 2) core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDatePickerDialog.kt:628— core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDatePickerDialog.kt:628-637 | core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDateRangePickerDialog.kt:533-541 — before extracting anything, compare `core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDatePickerDialog.kt` and `core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDateRangePickerDialog.kt` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 147 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 `core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDatePickerDialog.kt:628` 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–10 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/DrawUtils.kt:42— core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/DrawUtils.kt:42-50 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/AndroidFilterMaskApplier.kt:186-195 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/DrawUtils.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. 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 (9–10 lines × 2) feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:697— feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:697-706 | feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt:665-673 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 625 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 `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:697` 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–10 lines × 2) feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/NewGameDropMenu.kt:100— feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/NewGameDropMenu.kt:100-109 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/NewGameDropMenu.kt:97-105 — before extracting anything, compare `feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/NewGameDropMenu.kt` and `feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/NewGameDropMenu.kt` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 164 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 `feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/NewGameDropMenu.kt:100` 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 (9–10 lines × 2) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupProjectStore.kt:284— feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupProjectStore.kt:284-293 | feature/text-card/src/main/java/com/wanbaohe/textcard/data/project/AndroidTextCardProjectStore.kt:241-249 — before extracting anything, compare `feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupProjectStore.kt` and `feature/text-card/src/main/java/com/wanbaohe/textcard/data/project/AndroidTextCardProjectStore.kt` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 256 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 `feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupProjectStore.kt:284` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9–10 lines × 2) feature/visual-automation/src/main/java/com/wanbaohe/visual/automation/VisualAutomationController.kt:281— feature/visual-automation/src/main/java/com/wanbaohe/visual/automation/VisualAutomationController.kt:281-290 | feature/visual-automation/src/main/java/com/wanbaohe/visual/automation/service/VisualAutomationService.kt:255-263 — 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.
Anemic entity: Category core/database/src/main/java/com/shifenmiao/database/item/entity/Category.kt:40— `Category` 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: ItemAgentLink core/database/src/main/java/com/shifenmiao/database/item/entity/ItemAgentLink.kt:45— `ItemAgentLink` 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: ItemCategoryCrossRef core/database/src/main/java/com/shifenmiao/database/item/entity/ItemCategoryCrossRef.kt:58— `ItemCategoryCrossRef` 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: ItemDataLink core/database/src/main/java/com/shifenmiao/database/item/entity/ItemDataLink.kt:41— `ItemDataLink` 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: ItemPromptLink core/database/src/main/java/com/shifenmiao/database/item/entity/ItemPromptLink.kt:42— `ItemPromptLink` 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: ItemUserState core/database/src/main/java/com/shifenmiao/database/item/entity/ItemUserState.kt:53— `ItemUserState` 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.
Duplicated block (10 lines × 2 locations) web/code-editor/editor.src.js:278— web/code-editor/editor.src.js:278 · web/milkdown-editor/editor.src.js:932 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
Duplicated block (10 lines × 2 locations) web/file_transfer/js/core/api.js:25— web/file_transfer/js/core/api.js:25 · web/file_transfer/js/core/api.js:66 — 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 locations) web/file_transfer/js/core/api.js:38— web/file_transfer/js/core/api.js:38 · web/file_transfer/js/core/api.js:49 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (10 lines × 2 locations) web/file_viewer/src/prose-doc.js:452— web/file_viewer/src/prose-doc.js:452 · web/file_viewer/src/prose-doc.js:462 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (10 lines × 2 locations) web/file_viewer/src/prose-doc.js:1693— web/file_viewer/src/prose-doc.js:1693 · web/file_viewer/src/prose-rtf.js:451 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (10 lines × 2 locations) web/milkdown-editor/editor.src.js:1496— web/milkdown-editor/editor.src.js:1496 · web/milkdown-editor/editor.src.js:1577 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
D4 · Code Duplication· Edited copy of a member (44 corresponding lines) · ×5
Edited copy of a member (44 corresponding lines) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupProjectStore.kt:361— feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupProjectStore.kt:361-404 | feature/text-card/src/main/java/com/wanbaohe/textcard/data/project/AndroidTextCardProjectStore.kt:289-332 — These two members are one piece of code written twice and then edited apart: 44 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (44 corresponding lines) core/image-generation/src/main/java/com/shifenmiao/imagegeneration/provider/hunyuan/HunyuanImageProvider.kt:67— core/image-generation/src/main/java/com/shifenmiao/imagegeneration/provider/hunyuan/HunyuanImageProvider.kt:67-110 | core/image-generation/src/main/java/com/shifenmiao/imagegeneration/provider/qwen/QwenImageProvider.kt:67-110 — These two members are one piece of code written twice and then edited apart: 44 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (44 corresponding lines) feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/AwsSigV4Signer.kt:48— feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/AwsSigV4Signer.kt:48-93 | feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/BaiduBosSigner.kt:51-94 — These two members are one piece of code written twice and then edited apart: 44 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (44 corresponding lines) feature/household-items/src/main/java/com/wanbaohe/householditems/screen/ItemEditScreen.kt:328— feature/household-items/src/main/java/com/wanbaohe/householditems/screen/ItemEditScreen.kt:328-371 | feature/household-items/src/main/java/com/wanbaohe/householditems/screen/ItemEditScreen.kt:378-423 — These two members are one piece of code written twice and then edited apart: 44 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (44 corresponding lines) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/selection/ImageSelector.kt:74— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/selection/ImageSelector.kt:74-129 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/selection/ImageSelector.kt:140-183 — These two members are one piece of code written twice and then edited apart: 44 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (42 corresponding lines) · ×5
Edited copy of a member (42 corresponding lines) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/domain/model/LayerBaseRemap.kt:90— feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/domain/model/LayerBaseRemap.kt:90-144 | feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/domain/model/LayerBaseRemap.kt:319-360 — These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (42 corresponding lines) REDACTED:462— REDACTED:462-503 | REDACTED:605-650 — These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (42 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageTodoTool.kt:612— feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageTodoTool.kt:612-653 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageTodoTool.kt:659-700 — These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (42 corresponding lines) feature/household-items/src/main/java/com/wanbaohe/householditems/screen/HouseholdItemsScreen.kt:794— feature/household-items/src/main/java/com/wanbaohe/householditems/screen/HouseholdItemsScreen.kt:794-841 | feature/household-items/src/main/java/com/wanbaohe/householditems/screen/HouseholdItemsScreen.kt:844-885 — These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (42 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:492— feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:492-534 | feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt:478-519 — These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 17+ corresponding lines) · ×5
Edited copies of one member (3 members, 17+ corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlArchimateSubPipeline.kt:609— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlArchimateSubPipeline.kt:609-625 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlDitaaSubPipeline.kt:336-352 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlUsecaseSubPipeline.kt:386-402 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 17+ corresponding lines) feature/boardgame/src/main/java/com/wanbaohe/boardgame/ui/AiPickerBottomSheet.kt:164— feature/boardgame/src/main/java/com/wanbaohe/boardgame/ui/AiPickerBottomSheet.kt:164-180 | feature/common/src/main/java/com/shifenmiao/common/ui/ai/AIModelPickerSheet.kt:516-532 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/ui/XiangqiAiPickerBottomSheet.kt:331-347 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 17+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/screen/NewGameDropMenu.kt:324— feature/chess/src/main/java/com/wanbaohe/chess/screen/NewGameDropMenu.kt:324-340 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/NewGameDropMenu.kt:326-344 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/NewGameDropMenu.kt:322-338 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 17+ corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:305— feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:305-321 | feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:323-339 | feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIPromptComponent.kt:363-379 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 17+ corresponding lines) feature/login/src/main/java/com/shifenmiao/login/viewModel/LoginComponent.kt:1502— feature/login/src/main/java/com/shifenmiao/login/viewModel/LoginComponent.kt:1502-1518 | feature/login/src/main/java/com/shifenmiao/login/viewModel/LoginComponent.kt:1560-1581 | feature/login/src/main/java/com/shifenmiao/login/viewModel/LoginComponent.kt:1689-1705 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (40 corresponding lines) · ×5
Edited copy of a member (40 corresponding lines) feature/search/src/main/java/com/shifenmiao/search/screen/SearchScreen.kt:142— feature/search/src/main/java/com/shifenmiao/search/screen/SearchScreen.kt:142-181 | feature/search/src/main/java/com/shifenmiao/search/screen/SearchScreen.kt:186-225 — These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (40 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/upload/FileAnalyzer.kt:382— feature/ai/src/main/java/com/shifenmiao/ai/upload/FileAnalyzer.kt:382-439 | feature/visual-automation/src/main/java/com/wanbaohe/visual/automation/service/ScreenshotImageProcessor.kt:104-143 — These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (40 corresponding lines) feature/dsh-client/src/main/java/com/wanbaohe/dsh/connection/CloudRelayApi.kt:83— feature/dsh-client/src/main/java/com/wanbaohe/dsh/connection/CloudRelayApi.kt:83-122 | feature/dsh-client/src/main/java/com/wanbaohe/dsh/connection/DshApiClient.kt:189-229 — These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (40 corresponding lines) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassCard.kt:62— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassCard.kt:62-101 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassCard.kt:123-166 — These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (40 corresponding lines) feature/id-photo/src/main/java/com/wanbaohe/idphoto/presentation/components/SizeCustomizer.kt:421— feature/id-photo/src/main/java/com/wanbaohe/idphoto/presentation/components/SizeCustomizer.kt:421-466 | feature/id-photo/src/main/java/com/wanbaohe/idphoto/presentation/components/SizeSelector.kt:232-271 — These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 10+ corresponding lines) · ×5
Edited copies of one member (3 members, 10+ corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidBlockSubPipeline.kt:281— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidBlockSubPipeline.kt:281-290 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlDeploymentSubPipeline.kt:349-361 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlDeploymentSubPipeline.kt:363-381 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 10+ corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/export/FamilyOneShotRenderers.kt:537— libs/diagram/src/upstream/java/com/hrm/diagram/render/export/FamilyOneShotRenderers.kt:537-552 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidSequenceSubPipeline.kt:211-220 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlSequenceSubPipeline.kt:364-379 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 10+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ImportGameUseCase.kt:348— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ImportGameUseCase.kt:348-357 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/ImportGameUseCase.kt:299-312 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/ImportGameUseCase.kt:170-179 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 10+ corresponding lines) feature/lifetime/src/main/java/com/wanbaohe/lifetime/ai/tool/LifetimeToolSupport.kt:76— feature/lifetime/src/main/java/com/wanbaohe/lifetime/ai/tool/LifetimeToolSupport.kt:76-85 | feature/poem/src/main/java/com/wanbaohe/poem/ai/tool/PoemToolSupport.kt:95-104 | feature/schedule/src/main/java/com/wanbaohe/schedule/ai/tool/ScheduleToolSupport.kt:76-85 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 10+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/data/AiTaskDaoAdapter.kt:57— feature/chess/src/main/java/com/wanbaohe/chess/data/AiTaskDaoAdapter.kt:57-66 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/AiTaskDaoAdapter.kt:57-66 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/AiTaskDaoAdapter.kt:57-66 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (2 corresponding lines) · ×5
Edited copy of a member (2 corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/graph/GraphIrRenderer.kt:244— libs/diagram/src/upstream/java/com/hrm/diagram/render/graph/GraphIrRenderer.kt:244-245 | libs/diagram/src/upstream/java/com/hrm/diagram/render/graph/GraphIrRenderer.kt:248-249 — These two members are one piece of code written twice and then edited apart: 2 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (2 corresponding lines) feature/dsh-client/src/main/java/com/wanbaohe/dsh/screen/TrajectoryPage.kt:410— feature/dsh-client/src/main/java/com/wanbaohe/dsh/screen/TrajectoryPage.kt:410-411 | feature/dsh-client/src/main/java/com/wanbaohe/dsh/screen/node/ChatNodes.kt:719-720 — These two members are one piece of code written twice and then edited apart: 2 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (2 corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/application/dto/GamePreparation.kt:74— feature/chess/src/main/java/com/wanbaohe/chess/application/dto/GamePreparation.kt:74-75 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/dto/GamePreparation.kt:79-80 — These two members are one piece of code written twice and then edited apart: 2 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (2 corresponding lines) feature/common/src/main/java/com/shifenmiao/common/voice/VoiceRecognizer.kt:173— feature/common/src/main/java/com/shifenmiao/common/voice/VoiceRecognizer.kt:173-174 | feature/dsh-client/src/main/java/com/wanbaohe/dsh/connection/CloudRelayApi.kt:264-266 — These two members are one piece of code written twice and then edited apart: 2 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (2 corresponding lines) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/domain/model/TextLayerRichText.kt:52— feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/domain/model/TextLayerRichText.kt:52-53 | feature/text-card/src/main/java/com/wanbaohe/textcard/domain/model/TextBlock.kt:170-171 — These two members are one piece of code written twice and then edited apart: 2 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (19–20 lines × 2) core/base/src/main/java/com/shifenmiao/base/components/ErrorBox.kt:176— core/base/src/main/java/com/shifenmiao/base/components/ErrorBox.kt:176-194 | feature/common/src/main/java/com/shifenmiao/common/components/ItemNormalCard.kt:96-115 — 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 `core/base/src/main/java/com/shifenmiao/base/components/ErrorBox.kt:176` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: `Refresh` names `androidx.compose.material.icons.outlined.Refresh` in one and `com.t8rin.imagetoolbox.core.resources.icons.Refresh` 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 (19–20 lines × 2) core/data/src/main/java/com/t8rin/imagetoolbox/core/data/image/AndroidImageScaler.kt:216— core/data/src/main/java/com/t8rin/imagetoolbox/core/data/image/AndroidImageScaler.kt:216-234 | core/data/src/main/java/com/t8rin/imagetoolbox/core/data/image/AndroidImageScaler.kt:295-314 — 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 `core/data/src/main/java/com/t8rin/imagetoolbox/core/data/image/AndroidImageScaler.kt:216` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19–20 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/buttons/BottomButtonsBlock.kt:265— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/buttons/BottomButtonsBlock.kt:265-284 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/buttons/BottomButtonsBlock.kt:366-384 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/buttons/BottomButtonsBlock.kt:265` 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 (19–20 lines × 2) feature/measurement/src/main/java/com/wanbaohe/measurement/screen/MeasurementScreen.kt:648— feature/measurement/src/main/java/com/wanbaohe/measurement/screen/MeasurementScreen.kt:648-667 | feature/measurement/src/main/java/com/wanbaohe/measurement/screen/MeasurementScreen.kt:760-778 — 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/measurement/src/main/java/com/wanbaohe/measurement/screen/MeasurementScreen.kt:648` 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 (19–20 lines × 2) feature/profile/src/main/java/com/wanbaohe/profile/components/AnimatedPager.kt:94— feature/profile/src/main/java/com/wanbaohe/profile/components/AnimatedPager.kt:94-113 | feature/profile/src/main/java/com/wanbaohe/profile/components/PlayProductSlider.kt:117-135 — before extracting anything, compare `feature/profile/src/main/java/com/wanbaohe/profile/components/AnimatedPager.kt` and `feature/profile/src/main/java/com/wanbaohe/profile/components/PlayProductSlider.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 64 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 `feature/profile/src/main/java/com/wanbaohe/profile/components/AnimatedPager.kt:94` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18–19 lines × 2) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/FavoritesContent.kt:191— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/FavoritesContent.kt:191-209 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/OtherContent.kt:308-325 — 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 `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/FavoritesContent.kt:191` 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–19 lines × 2) feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:728— feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:728-746 | feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:909-926 — 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/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:728` 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–19 lines × 2) feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:878— feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:878-896 | feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt:838-855 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 625 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 `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:878` 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 (18–19 lines × 2) feature/calendar/src/main/java/com/wanbaohe/calendar/share/CalendarShareCardRenderer.kt:1100— feature/calendar/src/main/java/com/wanbaohe/calendar/share/CalendarShareCardRenderer.kt:1100-1118 | feature/calendar/src/main/java/com/wanbaohe/calendar/share/CalendarShareCardRenderer.kt:1135-1152 — 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/calendar/src/main/java/com/wanbaohe/calendar/share/CalendarShareCardRenderer.kt:1100` 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 (18–19 lines × 2) feature/chess/src/main/java/com/wanbaohe/chess/data/search/ChessSearch.kt:109— feature/chess/src/main/java/com/wanbaohe/chess/data/search/ChessSearch.kt:109-127 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/search/XiangqiSearch.kt:120-137 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/data/search/ChessSearch.kt` and `feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/search/XiangqiSearch.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 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 `feature/chess/src/main/java/com/wanbaohe/chess/data/search/ChessSearch.kt:109` 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 (16–17 lines × 2) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberNumberBlurEdgeModeTripleItem.kt:68— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberNumberBlurEdgeModeTripleItem.kt:68-83 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberNumberColorModelTripleItem.kt:71-87 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberNumberBlurEdgeModeTripleItem.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberNumberColorModelTripleItem.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 51 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 `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberNumberBlurEdgeModeTripleItem.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. 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 (16–17 lines × 2) core/ui/src/main/java/com/wanbaohe/base/ui/image/IconImageBox.kt:81— core/ui/src/main/java/com/wanbaohe/base/ui/image/IconImageBox.kt:81-97 | core/ui/src/main/java/com/wanbaohe/base/ui/image/IconImageBox.kt:204-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 `core/ui/src/main/java/com/wanbaohe/base/ui/image/IconImageBox.kt:81` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16–17 lines × 2) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/model/FastBlurFilter.kt:68— feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/model/FastBlurFilter.kt:68-83 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/model/StackBlurFilter.kt:74-90 — before extracting anything, compare `feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/model/FastBlurFilter.kt` and `feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/model/StackBlurFilter.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. 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 (16–17 lines × 2) feature/marktodo/src/main/java/com/shifenmiao/marktodo/screen/MarkTodoScreen.kt:802— feature/marktodo/src/main/java/com/shifenmiao/marktodo/screen/MarkTodoScreen.kt:802-817 | feature/marktodo/src/main/java/com/shifenmiao/marktodo/screen/MarkTodoScreen.kt:826-842 — 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/marktodo/src/main/java/com/shifenmiao/marktodo/screen/MarkTodoScreen.kt:802` 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 (16–17 lines × 2) feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiGameScreen.kt:688— feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiGameScreen.kt:688-704 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiGameScreen.kt:725-740 — 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 (13–14 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/image/AspectRatioSelector.kt:283— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/image/AspectRatioSelector.kt:283-296 | feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/presentation/components/GradientSizeSelector.kt:65-77 — 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 `feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/presentation/components/GradientSizeSelector.kt:65` 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 (13–14 lines × 2) feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/component/BookkeepingComponent.kt:389— feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/component/BookkeepingComponent.kt:389-402 | feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/component/StatsAggregator.kt:130-142 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/component/StatsAggregator.kt:130` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13–14 lines × 2) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ManageGameUseCase.kt:212— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ManageGameUseCase.kt:212-225 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/ManageGameUseCase.kt:179-191 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ManageGameUseCase.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/ManageGameUseCase.kt` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 94 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 `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ManageGameUseCase.kt:212` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: `GameResultResolver` names `com.wanbaohe.chess.domain.GameResultResolver` in one and `com.wanbaohe.gomoku.domain.GameResultResolver` 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 (13–14 lines × 2) feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt:83— feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt:83-95 | feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/WeightResizeContent.kt:129-142 — before extracting anything, compare `feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt` and `feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/WeightResizeContent.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 155 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `component` to `LimitsResizeComponent` in one and `WeightResizeComponent` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (13–14 lines × 2) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidPacketSubPipeline.kt:71— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidPacketSubPipeline.kt:71-83 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlStructSubPipeline.kt:75-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. Read the line range as the matched WINDOW rather than a finished unit: at `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidPacketSubPipeline.kt:71` 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 × 4) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RubberStampParamsItem.kt:125— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RubberStampParamsItem.kt:125-134 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RubberStampParamsItem.kt:138-147 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SparkleParamsItem.kt:134-143 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/VoronoiCrystallizeParamsItem.kt:145-154 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RubberStampParamsItem.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SparkleParamsItem.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 47 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 `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RubberStampParamsItem.kt:125` 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 × 4) feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:937— feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:937-946 | feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:1051-1061 | feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt:934-943 | feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt:1047-1057 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 625 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 `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:937` 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 × 4) feature/lifetime/src/main/java/com/wanbaohe/lifetime/ai/tool/LifetimeToolSupport.kt:62— feature/lifetime/src/main/java/com/wanbaohe/lifetime/ai/tool/LifetimeToolSupport.kt:62-71 | feature/poem/src/main/java/com/wanbaohe/poem/ai/tool/PoemToolSupport.kt:81-90 | feature/record-center/src/main/java/com/wanbaohe/recordcenter/ai/tool/RecordCenterToolResults.kt:69-78 | feature/schedule/src/main/java/com/wanbaohe/schedule/ai/tool/ScheduleToolSupport.kt:62-71 — before extracting anything, compare `feature/lifetime/src/main/java/com/wanbaohe/lifetime/ai/tool/LifetimeToolSupport.kt` and `feature/poem/src/main/java/com/wanbaohe/poem/ai/tool/PoemToolSupport.kt` as WHOLE FILES: 85% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 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 (10 lines × 4) libs/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:79— libs/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:79-88 | libs/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:142-151 | libs/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:201-210 | libs/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:229-238 — 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.
Duplicated block (10 lines × 4) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidErSubPipeline.kt:306— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidErSubPipeline.kt:306-315 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidErSubPipeline.kt:515-524 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlErdSubPipeline.kt:453-462 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlErdSubPipeline.kt:621-630 — before extracting anything, compare `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidErSubPipeline.kt` and `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlErdSubPipeline.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 144 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.
X17 · Uncapped recursion over a caller-supplied document· Recursive walk over a caller-supplied document has no depth cap · ×5
Recursive walk over a caller-supplied document has no depth cap core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/parser/SchemaToIrMapper.kt:100— `SchemaToIrMapper.mapNode` is public and takes `node: JsonObject` from its caller, and it calls itself at line 100 with a piece of `node` — the function is not `tailrec`, so every call is a real frame — and nowhere in `SchemaToIrMapper.mapNode` 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 `SchemaToIrMapper.mapNode` 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 core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/parser/SchemaToIrMapper.kt:156— `SchemaToIrMapper.mapAction` is public and takes `action: JsonObject` from its caller, and it calls itself at line 156 with a piece of `action` (and at line 157, line 158) — the function is not `tailrec`, so every call is a real frame — and nowhere in `SchemaToIrMapper.mapAction` 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 `SchemaToIrMapper.mapAction` 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 core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/parser/SchemaToIrMapper.kt:188— `SchemaToIrMapper.mapNode` is public, takes a document from its caller (line 68) and hands it to `SchemaToIrMapper.jsonElementToPropValue`, which calls itself at line 188 with a piece of `el` (and at line 193) — the function is not `tailrec`, so every call is a real frame — and nowhere in `SchemaToIrMapper.jsonElementToPropValue` 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 `SchemaToIrMapper.jsonElementToPropValue` 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 core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/parser/SchemaToIrMapper.kt:205— `SchemaToIrMapper.map` is public, takes a document from its caller (line 57) and hands it to `SchemaToIrMapper.jsonElementToAny`, which calls itself at line 205 with a piece of `el` (and at line 206) — the function is not `tailrec`, so every call is a real frame — and nowhere in `SchemaToIrMapper.jsonElementToAny` 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 `SchemaToIrMapper.jsonElementToAny` 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 core/base/src/main/java/com/shifenmiao/base/utils/MapUtils.kt:62— `MapUtils.flattenParams` is public, takes a document from its caller (line 48) and hands it to `MapUtils.flatten`, which calls itself at line 62 with a piece of `params` — the function is not `tailrec`, so every call is a real frame — and nowhere in `MapUtils.flatten` 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 `MapUtils.flatten` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack or a `DeepRecursiveFunction`.
D4 · Code Duplication· Edited copy of a member (37 corresponding lines) · ×4
Edited copy of a member (37 corresponding lines) core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/DynamicUi.kt:119— core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/DynamicUi.kt:119-196 | core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/DynamicUi.kt:211-259 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (37 corresponding lines) libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:112— libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:112-150 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:278-314 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (37 corresponding lines) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassCustomSlider.kt:323— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassCustomSlider.kt:323-359 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassCustomSlider.kt:375-415 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (37 corresponding lines) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassCustomSlider.kt:262— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassCustomSlider.kt:262-307 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/sliders/custom_slider/CustomSliderDefaults.kt:164-200 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Members sharing a duplicated core (6 members, 50+ identical tokens) · ×4
Members sharing a duplicated core (6 members, 50+ identical tokens) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SideFadeRelativeItem.kt:55— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SideFadeRelativeItem.kt:55-108 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/NumberBlurEdgeModePairItem.kt:50-86 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/NumberBooleanPairItem.kt:49-98 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/NumberMirrorSidePairItem.kt:50-86 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/NumberTransferFuncPairItem.kt:50-86 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberTransferFuncBlurEdgeModeTripleItem.kt:53-103 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
Members sharing a duplicated core (6 members, 50+ identical tokens) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/FloatColorModelPairItem.kt:54— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/FloatColorModelPairItem.kt:54-99 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/FloatFileModelPairItem.kt:64-128 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/FloatImageModelPairItem.kt:52-90 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/FloatPaletteImageModelTripleItem.kt:63-157 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberColorModelColorModelTripleItem.kt:57-135 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberColorModelPopArtTripleItem.kt:61-149 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
Members sharing a duplicated core (6 members, 50+ identical tokens) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessEmptyQuickPanel.kt:73— feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessEmptyQuickPanel.kt:73-203 | feature/chess/src/main/java/com/wanbaohe/chess/screen/NewGameDropMenu.kt:82-317 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuEmptyQuickPanel.kt:73-203 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/NewGameDropMenu.kt:85-319 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/NewGameDropMenu.kt:82-315 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiEmptyQuickPanel.kt:73-203 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
Members sharing a duplicated core (6 members, 50+ identical tokens) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlActivitySubPipeline.kt:802— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlActivitySubPipeline.kt:802-844 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:1047-1070 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlDeploymentSubPipeline.kt:686-708 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlObjectSubPipeline.kt:421-438 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlStateSubPipeline.kt:416-441 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlUsecaseSubPipeline.kt:557-611 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication· Edited copy of a member (35 corresponding lines) · ×4
Edited copy of a member (35 corresponding lines) core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:283— core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:283-317 | core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:320-368 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (35 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:603— feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:603-644 | feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIPromptComponent.kt:638-672 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (35 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/utils/AiUtils.kt:287— feature/ai/src/main/java/com/shifenmiao/ai/utils/AiUtils.kt:287-321 | feature/ai/src/main/java/com/shifenmiao/ai/utils/AiUtils.kt:549-585 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (35 corresponding lines) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/dialogs/LoadingDialog.kt:135— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/dialogs/LoadingDialog.kt:135-180 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/dialogs/LoadingDialog.kt:190-224 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (54 corresponding lines) · ×4
Edited copy of a member (54 corresponding lines) feature/ocr-document/src/main/java/com/shifenmiao/feature/document/component/DocConvertTaskListComponent.kt:101— feature/ocr-document/src/main/java/com/shifenmiao/feature/document/component/DocConvertTaskListComponent.kt:101-156 | feature/ocr-document/src/main/java/com/shifenmiao/feature/document/component/OcrTaskListComponent.kt:92-145 — These two members are one piece of code written twice and then edited apart: 54 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (54 corresponding lines) feature/markdown-edit/src/main/java/com/wanbaohe/markdown/edit/dialogs/ImageInsertDialog.kt:56— feature/markdown-edit/src/main/java/com/wanbaohe/markdown/edit/dialogs/ImageInsertDialog.kt:56-127 | feature/markdown-edit/src/main/java/com/wanbaohe/markdown/edit/dialogs/LinkInsertDialog.kt:56-109 — These two members are one piece of code written twice and then edited apart: 54 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (54 corresponding lines) feature/markdown-edit/src/main/java/com/wanbaohe/markdown/edit/component/MarkdownEditorComponent.kt:318— feature/markdown-edit/src/main/java/com/wanbaohe/markdown/edit/component/MarkdownEditorComponent.kt:318-375 | feature/markdown-edit/src/main/java/com/wanbaohe/markdown/edit/component/MarkdownEditorComponent.kt:386-439 — These two members are one piece of code written twice and then edited apart: 54 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (54 corresponding lines) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/screenLogic/FiltersComponent.kt:655— feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/screenLogic/FiltersComponent.kt:655-708 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/screenLogic/FiltersComponent.kt:712-773 — These two members are one piece of code written twice and then edited apart: 54 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (45 corresponding lines) · ×4
Edited copy of a member (45 corresponding lines) feature/marktodo/src/main/java/com/shifenmiao/marktodo/screenLogic/CategoryDetailComponent.kt:207— feature/marktodo/src/main/java/com/shifenmiao/marktodo/screenLogic/CategoryDetailComponent.kt:207-252 | feature/marktodo/src/main/java/com/shifenmiao/marktodo/screenLogic/MarkTodoComponent.kt:287-331 — These two members are one piece of code written twice and then edited apart: 45 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (45 corresponding lines) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/text/RoundedTextField.kt:95— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/text/RoundedTextField.kt:95-139 | feature/app/src/main/java/com/wanbaohe/app/components/RoundedTextField.kt:71-115 — These two members are one piece of code written twice and then edited apart: 45 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (45 corresponding lines) feature/common/src/main/java/com/shifenmiao/common/backup/BackupCenterScreen.kt:268— feature/common/src/main/java/com/shifenmiao/common/backup/BackupCenterScreen.kt:268-314 | feature/common/src/main/java/com/shifenmiao/common/backup/BackupCenterScreen.kt:321-365 — These two members are one piece of code written twice and then edited apart: 45 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (45 corresponding lines) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/data/AndroidApngConverter.kt:96— feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/data/AndroidApngConverter.kt:96-146 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/data/AndroidWebpConverter.kt:83-127 — These two members are one piece of code written twice and then edited apart: 45 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 28+ corresponding lines) · ×4
Edited copies of one member (3 members, 28+ corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageChessTool.kt:228— feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageChessTool.kt:228-255 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageGomokuTool.kt:228-255 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageXiangqiTool.kt:228-255 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 28 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 28+ corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageChessTool.kt:330— feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageChessTool.kt:330-357 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageGomokuTool.kt:330-357 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageXiangqiTool.kt:327-354 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 28 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 28+ corresponding lines) feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeAddCountdownScreen.kt:69— feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeAddCountdownScreen.kt:69-96 | feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeAddEventScreen.kt:75-102 | feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeAddMilestoneScreen.kt:66-93 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 28 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 28+ corresponding lines) feature/document-scanner/src/main/java/com/t8rin/imagetoolbox/feature/document_scanner/presentation/screenLogic/DocumentScannerComponent.kt:238— feature/document-scanner/src/main/java/com/t8rin/imagetoolbox/feature/document_scanner/presentation/screenLogic/DocumentScannerComponent.kt:238-265 | feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/screenLogic/FormatConversionComponent.kt:340-369 | feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/screenLogic/ImageCutterComponent.kt:214-241 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 28 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 26+ corresponding lines) · ×4
Edited copies of one member (3 members, 26+ corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageDecisionWheelTool.kt:131— feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageDecisionWheelTool.kt:131-157 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageDecisionWheelTool.kt:159-187 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageDecisionWheelTool.kt:189-214 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 26 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 26+ corresponding lines) libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1188— libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1188-1221 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1514-1539 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1709-1734 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 26 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 26+ corresponding lines) feature/marquee/src/main/java/com/shifenmiao/marquee/screen/components/ModeSettingsPanel.kt:212— feature/marquee/src/main/java/com/shifenmiao/marquee/screen/components/ModeSettingsPanel.kt:212-241 | feature/marquee/src/main/java/com/shifenmiao/marquee/screen/components/ModeSettingsPanel.kt:247-272 | feature/marquee/src/main/java/com/shifenmiao/marquee/screen/components/ModeSettingsPanel.kt:502-527 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 26 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 26+ corresponding lines) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/FormatExifWarning.kt:52— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/FormatExifWarning.kt:52-77 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/IcoSizeWarning.kt:52-82 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/OOMWarning.kt:49-74 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 26 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 20+ corresponding lines) · ×4
Edited copies of one member (3 members, 20+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt:205— feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt:205-224 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/router/screenLogic/GomokuRouterComponent.kt:202-222 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/router/screenLogic/XiangqiRouterComponent.kt:230-249 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 20+ corresponding lines) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/EdgeModeSelector.kt:44— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/EdgeModeSelector.kt:44-63 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/MirrorSideSelector.kt:45-65 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/TransferFuncSelector.kt:45-65 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 20+ corresponding lines) feature/login/src/main/java/com/shifenmiao/login/viewModel/LoginComponent.kt:528— feature/login/src/main/java/com/shifenmiao/login/viewModel/LoginComponent.kt:528-552 | feature/login/src/main/java/com/shifenmiao/login/viewModel/LoginComponent.kt:579-602 | feature/login/src/main/java/com/shifenmiao/login/viewModel/LoginComponent.kt:1365-1384 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 20+ corresponding lines) libs/cropper/src/main/java/com/t8rin/cropper/draw/Overlay.kt:181— libs/cropper/src/main/java/com/t8rin/cropper/draw/Overlay.kt:181-200 | libs/cropper/src/main/java/com/t8rin/cropper/draw/Overlay.kt:218-237 | libs/cropper/src/main/java/com/t8rin/cropper/draw/Overlay.kt:255-274 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 8+ corresponding lines) · ×4
Edited copies of one member (3 members, 8+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ManageGameUseCase.kt:309— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ManageGameUseCase.kt:309-318 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/ManageGameUseCase.kt:100-108 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/ManageGameUseCase.kt:99-106 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 8+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt:735— feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt:735-742 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/router/screenLogic/GomokuRouterComponent.kt:688-695 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/router/screenLogic/XiangqiRouterComponent.kt:703-710 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 8+ corresponding lines) feature/common/src/main/java/com/shifenmiao/common/sync/ItemSyncManager.kt:214— feature/common/src/main/java/com/shifenmiao/common/sync/ItemSyncManager.kt:214-221 | feature/common/src/main/java/com/shifenmiao/common/sync/ManualRefreshPolicy.kt:44-51 | feature/common/src/main/java/com/shifenmiao/common/sync/SyncIntervalPolicy.kt:42-49 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 8+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/service/ChessServiceImpl.kt:103— feature/chess/src/main/java/com/wanbaohe/chess/service/ChessServiceImpl.kt:103-110 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/service/GomokuServiceImpl.kt:103-110 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/service/XiangqiServiceImpl.kt:96-103 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 16+ corresponding lines) · ×4
Edited copies of one member (3 members, 16+ corresponding lines) feature/common/src/main/java/com/shifenmiao/common/file/AigcFileMetadataReader.kt:198— feature/common/src/main/java/com/shifenmiao/common/file/AigcFileMetadataReader.kt:198-213 | feature/common/src/main/java/com/shifenmiao/common/file/AigcFileMetadataWriter.kt:282-297 | feature/common/src/main/java/com/shifenmiao/common/file/AigcFileMetadataWriter.kt:303-318 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 16+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt:133— feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt:133-148 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/OnlineMatchScreen.kt:133-148 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/OnlineMatchScreen.kt:133-148 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 16+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/OnlinePlayUseCase.kt:465— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/OnlinePlayUseCase.kt:465-483 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/OnlinePlayUseCase.kt:523-541 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/OnlinePlayUseCase.kt:385-400 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 16+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/service/ChessServiceImpl.kt:112— feature/chess/src/main/java/com/wanbaohe/chess/service/ChessServiceImpl.kt:112-127 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/service/GomokuServiceImpl.kt:112-127 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/service/XiangqiServiceImpl.kt:105-120 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 1+ corresponding lines) · ×4
Edited copies of one member (3 members, 1+ corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidErSubPipeline.kt:581— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidErSubPipeline.kt:581-585 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlErdSubPipeline.kt:667-667 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlObjectSubPipeline.kt:358-362 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 1 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 1+ corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/cache/Quadtree.kt:115— libs/diagram/src/upstream/java/com/hrm/diagram/render/cache/Quadtree.kt:115-115 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlArchimateSubPipeline.kt:434-434 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlC4SubPipeline.kt:521-521 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 1 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 1+ corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidArchitectureSubPipeline.kt:457— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidArchitectureSubPipeline.kt:457-457 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidC4SubPipeline.kt:597-597 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidErSubPipeline.kt:151-151 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 1 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 1+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:1065— feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:1065-1066 | feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessGameScreen.kt:495-495 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiGameComponent.kt:998-1001 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 1 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Duplicated block (31 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedRangeSliderItem.kt:325— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedRangeSliderItem.kt:325-355 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedSliderItem.kt:302-332 — before extracting anything, compare `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedRangeSliderItem.kt` and `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedSliderItem.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 136 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedRangeSliderItem.kt:325` 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 (31 lines × 2) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/DrawLineStyleSelector.kt:402— feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/DrawLineStyleSelector.kt:402-432 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/DrawModeSelector.kt:183-213 — before extracting anything, compare `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/DrawLineStyleSelector.kt` and `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/DrawModeSelector.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 72 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 `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/DrawLineStyleSelector.kt:402` 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 (31 lines × 2) feature/webview/src/main/java/com/shifenmiao/webview/browser/BrowserSettingsPage.kt:410— feature/webview/src/main/java/com/shifenmiao/webview/browser/BrowserSettingsPage.kt:410-440 | feature/webview/src/main/java/com/shifenmiao/webview/browser/BrowserSettingsPage.kt:461-491 — 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/webview/src/main/java/com/shifenmiao/webview/browser/BrowserSettingsPage.kt:410` 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, `feature/webview/src/main/java/com/shifenmiao/webview/browser/BrowserSettingsPage.kt:409` calls `onClick` and `feature/webview/src/main/java/com/shifenmiao/webview/browser/BrowserSettingsPage.kt:460` 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 (31 lines × 2) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/Pixelate.kt:193— feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/Pixelate.kt:193-223 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/PixelationTool.kt:153-183 — before extracting anything, compare `feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/Pixelate.kt` and `feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/PixelationTool.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 57 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 (29 lines × 2) core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:690— core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:690-718 | core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:733-761 — 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 `core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:690` 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) core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDatePickerDialog.kt:501— core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDatePickerDialog.kt:501-529 | core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDateRangePickerDialog.kt:406-434 — before extracting anything, compare `core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDatePickerDialog.kt` and `core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDateRangePickerDialog.kt` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 147 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 (29 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedRangeSliderItem.kt:138— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedRangeSliderItem.kt:138-166 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedSliderItem.kt:137-165 — before extracting anything, compare `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedRangeSliderItem.kt` and `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedSliderItem.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 136 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedRangeSliderItem.kt:138` 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) feature/settings/src/main/java/com/wanbaohe/setting/display/screen/DisplaySettingsScreen.kt:785— feature/settings/src/main/java/com/wanbaohe/setting/display/screen/DisplaySettingsScreen.kt:785-813 | feature/settings/src/main/java/com/wanbaohe/setting/display/screen/DisplaySettingsScreen.kt:858-886 — 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/settings/src/main/java/com/wanbaohe/setting/display/screen/DisplaySettingsScreen.kt:785` 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 (27 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt:243— feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt:243-269 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuAnalysisScreen.kt:248-274 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiAnalysisScreen.kt:243-269 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuAnalysisScreen.kt` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 187 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 `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt:243` 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 (27 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt:104— feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt:104-130 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/OnlineMatchScreen.kt:104-130 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/OnlineMatchScreen.kt:104-130 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/OnlineMatchScreen.kt` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 428 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 (27 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt:363— feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt:363-389 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/OnlineMatchScreen.kt:363-389 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/OnlineMatchScreen.kt:363-389 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/OnlineMatchScreen.kt` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 428 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 (27 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt:721— feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt:721-747 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/OnlineMatchScreen.kt:721-747 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/OnlineMatchScreen.kt:721-747 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/OnlineMatchScreen.kt` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 428 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 `feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt:721` 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: `RoomInfo` names `com.wanbaohe.chess.application.port.outbound.RoomInfo` in one and `com.wanbaohe.gomoku.application.port.outbound.RoomInfo` 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 (25–26 lines × 2) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberColorModelColorModelTripleItem.kt:82— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberColorModelColorModelTripleItem.kt:82-106 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberColorModelPopArtTripleItem.kt:86-111 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberColorModelColorModelTripleItem.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberColorModelPopArtTripleItem.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 57 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 `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberColorModelColorModelTripleItem.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. 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 (25–26 lines × 2) feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:147— feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:147-171 | feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt:138-163 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 625 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `component` to `CreateAIAgentComponent` in one and `CreateAIPromptComponent` 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 (25–26 lines × 2) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/components/LayersFloatingPanel.kt:186— feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/components/LayersFloatingPanel.kt:186-210 | feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/components/LayersSheet.kt:217-242 — 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 `feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/components/LayersFloatingPanel.kt:186` 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 (25–26 lines × 2) feature/code-editor/src/main/java/com/wanbaohe/code/editor/webview/CodeEditorPreloadConfig.kt:48— feature/code-editor/src/main/java/com/wanbaohe/code/editor/webview/CodeEditorPreloadConfig.kt:48-73 | feature/markdown-edit/src/main/java/com/wanbaohe/markdown/edit/webview/MarkdownPreloadConfig.kt:59-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 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 (21–22 lines × 2) feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:845— feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:845-866 | feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt:804-824 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 625 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 `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:845` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (21–22 lines × 2) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/DrawLineStyleSelector.kt:125— feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/DrawLineStyleSelector.kt:125-145 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/DrawModeSelector.kt:112-133 — before extracting anything, compare `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/DrawLineStyleSelector.kt` and `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/DrawModeSelector.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 72 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 `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/DrawLineStyleSelector.kt:125` 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 (21–22 lines × 2) feature/login/src/main/java/com/shifenmiao/login/ui/LoginBody.kt:178— feature/login/src/main/java/com/shifenmiao/login/ui/LoginBody.kt:178-198 | feature/login/src/main/java/com/shifenmiao/login/ui/LoginBody.kt:240-261 — 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/login/src/main/java/com/shifenmiao/login/ui/LoginBody.kt:178` 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 (21–22 lines × 2) feature/pick-color/src/main/java/com/t8rin/imagetoolbox/feature/pick_color/presentation/components/PickColorEmptyContent.kt:270— feature/pick-color/src/main/java/com/t8rin/imagetoolbox/feature/pick_color/presentation/components/PickColorEmptyContent.kt:270-290 | feature/pick-color/src/main/java/com/t8rin/imagetoolbox/feature/pick_color/presentation/components/PickColorHistoryContent.kt:277-298 — 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 `feature/pick-color/src/main/java/com/t8rin/imagetoolbox/feature/pick_color/presentation/components/PickColorEmptyContent.kt:270` 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, `feature/pick-color/src/main/java/com/t8rin/imagetoolbox/feature/pick_color/presentation/components/PickColorHistoryContent.kt:276` calls `onSelect` and `feature/pick-color/src/main/java/com/t8rin/imagetoolbox/feature/pick_color/presentation/components/PickColorEmptyContent.kt:270` 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 (20 lines × 3) feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageChessTool.kt:197— feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageChessTool.kt:197-216 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageGomokuTool.kt:197-216 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageXiangqiTool.kt:197-216 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageChessTool.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageGomokuTool.kt` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 137 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 `feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageChessTool.kt:197` 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 (20 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ExportGameUseCase.kt:107— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ExportGameUseCase.kt:107-126 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/ExportGameUseCase.kt:115-134 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/ExportGameUseCase.kt:101-120 — 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 `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ExportGameUseCase.kt:107` 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 (20 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt:358— feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt:358-377 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuAnalysisScreen.kt:368-387 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiAnalysisScreen.kt:360-379 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuAnalysisScreen.kt` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 187 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 `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt:358` 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 (20 lines × 3) feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeAddCountdownScreen.kt:70— feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeAddCountdownScreen.kt:70-89 | feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeAddEventScreen.kt:76-95 | feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeAddMilestoneScreen.kt:67-86 — before extracting anything, compare `feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeAddCountdownScreen.kt` and `feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeAddEventScreen.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 84 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `component` to `LifeTimeAddCountdownComponent` in one and `LifeTimeAddEventComponent` 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) core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/UriUtils.kt:53— core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/UriUtils.kt:53-61 | core/utils/src/main/java/com/t8rin/imagetoolbox/core/utils/UriUtils.kt:66-73 — before extracting anything, compare `core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/UriUtils.kt` and `core/utils/src/main/java/com/t8rin/imagetoolbox/core/utils/UriUtils.kt` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 61 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/UriUtils.kt:53` 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–9 lines × 2) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/utils/PathHelper.kt:278— feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/utils/PathHelper.kt:278-285 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/utils/PathHelper.kt:294-302 — 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/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/utils/PathHelper.kt:278` 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–9 lines × 2) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupProjectStore.kt:362— feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupProjectStore.kt:362-370 | feature/text-card/src/main/java/com/wanbaohe/textcard/data/project/AndroidTextCardProjectStore.kt:290-297 — before extracting anything, compare `feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupProjectStore.kt` and `feature/text-card/src/main/java/com/wanbaohe/textcard/data/project/AndroidTextCardProjectStore.kt` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 256 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 `feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupProjectStore.kt:362` 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) libs/opencv-tools/src/main/java/com/t8rin/opencv_tools/moire/Moire.kt:100— libs/opencv-tools/src/main/java/com/t8rin/opencv_tools/moire/Moire.kt:100-108 | libs/opencv-tools/src/main/java/com/t8rin/opencv_tools/moire/Moire.kt:208-215 — 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–8 lines × 2) feature/ai/src/main/java/com/shifenmiao/ai/ui/FullScreenChatInputSheet.kt:188— feature/ai/src/main/java/com/shifenmiao/ai/ui/FullScreenChatInputSheet.kt:188-195 | feature/ai/src/main/java/com/shifenmiao/ai/ui/FullScreenChatInputSheet.kt:262-268 — 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/ai/src/main/java/com/shifenmiao/ai/ui/FullScreenChatInputSheet.kt:188` 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 (7–8 lines × 2) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/editor/EditorScaffold.kt:1435— feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/editor/EditorScaffold.kt:1435-1442 | feature/watermarking/src/main/java/com/shifenmiao/app/watermarking/presentation/canvas/WatermarkCanvas.kt:271-277 — 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 `feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/editor/EditorScaffold.kt:1435` 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 (7–8 lines × 2) feature/text-card/src/main/java/com/wanbaohe/textcard/domain/model/SourceTextEditing.kt:34— feature/text-card/src/main/java/com/wanbaohe/textcard/domain/model/SourceTextEditing.kt:34-40 | feature/text-card/src/main/java/com/wanbaohe/textcard/domain/model/SourceTextEditing.kt:43-50 — 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/text-card/src/main/java/com/wanbaohe/textcard/domain/model/SourceTextEditing.kt:43` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7–8 lines × 2) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidErSubPipeline.kt:131— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidErSubPipeline.kt:131-137 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlErdSubPipeline.kt:105-112 — before extracting anything, compare `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidErSubPipeline.kt` and `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlErdSubPipeline.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 144 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 `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidErSubPipeline.kt:131` 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.
Outbound HTTP without resilience core/image-generation/src/overseas/java/com/shifenmiao/imagegeneration/di/OpenAiImageModule.kt:60— `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 core/tts/src/main/java/com/shifenmiao/tts/di/TTSModule.kt:74— `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 core/tts/src/main/java/com/shifenmiao/tts/di/TTSModule.kt:88— `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 core/tts/src/main/java/com/shifenmiao/tts/di/TTSModule.kt:102— `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.
AC6 · Visual & motion safety· Animation without a prefers-reduced-motion guard · ×3
Animation without a prefers-reduced-motion guard web/file_transfer/index.html:26— `.skeleton` moves (`animation: shimmer 1.5s infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard web/milkdown-editor/index.html:398— `.spinner` moves (`animation: spin 1s linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard web/milkdown-editor/index.html:460— `.dialog` moves (`transition: transform 0.2s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
OnlineMatchScreenKt.MatchContent (cyclomatic 30) feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt:151— OnlineMatchScreenKt.MatchContent has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
OnlineMatchScreenKt.MatchContent (cyclomatic 30) feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/OnlineMatchScreen.kt:151— OnlineMatchScreenKt.MatchContent has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
OnlineMatchScreenKt.MatchContent (cyclomatic 30) feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/OnlineMatchScreen.kt:151— OnlineMatchScreenKt.MatchContent has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
OnlineMatchScreenKt.MatchContent (cognitive 33) feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt:151— OnlineMatchScreenKt.MatchContent has cognitive complexity 33 (threshold 15). Drivers by points: if/else 20 (22 pts), boolean chains 7, match/switch 2 (3 pts), loops 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.
OnlineMatchScreenKt.MatchContent (cognitive 33) feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/OnlineMatchScreen.kt:151— OnlineMatchScreenKt.MatchContent has cognitive complexity 33 (threshold 15). Drivers by points: if/else 20 (22 pts), boolean chains 7, match/switch 2 (3 pts), loops 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.
OnlineMatchScreenKt.MatchContent (cognitive 33) feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/OnlineMatchScreen.kt:151— OnlineMatchScreenKt.MatchContent has cognitive complexity 33 (threshold 15). Drivers by points: if/else 20 (22 pts), boolean chains 7, match/switch 2 (3 pts), loops 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.
D4 · Code Duplication· Edited copy of a member (48 corresponding lines) · ×3
Edited copy of a member (48 corresponding lines) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/other/TopAppBarEmoji.kt:218— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/other/TopAppBarEmoji.kt:218-265 | feature/settings/src/main/java/com/wanbaohe/setting/display/screen/DisplaySettingsScreen.kt:259-335 — These two members are one piece of code written twice and then edited apart: 48 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (48 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/cloud/ReadCloudFileTool.kt:80— feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/cloud/ReadCloudFileTool.kt:80-127 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/cloud/SearchCloudFilesTool.kt:84-143 — These two members are one piece of code written twice and then edited apart: 48 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (48 corresponding lines) feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/screen/BookkeepingScreen.kt:59— feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/screen/BookkeepingScreen.kt:59-107 | feature/habit-tracker/src/main/java/com/wanbaohe/habittracker/screen/HabitMainScreen.kt:52-99 — These two members are one piece of code written twice and then edited apart: 48 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (56 corresponding lines) · ×3
Edited copy of a member (56 corresponding lines) feature/ocr-document/src/main/java/com/shifenmiao/feature/document/screen/DocConvertTaskListScreen.kt:375— feature/ocr-document/src/main/java/com/shifenmiao/feature/document/screen/DocConvertTaskListScreen.kt:375-430 | feature/ocr-document/src/main/java/com/shifenmiao/feature/document/screen/OcrTaskListScreen.kt:430-486 — These two members are one piece of code written twice and then edited apart: 56 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (56 corresponding lines) feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/components/GifToolsTopAppBarActions.kt:67— feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/components/GifToolsTopAppBarActions.kt:67-122 | feature/load-net-image/src/main/java/com/t8rin/imagetoolbox/feature/load_net_image/presentation/components/LoadNetImageTopAppBarActions.kt:68-131 — These two members are one piece of code written twice and then edited apart: 56 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (56 corresponding lines) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassAssistChip.kt:73— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassAssistChip.kt:73-130 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassAssistChip.kt:155-210 — These two members are one piece of code written twice and then edited apart: 56 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (46 corresponding lines) · ×3
Edited copy of a member (46 corresponding lines) feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/presentation/components/ImagePickerList.kt:128— feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/presentation/components/ImagePickerList.kt:128-175 | feature/common/src/main/java/com/shifenmiao/common/ui/ImagePickerList.kt:174-219 — These two members are one piece of code written twice and then edited apart: 46 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (46 corresponding lines) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/ArrowParamsSelector.kt:57— feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/ArrowParamsSelector.kt:57-104 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/RectParamsSelector.kt:58-103 — These two members are one piece of code written twice and then edited apart: 46 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (46 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/AddWatermarkTool.kt:210— feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/AddWatermarkTool.kt:210-264 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ConvertImageFormatTool.kt:164-209 — These two members are one piece of code written twice and then edited apart: 46 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 47+ corresponding lines) · ×3
Edited copies of one member (3 members, 47+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/data/EngineMoveChooser.kt:56— feature/chess/src/main/java/com/wanbaohe/chess/data/EngineMoveChooser.kt:56-109 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/EngineMoveChooser.kt:57-106 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/PikafishMoveChooser.kt:61-107 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 47 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 47+ corresponding lines) feature/lifetime/src/main/java/com/wanbaohe/lifetime/ai/tool/AddCountdownEventTool.kt:88— feature/lifetime/src/main/java/com/wanbaohe/lifetime/ai/tool/AddCountdownEventTool.kt:88-142 | feature/lifetime/src/main/java/com/wanbaohe/lifetime/ai/tool/AddLifeMilestoneTool.kt:88-142 | feature/schedule/src/main/java/com/wanbaohe/schedule/ai/tool/DeleteScheduleEventTool.kt:85-131 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 47 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 47+ corresponding lines) feature/app/src/main/java/com/wanbaohe/app/ui/VerifyContactSheet.kt:256— feature/app/src/main/java/com/wanbaohe/app/ui/VerifyContactSheet.kt:256-314 | feature/profile/src/main/java/com/wanbaohe/profile/screen/ChangePasswordSheet.kt:209-268 | feature/profile/src/main/java/com/wanbaohe/profile/screen/VerifyEmailSheet.kt:167-213 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 47 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 9+ corresponding lines) · ×3
Edited copies of one member (5 members, 9+ corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:592— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:592-601 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlDeploymentSubPipeline.kt:435-443 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlErdSubPipeline.kt:411-419 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlObjectSubPipeline.kt:470-478 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlUsecaseSubPipeline.kt:643-651 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
Edited copies of one member (5 members, 9+ corresponding lines) core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:222— core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:222-232 | core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:235-245 | core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:248-256 | core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:259-267 | core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:270-278 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
Edited copies of one member (5 members, 9+ corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlArchimateSubPipeline.kt:149— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlArchimateSubPipeline.kt:149-157 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlC4SubPipeline.kt:146-154 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlNetworkSubPipeline.kt:230-238 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlObjectSubPipeline.kt:158-166 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlUsecaseSubPipeline.kt:170-178 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 21+ corresponding lines) · ×3
Edited copies of one member (3 members, 21+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:711— feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:711-733 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuGameComponent.kt:787-807 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiGameComponent.kt:638-664 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 21 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 21+ corresponding lines) core/database/src/main/java/com/shifenmiao/database/activity/ActivityLogRecorder.kt:79— core/database/src/main/java/com/shifenmiao/database/activity/ActivityLogRecorder.kt:79-101 | core/database/src/main/java/com/shifenmiao/database/activity/ActivityLogRecorder.kt:115-136 | core/database/src/main/java/com/shifenmiao/database/activity/ActivityLogRecorder.kt:147-167 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 21 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 21+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessLibraryScreen.kt:58— feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessLibraryScreen.kt:58-78 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuLibraryScreen.kt:59-79 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiLibraryScreen.kt:88-108 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 21 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 23+ corresponding lines) · ×3
Edited copies of one member (3 members, 23+ corresponding lines) feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/screen/tab/StatsTab.kt:450— feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/screen/tab/StatsTab.kt:450-472 | feature/habit-tracker/src/main/java/com/wanbaohe/habittracker/screen/tab/StatsTab.kt:232-264 | feature/household-items/src/main/java/com/wanbaohe/householditems/screen/HouseholdStatsTab.kt:389-416 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 23 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 23+ corresponding lines) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/home/MarkupHomeContent.kt:276— feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/home/MarkupHomeContent.kt:276-298 | feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/home/MarkupHomeContent.kt:355-384 | feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/tools/crop/CropToolScreen.kt:905-929 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 23 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 23+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/data/ChessMoveFallback.kt:42— feature/chess/src/main/java/com/wanbaohe/chess/data/ChessMoveFallback.kt:42-64 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/GomokuMoveFallback.kt:45-67 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/HeuristicMoveFallback.kt:40-62 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 23 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 18+ corresponding lines) · ×3
Edited copies of one member (3 members, 18+ corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/theme/ThemeResolver.kt:210— libs/diagram/src/upstream/java/com/hrm/diagram/render/theme/ThemeResolver.kt:210-229 | libs/diagram/src/upstream/java/com/hrm/diagram/render/theme/ThemeResolver.kt:231-248 | libs/diagram/src/upstream/java/com/hrm/diagram/render/theme/ThemeResolver.kt:447-464 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 18+ corresponding lines) feature/base64-tools/src/main/java/com/t8rin/imagetoolbox/feature/base64_tools/presentation/screenLogic/Base64ToolsComponent.kt:102— feature/base64-tools/src/main/java/com/t8rin/imagetoolbox/feature/base64_tools/presentation/screenLogic/Base64ToolsComponent.kt:102-119 | feature/base64-tools/src/main/java/com/t8rin/imagetoolbox/feature/base64_tools/presentation/screenLogic/Base64ToolsComponent.kt:140-158 | feature/base64-tools/src/main/java/com/t8rin/imagetoolbox/feature/base64_tools/presentation/screenLogic/Base64ToolsComponent.kt:160-179 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 18+ corresponding lines) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/ColoredGlass.kt:50— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/ColoredGlass.kt:50-67 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/ColoredGlass.kt:82-99 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassModifier.kt:74-91 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 12+ corresponding lines) · ×3
Edited copies of one member (4 members, 12+ corresponding lines) feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/AliyunOssAdapter.kt:32— feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/AliyunOssAdapter.kt:32-46 | feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/AwsS3Adapter.kt:33-46 | feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/BaiduBosAdapter.kt:33-46 | feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/TencentCosAdapter.kt:32-43 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 12+ corresponding lines) feature/lifetime/src/main/java/com/shifenmiao/lifetime/ui/HourglassHeroCard.kt:592— feature/lifetime/src/main/java/com/shifenmiao/lifetime/ui/HourglassHeroCard.kt:592-603 | feature/lifetime/src/main/java/com/shifenmiao/lifetime/ui/HourglassHeroCard.kt:605-616 | feature/lifetime/src/main/java/com/shifenmiao/lifetime/ui/HourglassHeroCard.kt:618-629 | feature/lifetime/src/main/java/com/shifenmiao/lifetime/ui/HourglassHeroCard.kt:637-649 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 12+ corresponding lines) feature/dsh-client/src/main/java/com/wanbaohe/dsh/connection/Downlink.kt:364— feature/dsh-client/src/main/java/com/wanbaohe/dsh/connection/Downlink.kt:364-379 | feature/dsh-client/src/main/java/com/wanbaohe/dsh/connection/Downlink.kt:395-406 | feature/dsh-client/src/main/java/com/wanbaohe/dsh/connection/Downlink.kt:422-433 | feature/dsh-client/src/main/java/com/wanbaohe/dsh/connection/Downlink.kt:449-460 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 9+ corresponding lines) · ×3
Edited copies of one member (4 members, 9+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ImportGameUseCase.kt:108— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ImportGameUseCase.kt:108-116 | feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ImportGameUseCase.kt:127-138 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/ImportGameUseCase.kt:130-143 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/ImportGameUseCase.kt:89-100 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 9+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt:195— feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt:195-203 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/router/screenLogic/GomokuRouterComponent.kt:191-200 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/router/screenLogic/XiangqiRouterComponent.kt:219-228 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/router/screenLogic/XiangqiRouterComponent.kt:251-262 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 9+ corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/export/FamilyOneShotRenderers.kt:527— libs/diagram/src/upstream/java/com/hrm/diagram/render/export/FamilyOneShotRenderers.kt:527-535 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlClassSubPipeline.kt:335-343 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlClassSubPipeline.kt:345-353 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlSequenceSubPipeline.kt:354-362 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (1 corresponding lines) · ×3
Edited copy of a member (1 corresponding lines) core/domain/src/main/kotlin/com/t8rin/imagetoolbox/core/domain/model/QrType.kt:194— core/domain/src/main/kotlin/com/t8rin/imagetoolbox/core/domain/model/QrType.kt:194-194 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/content_pickers/ContactPicker.kt:273-273 — These two members are one piece of code written twice and then edited apart: 1 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (1 corresponding lines) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/sliders/custom_slider/CustomSliderUtils.kt:50— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/sliders/custom_slider/CustomSliderUtils.kt:50-50 | libs/cropper/src/main/java/com/t8rin/cropper/util/DimensionUtil.kt:61-61 — These two members are one piece of code written twice and then edited apart: 1 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (1 corresponding lines) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/domain/model/TextLayerRichText.kt:47— feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/domain/model/TextLayerRichText.kt:47-48 | feature/text-card/src/main/java/com/wanbaohe/textcard/domain/model/TextBlock.kt:166-166 — These two members are one piece of code written twice and then edited apart: 1 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (40 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/text/OutlinedText.kt:79— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/text/OutlinedText.kt:79-118 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/text/OutlinedText.kt:147-186 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/text/OutlinedText.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 (40 lines × 2) feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:982— feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:982-1021 | feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt:978-1017 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 625 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 `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:982` 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 (40 lines × 2) libs/cropper/src/main/java/com/t8rin/cropper/image/ImageWithConstraints.kt:172— libs/cropper/src/main/java/com/t8rin/cropper/image/ImageWithConstraints.kt:172-211 | libs/image/src/main/java/com/t8rin/image/ImageWithConstraints.kt:172-211 — before extracting anything, compare `libs/cropper/src/main/java/com/t8rin/cropper/image/ImageWithConstraints.kt` and `libs/image/src/main/java/com/t8rin/image/ImageWithConstraints.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 124 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: `Canvas` names `androidx.compose.foundation.Canvas` in one and `androidx.compose.ui.graphics.Canvas` 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 (33 lines × 2) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:198— feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:198-230 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt:198-230 — before extracting anything, compare `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt` and `feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 239 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 `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:198` 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: `Close` names `androidx.compose.material.icons.rounded.Close` in one and `com.t8rin.imagetoolbox.core.resources.icons.Close` 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 (33 lines × 2) feature/common/src/main/java/com/shifenmiao/common/components/category/CategoryManagementDialog.kt:211— feature/common/src/main/java/com/shifenmiao/common/components/category/CategoryManagementDialog.kt:211-243 | feature/common/src/main/java/com/shifenmiao/common/components/category/ReorderableScreen.kt:156-188 — 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 `feature/common/src/main/java/com/shifenmiao/common/components/category/CategoryManagementDialog.kt:211` 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 (33 lines × 2) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/data/utils/DrawRepeatedPath.kt:65— feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/data/utils/DrawRepeatedPath.kt:65-97 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/utils/DrawRepeatedPath.kt:64-96 — before extracting anything, compare `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/data/utils/DrawRepeatedPath.kt` and `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/utils/DrawRepeatedPath.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 (30–31 lines × 2) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/CreateGameUseCase.kt:121— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/CreateGameUseCase.kt:121-150 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/CreateGameUseCase.kt:128-158 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/CreateGameUseCase.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/CreateGameUseCase.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 71 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 `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/CreateGameUseCase.kt:121` 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. Note first that the copies are not typed on the same thing: `GameAiPlayerConfig` names `com.wanbaohe.chess.application.dto.GameAiPlayerConfig` in one and `com.wanbaohe.gomoku.application.dto.GameAiPlayerConfig` 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 (30–31 lines × 2) feature/markdown-edit/src/main/java/com/wanbaohe/markdown/edit/component/MarkdownEditorComponent.kt:346— feature/markdown-edit/src/main/java/com/wanbaohe/markdown/edit/component/MarkdownEditorComponent.kt:346-375 | feature/markdown-edit/src/main/java/com/wanbaohe/markdown/edit/component/MarkdownEditorComponent.kt:409-439 — 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/markdown-edit/src/main/java/com/wanbaohe/markdown/edit/component/MarkdownEditorComponent.kt:346` 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 (30–31 lines × 2) feature/zip/src/main/java/com/t8rin/imagetoolbox/feature/zip/presentation/components/ZipArchiveList.kt:238— feature/zip/src/main/java/com/t8rin/imagetoolbox/feature/zip/presentation/components/ZipArchiveList.kt:238-267 | feature/zip/src/main/java/com/t8rin/imagetoolbox/feature/zip/presentation/components/ZipSourceList.kt:276-306 — 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 `feature/zip/src/main/java/com/t8rin/imagetoolbox/feature/zip/presentation/components/ZipArchiveList.kt:238` 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, `feature/zip/src/main/java/com/t8rin/imagetoolbox/feature/zip/presentation/components/ZipArchiveList.kt:237` calls `clickable`, `padding` and `feature/zip/src/main/java/com/t8rin/imagetoolbox/feature/zip/presentation/components/ZipSourceList.kt:276` 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) feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:424— feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:424-453 | feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt:412-441 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 625 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 `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:424` 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 (30 lines × 2) feature/measurement/src/main/java/com/wanbaohe/measurement/screen/MeasurementScreen.kt:577— feature/measurement/src/main/java/com/wanbaohe/measurement/screen/MeasurementScreen.kt:577-606 | feature/measurement/src/main/java/com/wanbaohe/measurement/screen/MeasurementScreen.kt:688-717 — 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/measurement/src/main/java/com/wanbaohe/measurement/screen/MeasurementScreen.kt:577` 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 (30 lines × 2) feature/ocr-document/src/main/java/com/shifenmiao/feature/document/screen/DocConvertTaskListScreen.kt:137— feature/ocr-document/src/main/java/com/shifenmiao/feature/document/screen/DocConvertTaskListScreen.kt:137-166 | feature/ocr-document/src/main/java/com/shifenmiao/feature/document/screen/OcrTaskListScreen.kt:145-174 — before extracting anything, compare `feature/ocr-document/src/main/java/com/shifenmiao/feature/document/screen/DocConvertTaskListScreen.kt` and `feature/ocr-document/src/main/java/com/shifenmiao/feature/document/screen/OcrTaskListScreen.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 81 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 `feature/ocr-document/src/main/java/com/shifenmiao/feature/document/screen/DocConvertTaskListScreen.kt:137` 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: the declarations holding them bind `component` to `DocConvertTaskListComponent` in one and `OcrTaskListComponent` 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) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SideFadeRelativeItem.kt:64— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SideFadeRelativeItem.kt:64-88 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberTransferFuncBlurEdgeModeTripleItem.kt:65-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. Read the line range as the matched WINDOW rather than a finished unit: at `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SideFadeRelativeItem.kt:64` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (24–25 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/color_picker/ColorSelectionRow.kt:139— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/color_picker/ColorSelectionRow.kt:139-162 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/color_picker/ColorSelectionRow.kt:237-261 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/color_picker/ColorSelectionRow.kt:139` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (24–25 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/text/RoundedTextField.kt:112— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/text/RoundedTextField.kt:112-135 | feature/app/src/main/java/com/wanbaohe/app/components/RoundedTextField.kt:89-113 — 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 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 (23–24 lines × 2) core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDatePickerDialog.kt:427— core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDatePickerDialog.kt:427-450 | core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDateRangePickerDialog.kt:338-360 — before extracting anything, compare `core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDatePickerDialog.kt` and `core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDateRangePickerDialog.kt` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 147 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 `core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDatePickerDialog.kt:427` 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, `core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDatePickerDialog.kt:451` calls `Spacer`, `width` and `core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDateRangePickerDialog.kt:361` 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 (23–24 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/other/ToastHost.kt:265— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/other/ToastHost.kt:265-287 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/other/ToastHost.kt:329-352 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/other/ToastHost.kt:265` 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 (23–24 lines × 2) feature/marktodo/src/main/java/com/shifenmiao/marktodo/screen/MarkTodoScreen.kt:862— feature/marktodo/src/main/java/com/shifenmiao/marktodo/screen/MarkTodoScreen.kt:862-884 | feature/marktodo/src/main/java/com/shifenmiao/marktodo/screen/MarkTodoScreen.kt:892-915 — 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/marktodo/src/main/java/com/shifenmiao/marktodo/screen/MarkTodoScreen.kt:862` 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 (21 lines × 3) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/editor/EditorLayerBox.kt:244— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/editor/EditorLayerBox.kt:244-264 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/editor/EditorLayerBox.kt:304-324 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/editor/EditorLayerBox.kt:334-354 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/editor/EditorLayerBox.kt:244` 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 × 3) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessEmptyQuickPanel.kt:80— feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessEmptyQuickPanel.kt:80-100 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuEmptyQuickPanel.kt:80-100 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiEmptyQuickPanel.kt:80-100 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessEmptyQuickPanel.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuEmptyQuickPanel.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 72 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 `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessEmptyQuickPanel.kt:80` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (21 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt:571— feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt:571-591 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/OnlineMatchScreen.kt:571-591 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/OnlineMatchScreen.kt:571-591 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/OnlineMatchScreen.kt` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 428 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 `feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt:571` 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–19 lines × 2) core/database/src/main/java/com/shifenmiao/database/AppDatabase.kt:308— core/database/src/main/java/com/shifenmiao/database/AppDatabase.kt:308-326 | core/database/src/main/java/com/shifenmiao/database/FeatureDatabase.kt:416-432 — 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 `core/database/src/main/java/com/shifenmiao/database/AppDatabase.kt:308` 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 (17–19 lines × 2) feature/code-editor/src/main/java/com/wanbaohe/code/editor/screen/CodeEditorScreen.kt:415— feature/code-editor/src/main/java/com/wanbaohe/code/editor/screen/CodeEditorScreen.kt:415-431 | feature/markdown-edit/src/main/java/com/wanbaohe/markdown/edit/screen/MarkdownEditorScreen.kt:473-491 — before extracting anything, compare `feature/code-editor/src/main/java/com/wanbaohe/code/editor/screen/CodeEditorScreen.kt` and `feature/markdown-edit/src/main/java/com/wanbaohe/markdown/edit/screen/MarkdownEditorScreen.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 101 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 `feature/code-editor/src/main/java/com/wanbaohe/code/editor/screen/CodeEditorScreen.kt:415` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `feature/markdown-edit/src/main/java/com/wanbaohe/markdown/edit/screen/MarkdownEditorScreen.kt:495` calls `onGoBack` and `feature/code-editor/src/main/java/com/wanbaohe/code/editor/screen/CodeEditorScreen.kt:432` 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–19 lines × 2) feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/pdf_to_images/PdfToImagesScreen.kt:197— feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/pdf_to_images/PdfToImagesScreen.kt:197-215 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/split/SplitPdfToolContent.kt:178-194 — before extracting anything, compare `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/pdf_to_images/PdfToImagesScreen.kt` and `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/split/SplitPdfToolContent.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 117 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 `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/pdf_to_images/PdfToImagesScreen.kt:197` 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 × 4) feature/collage-maker/src/main/java/com/t8rin/imagetoolbox/collage_maker/presentation/CollageMakerContent.kt:627— feature/collage-maker/src/main/java/com/t8rin/imagetoolbox/collage_maker/presentation/CollageMakerContent.kt:627-644 | feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:253-269 | feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/presentation/components/GradientMakerBottomButtons.kt:82-99 | feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt:295-311 — before extracting anything, compare `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt` and `feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 57 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 `feature/collage-maker/src/main/java/com/t8rin/imagetoolbox/collage_maker/presentation/CollageMakerContent.kt:627` 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 (17–18 lines × 4) feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:244— feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:244-260 | feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/ImageCutterContent.kt:222-238 | feature/image-splitting/src/main/java/com/t8rin/imagetoolbox/image_splitting/presentation/ImageSplitterContent.kt:210-227 | feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt:286-302 — before extracting anything, compare `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt` and `feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/ImageCutterContent.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 71 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 `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:244` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt:285` calls `isNotEmpty` and `feature/image-splitting/src/main/java/com/t8rin/imagetoolbox/image_splitting/presentation/ImageSplitterContent.kt:209` 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 (17–18 lines × 4) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:630— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:630-647 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlDeploymentSubPipeline.kt:447-463 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlErdSubPipeline.kt:423-439 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlUsecaseSubPipeline.kt:654-671 — before extracting anything, compare `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt` and `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlDeploymentSubPipeline.kt` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 163 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 `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:630` 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–14 lines × 2) feature/markdown-edit/src/main/java/com/wanbaohe/markdown/edit/component/MarkdownEditorComponent.kt:600— feature/markdown-edit/src/main/java/com/wanbaohe/markdown/edit/component/MarkdownEditorComponent.kt:600-613 | feature/webview/src/main/java/com/shifenmiao/webview/utils/WebViewExportUtils.kt:58-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 `feature/markdown-edit/src/main/java/com/wanbaohe/markdown/edit/component/MarkdownEditorComponent.kt:600` 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 (12–14 lines × 2) feature/profile/src/main/java/com/wanbaohe/profile/ProfileScreen.kt:183— feature/profile/src/main/java/com/wanbaohe/profile/ProfileScreen.kt:183-196 | feature/profile/src/main/java/com/wanbaohe/profile/screen/UserInfoScreen.kt:464-475 — 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 `feature/profile/src/main/java/com/wanbaohe/profile/ProfileScreen.kt:183` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12–14 lines × 2) feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:216— feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:216-227 | feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/screenLogic/SingleEditComponent.kt:279-292 — before extracting anything, compare `feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt` and `feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/screenLogic/SingleEditComponent.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 108 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 `feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:216` 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 `bitmap` to `Bitmap ): Bitmap? = withContext(defaultDispatcher` in one and `Bitmap` 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 × 4) core/database/src/main/java/com/shifenmiao/database/activity/ActivityLogRecorder.kt:452— core/database/src/main/java/com/shifenmiao/database/activity/ActivityLogRecorder.kt:452-462 | core/database/src/main/java/com/shifenmiao/database/activity/ActivityLogRecorder.kt:503-513 | core/database/src/main/java/com/shifenmiao/database/activity/ActivityLogRecorder.kt:757-767 | core/database/src/main/java/com/shifenmiao/database/activity/ActivityLogRecorder.kt:806-816 — 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 `core/database/src/main/java/com/shifenmiao/database/activity/ActivityLogRecorder.kt:452` 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 × 4) feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageBookmarkTool.kt:249— feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageBookmarkTool.kt:249-259 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageChessTool.kt:171-181 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageGomokuTool.kt:171-181 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageXiangqiTool.kt:171-181 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageChessTool.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageGomokuTool.kt` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 137 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 `feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageBookmarkTool.kt:249` 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, `feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageChessTool.kt:184` calls `listOf`, `chessDeepLink` and `feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageBookmarkTool.kt:262` 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 × 4) core/weather/src/nonfoss/java/com/wanbaohe/core/weather/data/source/QWeatherDataSource.kt:104— core/weather/src/nonfoss/java/com/wanbaohe/core/weather/data/source/QWeatherDataSource.kt:104-114 | core/weather/src/nonfoss/java/com/wanbaohe/core/weather/data/source/QWeatherDataSource.kt:150-160 | core/weather/src/nonfoss/java/com/wanbaohe/core/weather/data/source/QWeatherDataSource.kt:196-206 | core/weather/src/nonfoss/java/com/wanbaohe/core/weather/data/source/QWeatherDataSource.kt:430-440 — 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 `core/weather/src/nonfoss/java/com/wanbaohe/core/weather/data/source/QWeatherDataSource.kt:104` 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 × 6) libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1378— libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1378-1385 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1391-1398 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1404-1411 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1445-1452 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1457-1464 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1469-1476 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (8 lines × 6) libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:762— libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:762-770 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:822-829 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:642-649 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:309-316 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:319-326 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:564-571 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt` as WHOLE FILES: this scan already matched 49 separate duplicated blocks between them, totalling at least 509 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 `libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:762` 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 × 6) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:347— feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:347-354 | feature/audio-cover-extractor/src/main/java/com/t8rin/imagetoolbox/feature/audio_cover_extractor/ui/screenLogic/AudioCoverExtractorComponent.kt:205-212 | feature/load-net-image/src/main/java/com/t8rin/imagetoolbox/feature/load_net_image/presentation/screenLogic/LoadNetImageComponent.kt:170-177 | feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:522-529 | feature/wallpapers-export/src/main/java/com/t8rin/imagetoolbox/feature/wallpapers_export/presentation/screenLogic/WallpapersExportComponent.kt:170-177 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/screenLogic/WebpToolsComponent.kt:339-346 — before extracting anything, compare `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt` and `feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/screenLogic/WebpToolsComponent.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 53 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–8 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ManageGameUseCase.kt:295— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ManageGameUseCase.kt:295-301 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/ManageGameUseCase.kt:87-94 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/ManageGameUseCase.kt:86-93 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ManageGameUseCase.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/ManageGameUseCase.kt` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 94 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 `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ManageGameUseCase.kt:295` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: `FenCodec` names `com.wanbaohe.chess.domain.FenCodec` in one and `com.wanbaohe.gomoku.domain.FenCodec` 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–8 lines × 3) feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/screenLogic/DeleteExifComponent.kt:116— feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/screenLogic/DeleteExifComponent.kt:116-123 | feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/screenLogic/LimitsResizeComponent.kt:154-160 | feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/screenLogic/WeightResizeComponent.kt:172-178 — before extracting anything, compare `feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/screenLogic/LimitsResizeComponent.kt` and `feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/screenLogic/WeightResizeComponent.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 43 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 `feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/screenLogic/DeleteExifComponent.kt:116` 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 (7–8 lines × 3) core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/LayoutComponents.kt:174— core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/LayoutComponents.kt:174-180 | core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/LayoutComponents.kt:206-212 | core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/LayoutComponents.kt:240-247 — 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 `core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/LayoutComponents.kt:174` 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 × 5) feature/ai-detect/src/main/java/com/wanbaohe/aidetect/screen/AiDetectScreen.kt:145— feature/ai-detect/src/main/java/com/wanbaohe/aidetect/screen/AiDetectScreen.kt:145-151 | feature/calendar/src/main/java/com/wanbaohe/calendar/router/CalendarRouterScreen.kt:116-122 | feature/password-vault/src/main/java/com/wanbaohe/passwordvault/router/PasswordVaultRouterScreen.kt:48-54 | feature/settings/src/main/java/com/wanbaohe/setting/ai/screen/AIPersonalizationScreen.kt:115-121 | feature/settings/src/main/java/com/wanbaohe/setting/ai/screen/AIServiceHubScreen.kt:167-173 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `feature/ai-detect/src/main/java/com/wanbaohe/aidetect/screen/AiDetectScreen.kt:145` 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 × 5) libs/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:74— libs/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:74-80 | libs/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:137-143 | libs/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:161-167 | libs/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:196-202 | libs/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:224-230 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (7 lines × 5) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidBlockSubPipeline.kt:376— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidBlockSubPipeline.kt:376-382 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlArchimateSubPipeline.kt:437-443 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlC4SubPipeline.kt:486-492 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlDitaaSubPipeline.kt:318-324 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlNetworkSubPipeline.kt:463-469 — 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 (6 lines × 4) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/MeshGradientBackground.kt:379— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/MeshGradientBackground.kt:379-384 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/MeshGradientBackground.kt:420-425 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/MeshGradientBackground.kt:428-433 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/MeshGradientBackground.kt:436-441 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/MeshGradientBackground.kt:379` 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 × 4) feature/color-tools/src/main/java/com/t8rin/imagetoolbox/color_tools/ai/tool/DeletePaletteTool.kt:135— feature/color-tools/src/main/java/com/t8rin/imagetoolbox/color_tools/ai/tool/DeletePaletteTool.kt:135-140 | feature/color-tools/src/main/java/com/t8rin/imagetoolbox/color_tools/ai/tool/GeneratePaletteTool.kt:125-130 | feature/color-tools/src/main/java/com/t8rin/imagetoolbox/color_tools/ai/tool/ListColorPalettesTool.kt:96-101 | feature/color-tools/src/main/java/com/t8rin/imagetoolbox/color_tools/ai/tool/SavePaletteTool.kt:181-186 — 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. 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 × 4) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/model/EqualizeHistogramAdaptiveHSLFilter.kt:39— feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/model/EqualizeHistogramAdaptiveHSLFilter.kt:39-44 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/model/EqualizeHistogramAdaptiveHSVFilter.kt:39-44 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/model/EqualizeHistogramAdaptiveLABFilter.kt:39-44 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/model/EqualizeHistogramAdaptiveLUVFilter.kt:39-44 — before extracting anything, compare `feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/model/EqualizeHistogramAdaptiveHSLFilter.kt` and `feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/model/EqualizeHistogramAdaptiveHSVFilter.kt` as WHOLE FILES: 89% 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/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/model/EqualizeHistogramAdaptiveHSLFilter.kt:39` 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 × 5) libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1744— libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1744-1748 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1786-1790 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1799-1803 | libs/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:109-113 | libs/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:123-127 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 221 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 5) libs/diagram/src/upstream/java/com/hrm/diagram/render/export/LaidOutDiagramExport.kt:217— libs/diagram/src/upstream/java/com/hrm/diagram/render/export/LaidOutDiagramExport.kt:217-221 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidBlockSubPipeline.kt:405-409 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidC4SubPipeline.kt:690-694 | libs/diagram/src/upstream/java/com/hrm/diagram/render/theme/DiagramThemeMaterial3.kt:157-161 | libs/diagram/src/upstream/java/com/hrm/diagram/render/theme/ThemeResolver.kt:898-902 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `libs/diagram/src/upstream/java/com/hrm/diagram/render/theme/ThemeResolver.kt:892` calls `paletteColorFill`, `withAlpha`, `paletteColorHeader` and `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidBlockSubPipeline.kt:403` 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 × 5) libs/diagram/src/upstream/java/com/hrm/diagram/render/family/PieEntityKeys.kt:21— libs/diagram/src/upstream/java/com/hrm/diagram/render/family/PieEntityKeys.kt:21-25 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlArchimateSubPipeline.kt:633-637 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlC4SubPipeline.kt:553-557 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlNetworkSubPipeline.kt:495-499 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlTimeSeriesSubPipeline.kt:576-580 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `libs/diagram/src/upstream/java/com/hrm/diagram/render/family/PieEntityKeys.kt:21` 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.
DM10 · One transaction, one aggregate· One operation mutates 2 aggregates · ×3
One operation mutates 2 aggregates: PlayMoveUseCase.commitInternal feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/PlayMoveUseCase.kt:95— `PlayMoveUseCase.commitInternal` saves `PlyEntity`, `GameEntity` 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: PlayMoveUseCase.commit feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/PlayMoveUseCase.kt:53— `PlayMoveUseCase.commit` saves `PlyEntity`, `GameEntity` 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: PlayMoveUseCase.commit feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/PlayMoveUseCase.kt:50— `PlayMoveUseCase.commit` saves `PlyEntity`, `GameEntity` 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.
Sync-over-async blocking feature/chess/src/main/java/com/wanbaohe/chess/data/AudioAdapter.kt:63— `playBeep` is async and calls Thread.sleep — a blocking call inside async code stalls the coroutine's thread, and every coroutine dispatched to it for as long as it runs.
Sync-over-async blocking feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/AudioAdapter.kt:63— `playBeep` is async and calls Thread.sleep — a blocking call inside async code stalls the coroutine's thread, and every coroutine dispatched to it for as long as it runs.
Sync-over-async blocking feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/AudioAdapter.kt:63— `playBeep` is async and calls Thread.sleep — a blocking call inside async code stalls the coroutine's thread, and every coroutine dispatched to it for as long as it runs.
SC1 · Supply-chain hygiene· JavaScript dependencies are not locked · ×3
JavaScript dependencies are not locked web/code-editor/package.json:10— web/code-editor/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / pnpm-lock.yaml / bun.lock beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
JavaScript dependencies are not locked web/milkdown-editor/package.json:10— web/milkdown-editor/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / pnpm-lock.yaml / bun.lock beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
JavaScript dependencies are not locked web/package.json:12— web/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / pnpm-lock.yaml / bun.lock beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
AC3 · Page structure· Data table has no header cells · ×2
Data table has no header cells web/file_viewer/src/prose-doc.js:1702— A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
Data table has no header cells web/file_viewer/src/prose-rtf.js:460— A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
AC4 · Keyboard semantics· Modal dialog does not manage focus · ×2
Modal dialog does not manage focus web/file_viewer/src/epub.html:32— This <div role="dialog"> is a modal dialog, but focus is moved into it, but nothing keeps it there: Tab walks out to the page behind, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close.
Modal dialog does not manage focus web/file_viewer/src/epub.html:43— This <div role="dialog"> is a modal dialog, but focus is moved into it, but nothing keeps it there: Tab walks out to the page behind, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close.
AC4 · Keyboard semantics· Anchor without href · ×2
Anchor without href web/file_viewer/src/prose-doc.js:1501— An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
Anchor without href web/file_viewer/src/prose-odt.js:872— An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
AC6 · Visual & motion safety· Focus outline removed in CSS without a · ×2
Focus outline removed in CSS without a :focus replacement web/milkdown-editor/index.html:175— `.milkdown` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement web/milkdown-editor/index.html:179— `.milkdown .editor` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
PointData.generateInterpolatedOffsets (cognitive 25) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/modifier/MeshGradient.kt:200— PointData.generateInterpolatedOffsets has cognitive complexity 25 (threshold 15). Drivers by points: loops 6 (13 pts), match/switch 2 (7 pts), if/else 3 (5 pts) (nesting depth added 14). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
PointData.generateInterpolatedOffsets (cognitive 25) feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/data/AndroidGradientMaker.kt:245— PointData.generateInterpolatedOffsets has cognitive complexity 25 (threshold 15). Drivers by points: loops 6 (13 pts), match/switch 2 (7 pts), if/else 3 (5 pts) (nesting depth added 14). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D4 · Code Duplication· Near-duplicate member family (5 members, 18 shared lines) · ×2
Near-duplicate member family (5 members, 18 shared lines) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ClaheParamsItem.kt:51— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ClaheParamsItem.kt:51-111 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/PinchParamsItem.kt:51-116 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/WaterParamsItem.kt:51-116 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/quad_components/NumberQuadItem.kt:51-111 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberTripleItem.kt:50-105 — These 5 members are variants of one another: a block of 18 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Near-duplicate member family (5 members, 18 shared lines) libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1020— libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1020-1051 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:649-682 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:425-467 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:238-276 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:278-314 — These 5 members are variants of one another: a block of 18 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication· Near-duplicate member family (4 members, 17 shared lines) · ×2
Near-duplicate member family (4 members, 17 shared lines) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:245— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:245-292 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:754-801 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:614-647 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:381-423 — These 4 members are variants of one another: a block of 17 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them 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.
Near-duplicate member family (4 members, 17 shared lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:1005— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:1005-1032 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlDeploymentSubPipeline.kt:644-671 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlObjectSubPipeline.kt:370-397 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlUsecaseSubPipeline.kt:510-534 — These 4 members are variants of one another: a block of 17 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them 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.
Near-duplicate member pair (130 shared lines) feature/code-editor/src/main/java/com/wanbaohe/code/editor/webview/WebViewCodeEditor.kt:78— feature/code-editor/src/main/java/com/wanbaohe/code/editor/webview/WebViewCodeEditor.kt:78-335 | feature/markdown-edit/src/main/java/com/wanbaohe/markdown/edit/webview/WebViewMarkdownEditor.kt:93-487 — These two members are variants of one another: 130 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 (130 shared lines) feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt:90— feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt:90-333 | feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/ImageStitchingContent.kt:87-315 — These two members are variants of one another: 130 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 (53 shared lines) core/data/src/main/java/com/t8rin/imagetoolbox/core/data/image/AndroidImageScaler.kt:190— core/data/src/main/java/com/t8rin/imagetoolbox/core/data/image/AndroidImageScaler.kt:190-252 | core/data/src/main/java/com/t8rin/imagetoolbox/core/data/image/AndroidImageScaler.kt:259-333 — These two members are variants of one another: 53 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 (53 shared lines) feature/file-transfer/src/main/java/com/wanbaohe/file_transfer/server/FileTransferServer.kt:832— feature/file-transfer/src/main/java/com/wanbaohe/file_transfer/server/FileTransferServer.kt:832-937 | feature/file-transfer/src/main/java/com/wanbaohe/file_transfer/server/FileTransferServer.kt:942-1053 — These two members are variants of one another: 53 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.
D4 · Code Duplication· Members sharing a duplicated core (14 members, 50+ identical tokens) · ×2
Members sharing a duplicated core (14 members, 50+ identical tokens) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassOutlinedTextField.kt:285— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassOutlinedTextField.kt:285-334 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassOutlinedTextField.kt:379-427 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassOutlinedTextField.kt:463-523 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassOutlinedTextField.kt:559-619 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassSegmentedButtonRow.kt:172-197 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassSegmentedButtonRow.kt:498-521 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/text/OutlinedText.kt:78-123 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/text/OutlinedText.kt:146-191 | feature/ai/src/main/java/com/shifenmiao/ai/screen/AIDuelChatScreen.kt:316-593 | feature/app/src/main/java/com/wanbaohe/app/components/RoundedTextField.kt:144-172 | feature/common/src/main/java/com/shifenmiao/common/ui/CreationMetaConfigSheet.kt:621-667 | feature/settings/src/main/java/com/wanbaohe/setting/ai/screen/AIEngineSettingsDetailScreen.kt:1193-1230 | libs/markdown/src/upstream/java/com/hrm/markdown/renderer/inline/InlineLayoutBlockText.kt:50-129 | libs/markdown/src/upstream/java/com/hrm/markdown/renderer/internal/layout/inline/InlineLayoutBlockSupport.kt:162-193 — These 14 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 14 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 14 times.
Members sharing a duplicated core (14 members, 50+ identical tokens) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidArchitectureSubPipeline.kt:354— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidArchitectureSubPipeline.kt:354-409 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidC4SubPipeline.kt:417-480 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidC4SubPipeline.kt:488-553 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidErSubPipeline.kt:180-288 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidRequirementSubPipeline.kt:117-218 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlActivitySubPipeline.kt:409-574 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlArchimateSubPipeline.kt:286-330 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlC4SubPipeline.kt:415-456 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:810-855 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlDeploymentSubPipeline.kt:466-511 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlErdSubPipeline.kt:142-236 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlNetworkSubPipeline.kt:401-436 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlObjectSubPipeline.kt:277-322 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlUsecaseSubPipeline.kt:404-448 — These 14 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 14 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 14 times.
D4 · Code Duplication· Edited copy of a member (61 corresponding lines) · ×2
Edited copy of a member (61 corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlDeploymentSubPipeline.kt:513— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlDeploymentSubPipeline.kt:513-573 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlUsecaseSubPipeline.kt:242-317 — These two members are one piece of code written twice and then edited apart: 61 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (61 corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessLibraryScreen.kt:141— feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessLibraryScreen.kt:141-201 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuLibraryScreen.kt:142-204 — These two members are one piece of code written twice and then edited apart: 61 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (121 corresponding lines) · ×2
Edited copy of a member (121 corresponding lines) feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/pdf_to_images/PdfToImagesScreen.kt:82— feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/pdf_to_images/PdfToImagesScreen.kt:82-256 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/split/SplitPdfToolContent.kt:78-198 — These two members are one piece of code written twice and then edited apart: 121 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (121 corresponding lines) feature/profile/src/main/java/com/wanbaohe/profile/components/AnimatedPager.kt:71— feature/profile/src/main/java/com/wanbaohe/profile/components/AnimatedPager.kt:71-192 | feature/profile/src/main/java/com/wanbaohe/profile/components/PlayProductSlider.kt:81-201 — These two members are one piece of code written twice and then edited apart: 121 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (65 corresponding lines) · ×2
Edited copy of a member (65 corresponding lines) libs/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:371— libs/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:371-460 | libs/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:462-526 — These two members are one piece of code written twice and then edited apart: 65 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (65 corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/OnlinePlayUseCase.kt:177— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/OnlinePlayUseCase.kt:177-241 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/OnlinePlayUseCase.kt:231-298 — These two members are one piece of code written twice and then edited apart: 65 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (93 corresponding lines) · ×2
Edited copy of a member (93 corresponding lines) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RubberStampParamsItem.kt:57— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RubberStampParamsItem.kt:57-149 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/VoronoiCrystallizeParamsItem.kt:57-156 — These two members are one piece of code written twice and then edited apart: 93 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (93 corresponding lines) libs/gesture/src/main/java/com/t8rin/gesture/TransformGesture.kt:81— libs/gesture/src/main/java/com/t8rin/gesture/TransformGesture.kt:81-173 | libs/gesture/src/main/java/com/t8rin/gesture/TransformGesture.kt:220-343 — These two members are one piece of code written twice and then edited apart: 93 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (49 corresponding lines) · ×2
Edited copy of a member (49 corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/ui/ChessOpponentPicker.kt:49— feature/chess/src/main/java/com/wanbaohe/chess/ui/ChessOpponentPicker.kt:49-99 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/ui/GomokuOpponentPicker.kt:49-97 — These two members are one piece of code written twice and then edited apart: 49 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (49 corresponding lines) core/data/src/main/java/com/t8rin/imagetoolbox/core/data/utils/UriUtils.kt:74— core/data/src/main/java/com/t8rin/imagetoolbox/core/data/utils/UriUtils.kt:74-122 | core/utils/src/main/java/com/t8rin/imagetoolbox/core/utils/UriUtils.kt:285-335 — These two members are one piece of code written twice and then edited apart: 49 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (51 corresponding lines) · ×2
Edited copy of a member (51 corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ImportGameUseCase.kt:140— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ImportGameUseCase.kt:140-190 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/ImportGameUseCase.kt:145-200 — These two members are one piece of code written twice and then edited apart: 51 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (51 corresponding lines) feature/survive30s/src/main/java/com/wanbaohe/survive30s/screen/Survive30sScreen.kt:808— feature/survive30s/src/main/java/com/wanbaohe/survive30s/screen/Survive30sScreen.kt:808-858 | feature/survive30s/src/main/java/com/wanbaohe/survive30s/screen/Survive30sScreen.kt:867-917 — These two members are one piece of code written twice and then edited apart: 51 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (67 corresponding lines) · ×2
Edited copy of a member (67 corresponding lines) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ArcParamsItem.kt:51— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ArcParamsItem.kt:51-122 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SmearParamsItem.kt:51-117 — These two members are one piece of code written twice and then edited apart: 67 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (67 corresponding lines) feature/marktodo/src/main/java/com/shifenmiao/marktodo/components/TaskListContent.kt:367— feature/marktodo/src/main/java/com/shifenmiao/marktodo/components/TaskListContent.kt:367-452 | feature/marktodo/src/main/java/com/shifenmiao/marktodo/components/ThemeGroupCard.kt:404-470 — These two members are one piece of code written twice and then edited apart: 67 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (55 corresponding lines) · ×2
Edited copy of a member (55 corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessLibraryScreen.kt:84— feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessLibraryScreen.kt:84-138 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuLibraryScreen.kt:85-139 — These two members are one piece of code written twice and then edited apart: 55 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (55 corresponding lines) feature/gomoku/src/main/java/com/wanbaohe/gomoku/router/screenLogic/GomokuRouterComponent.kt:272— feature/gomoku/src/main/java/com/wanbaohe/gomoku/router/screenLogic/GomokuRouterComponent.kt:272-326 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/router/screenLogic/XiangqiRouterComponent.kt:303-357 — These two members are one piece of code written twice and then edited apart: 55 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (60 corresponding lines) · ×2
Edited copy of a member (60 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:208— feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:208-267 | feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIPromptComponent.kt:240-299 — These two members are one piece of code written twice and then edited apart: 60 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (60 corresponding lines) core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDatePickerDialog.kt:541— core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDatePickerDialog.kt:541-603 | core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDateRangePickerDialog.kt:447-506 — These two members are one piece of code written twice and then edited apart: 60 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (57 corresponding lines) · ×2
Edited copy of a member (57 corresponding lines) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/color_picker/ColorPicker.kt:161— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/color_picker/ColorPicker.kt:161-217 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/color_picker/ColorPicker.kt:226-302 — These two members are one piece of code written twice and then edited apart: 57 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (57 corresponding lines) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/image/ImageGalleryViewer.kt:167— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/image/ImageGalleryViewer.kt:167-223 | feature/image-viewer/src/main/java/com/wanbaohe/imageviewer/components/ImageViewerScreen.kt:139-212 — These two members are one piece of code written twice and then edited apart: 57 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 39+ corresponding lines) · ×2
Edited copies of one member (3 members, 39+ corresponding lines) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/other/TopAppBarEmoji.kt:269— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/other/TopAppBarEmoji.kt:269-307 | feature/settings/src/main/java/com/wanbaohe/setting/display/screen/DisplaySettingsScreen.kt:762-831 | feature/settings/src/main/java/com/wanbaohe/setting/display/screen/DisplaySettingsScreen.kt:834-900 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 39 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 39+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt:720— feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt:720-758 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/OnlineMatchScreen.kt:720-758 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/OnlineMatchScreen.kt:720-758 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 39 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 40+ corresponding lines) · ×2
Edited copies of one member (3 members, 40+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/CreateGameUseCase.kt:111— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/CreateGameUseCase.kt:111-150 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/CreateGameUseCase.kt:118-158 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/CreateGameUseCase.kt:124-168 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 40 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 40+ corresponding lines) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/components/TextEditDialog.kt:550— feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/components/TextEditDialog.kt:550-594 | feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/draw/BrushSettingsDialog.kt:229-269 | feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/tools/shape/ShapeToolSheet.kt:235-274 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 40 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 53+ corresponding lines) · ×2
Edited copies of one member (3 members, 53+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt:662— feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt:662-714 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/OnlineMatchScreen.kt:662-714 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/OnlineMatchScreen.kt:662-714 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 53 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 53+ corresponding lines) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/sliders/custom_slider/CustomRangeSlider.kt:446— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/sliders/custom_slider/CustomRangeSlider.kt:446-503 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/sliders/custom_slider/CustomRangeSlider.kt:508-562 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/sliders/custom_slider/CustomSlider.kt:392-444 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 53 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 30+ corresponding lines) · ×2
Edited copies of one member (3 members, 30+ corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageChessTool.kt:359— feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageChessTool.kt:359-388 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageGomokuTool.kt:359-388 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageXiangqiTool.kt:356-385 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 30 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 30+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ExportGameUseCase.kt:97— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ExportGameUseCase.kt:97-126 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/ExportGameUseCase.kt:99-134 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/ExportGameUseCase.kt:91-120 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 30 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (43 corresponding lines) · ×2
Edited copy of a member (43 corresponding lines) feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/screenLogic/WeightResizeComponent.kt:394— feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/screenLogic/WeightResizeComponent.kt:394-436 | feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/screenLogic/WeightResizeComponent.kt:440-486 — These two members are one piece of code written twice and then edited apart: 43 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (43 corresponding lines) feature/audio-cover-extractor/src/main/java/com/t8rin/imagetoolbox/feature/audio_cover_extractor/ui/screenLogic/AudioCoverExtractorComponent.kt:113— feature/audio-cover-extractor/src/main/java/com/t8rin/imagetoolbox/feature/audio_cover_extractor/ui/screenLogic/AudioCoverExtractorComponent.kt:113-155 | feature/audio-cover-extractor/src/main/java/com/t8rin/imagetoolbox/feature/audio_cover_extractor/ui/screenLogic/AudioCoverExtractorComponent.kt:157-203 — These two members are one piece of code written twice and then edited apart: 43 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 13+ corresponding lines) · ×2
Edited copies of one member (4 members, 13+ corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidArchitectureSubPipeline.kt:468— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidArchitectureSubPipeline.kt:468-487 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidErSubPipeline.kt:611-623 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidRequirementSubPipeline.kt:484-503 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlErdSubPipeline.kt:693-708 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 13+ corresponding lines) app/src/google/java/com/shifenmiao/app/push/OneBoxFirebaseMessagingService.kt:99— app/src/google/java/com/shifenmiao/app/push/OneBoxFirebaseMessagingService.kt:99-111 | feature/file-transfer/src/main/java/com/wanbaohe/file_transfer/server/FileTransferService.kt:184-198 | feature/file-transfer/src/main/java/com/wanbaohe/file_transfer/server/FileTransferService.kt:203-217 | feature/habit-tracker/src/main/java/com/wanbaohe/habittracker/reminder/HabitReminderReceiver.kt:90-102 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (41 corresponding lines) · ×2
Edited copy of a member (41 corresponding lines) feature/load-net-image/src/main/java/com/t8rin/imagetoolbox/feature/load_net_image/presentation/screenLogic/LoadNetImageComponent.kt:128— feature/load-net-image/src/main/java/com/t8rin/imagetoolbox/feature/load_net_image/presentation/screenLogic/LoadNetImageComponent.kt:128-168 | feature/wallpapers-export/src/main/java/com/t8rin/imagetoolbox/feature/wallpapers_export/presentation/screenLogic/WallpapersExportComponent.kt:127-168 — These two members are one piece of code written twice and then edited apart: 41 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (41 corresponding lines) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedModalBottomSheet.kt:115— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedModalBottomSheet.kt:115-166 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedModalBottomSheet.kt:209-249 — These two members are one piece of code written twice and then edited apart: 41 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 27+ corresponding lines) · ×2
Edited copies of one member (3 members, 27+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/application/dto/GameDtos.kt:113— feature/chess/src/main/java/com/wanbaohe/chess/application/dto/GameDtos.kt:113-139 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/dto/GameDtos.kt:113-139 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/dto/GameDtos.kt:121-148 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 27 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 27+ corresponding lines) feature/login/src/main/java/com/shifenmiao/login/viewModel/LoginComponent.kt:842— feature/login/src/main/java/com/shifenmiao/login/viewModel/LoginComponent.kt:842-868 | feature/login/src/main/java/com/shifenmiao/login/viewModel/LoginComponent.kt:874-903 | feature/login/src/main/java/com/shifenmiao/login/viewModel/LoginComponent.kt:912-941 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 27 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (6 members, 12+ corresponding lines) · ×2
Edited copies of one member (6 members, 12+ corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidArchitectureSubPipeline.kt:205— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidArchitectureSubPipeline.kt:205-220 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidBlockSubPipeline.kt:90-104 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidC4SubPipeline.kt:190-202 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:291-303 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlDeploymentSubPipeline.kt:169-180 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlUsecaseSubPipeline.kt:180-195 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
Edited copies of one member (6 members, 12+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:402— feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:402-414 | feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:416-428 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuGameComponent.kt:505-516 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuGameComponent.kt:518-529 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiGameComponent.kt:381-394 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiGameComponent.kt:396-409 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 19+ corresponding lines) · ×2
Edited copies of one member (3 members, 19+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/data/online/SignalingClientImpl.kt:182— feature/chess/src/main/java/com/wanbaohe/chess/data/online/SignalingClientImpl.kt:182-200 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/online/SignalingClientImpl.kt:182-200 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/online/SignalingClientImpl.kt:182-200 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 19+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt:336— feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt:336-354 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/OnlineMatchScreen.kt:336-354 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/OnlineMatchScreen.kt:336-354 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 6+ corresponding lines) · ×2
Edited copies of one member (3 members, 6+ corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlC4SubPipeline.kt:339— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlC4SubPipeline.kt:339-345 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlC4SubPipeline.kt:401-406 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlNetworkSubPipeline.kt:357-362 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 6+ corresponding lines) feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/AliyunOssSigner.kt:184— feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/AliyunOssSigner.kt:184-189 | feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/AwsSigV4Signer.kt:141-146 | feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/BaiduBosSigner.kt:142-147 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 18+ corresponding lines) · ×2
Edited copies of one member (4 members, 18+ corresponding lines) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/tool/PixelationCommands.kt:22— feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/tool/PixelationCommands.kt:22-41 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/tool/PixelationCommands.kt:69-92 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/tool/PixelationCommands.kt:116-137 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/tool/PixelationCommands.kt:233-250 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 18+ corresponding lines) feature/ai-image/src/main/java/com/shifenmiao/ai/image/controllers/AIImageComponent.kt:113— feature/ai-image/src/main/java/com/shifenmiao/ai/image/controllers/AIImageComponent.kt:113-130 | feature/crop/src/main/java/com/t8rin/imagetoolbox/feature/crop/presentation/screenLogic/CropComponent.kt:288-306 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/screenLogic/DrawComponent.kt:428-446 | feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/presentation/screenLogic/GradientMakerComponent.kt:484-506 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 3+ corresponding lines) · ×2
Edited copies of one member (3 members, 3+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:465— feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:465-467 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuGameComponent.kt:548-550 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiGameComponent.kt:450-452 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 3+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:461— feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:461-463 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuGameComponent.kt:545-547 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiGameComponent.kt:446-448 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Duplicated block (42–45 lines × 2) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessEmptyQuickPanel.kt:162— feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessEmptyQuickPanel.kt:162-203 | feature/chess/src/main/java/com/wanbaohe/chess/screen/NewGameDropMenu.kt:273-317 — 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 `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessEmptyQuickPanel.kt:162` 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 (42–45 lines × 2) feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuEmptyQuickPanel.kt:162— feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuEmptyQuickPanel.kt:162-203 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/NewGameDropMenu.kt:275-319 — 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 `feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuEmptyQuickPanel.kt:162` 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) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/quad_components/NumberColorModelQuadItem.kt:97— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/quad_components/NumberColorModelQuadItem.kt:97-133 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberNumberColorModelTripleItem.kt:86-122 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/quad_components/NumberColorModelQuadItem.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberNumberColorModelTripleItem.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 71 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 `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/quad_components/NumberColorModelQuadItem.kt:97` 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) libs/collages/src/main/java/com/t8rin/collages/view/FrameImageView.kt:677— libs/collages/src/main/java/com/t8rin/collages/view/FrameImageView.kt:677-713 | libs/collages/src/main/java/com/t8rin/collages/view/FrameImageView.kt:771-807 — 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 `libs/collages/src/main/java/com/t8rin/collages/view/FrameImageView.kt:677` 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 (34–36 lines × 2) core/data/src/main/java/com/t8rin/imagetoolbox/core/data/utils/UriUtils.kt:87— core/data/src/main/java/com/t8rin/imagetoolbox/core/data/utils/UriUtils.kt:87-122 | core/utils/src/main/java/com/t8rin/imagetoolbox/core/utils/UriUtils.kt:301-334 — before extracting anything, compare `core/data/src/main/java/com/t8rin/imagetoolbox/core/data/utils/UriUtils.kt` and `core/utils/src/main/java/com/t8rin/imagetoolbox/core/utils/UriUtils.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 77 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 `core/data/src/main/java/com/t8rin/imagetoolbox/core/data/utils/UriUtils.kt:87` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `core/utils/src/main/java/com/t8rin/imagetoolbox/core/utils/UriUtils.kt:335` calls `flowOn` and `core/data/src/main/java/com/t8rin/imagetoolbox/core/data/utils/UriUtils.kt:124` 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 (34–36 lines × 2) feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt:195— feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt:195-230 | feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/SingleEditContent.kt:201-234 — 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 `feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt:195` 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: the declarations holding them bind `component` to `ResizeAndConvertComponent` in one and `SingleEditComponent` 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 (35 lines × 2) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/components/ApngParamsSelector.kt:135— feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/components/ApngParamsSelector.kt:135-169 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/components/WebpParamsSelector.kt:109-143 — before extracting anything, compare `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/components/ApngParamsSelector.kt` and `feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/components/WebpParamsSelector.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 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 `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/components/ApngParamsSelector.kt:135` 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 (35 lines × 2) feature/boardgame/src/main/java/com/wanbaohe/boardgame/ui/StatusCards.kt:122— feature/boardgame/src/main/java/com/wanbaohe/boardgame/ui/StatusCards.kt:122-156 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiGameScreen.kt:980-1014 — 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 `feature/boardgame/src/main/java/com/wanbaohe/boardgame/ui/StatusCards.kt:122` 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 (34 lines × 2) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupProjectStore.kt:371— feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupProjectStore.kt:371-404 | feature/text-card/src/main/java/com/wanbaohe/textcard/data/project/AndroidTextCardProjectStore.kt:299-332 — before extracting anything, compare `feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupProjectStore.kt` and `feature/text-card/src/main/java/com/wanbaohe/textcard/data/project/AndroidTextCardProjectStore.kt` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 256 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 `feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupProjectStore.kt:371` 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 (34 lines × 2) feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_pages/components/PdfPagesRemoveGrid.kt:171— feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_pages/components/PdfPagesRemoveGrid.kt:171-204 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rotate/components/PdfPagesRotationGrid.kt:182-215 — before extracting anything, compare `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_pages/components/PdfPagesRemoveGrid.kt` and `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rotate/components/PdfPagesRotationGrid.kt` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 161 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 `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_pages/components/PdfPagesRemoveGrid.kt:171` 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 (29–30 lines × 2) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/CubeLutDownloadDialog.kt:105— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/CubeLutDownloadDialog.kt:105-133 | feature/mesh-gradients/src/main/java/com/t8rin/imagetoolbox/feature/mesh_gradients/presentation/MeshGradientsContent.kt:160-189 — 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 `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/CubeLutDownloadDialog.kt:105` 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–30 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassOutlinedTextField.kt:286— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassOutlinedTextField.kt:286-315 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassOutlinedTextField.kt:380-408 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassOutlinedTextField.kt:286` 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 (28–29 lines × 2) feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:251— feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:251-279 | feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt:238-265 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 625 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 `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:251` 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 (28–29 lines × 2) feature/common/src/main/java/com/shifenmiao/common/ui/CreationMetaConfigSheet.kt:297— feature/common/src/main/java/com/shifenmiao/common/ui/CreationMetaConfigSheet.kt:297-324 | feature/common/src/main/java/com/shifenmiao/common/ui/CreationMetaConfigSheet.kt:325-353 — 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/common/src/main/java/com/shifenmiao/common/ui/CreationMetaConfigSheet.kt:297` 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 (27–28 lines × 2) core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDatePickerDialog.kt:452— core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDatePickerDialog.kt:452-479 | core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDateRangePickerDialog.kt:360-386 — before extracting anything, compare `core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDatePickerDialog.kt` and `core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDateRangePickerDialog.kt` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 147 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 `core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDatePickerDialog.kt:452` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDatePickerDialog.kt:451` calls `Spacer`, `width`, `Icon` and `core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDateRangePickerDialog.kt:360` 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 (27–28 lines × 2) feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:798— feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:798-824 | feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt:758-785 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 625 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 `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:798` 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 (26 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessEmptyQuickPanel.kt:216— feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessEmptyQuickPanel.kt:216-241 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuEmptyQuickPanel.kt:216-241 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiEmptyQuickPanel.kt:216-241 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessEmptyQuickPanel.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuEmptyQuickPanel.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 72 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 (26 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt:671— feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt:671-696 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/OnlineMatchScreen.kt:671-696 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/OnlineMatchScreen.kt:671-696 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/OnlineMatchScreen.kt` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 428 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 `feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt:671` 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.wanbaohe.chess.R` in one and `com.wanbaohe.gomoku.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 (26 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassAssistChip.kt:80— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassAssistChip.kt:80-105 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassAssistChip.kt:161-186 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassAssistChip.kt:80` 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 (26 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassOutlinedTextField.kt:464— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassOutlinedTextField.kt:464-489 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassOutlinedTextField.kt:560-585 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassOutlinedTextField.kt:464` 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 (25 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/component/ChessAnalysisComponent.kt:314— feature/chess/src/main/java/com/wanbaohe/chess/component/ChessAnalysisComponent.kt:314-338 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuAnalysisComponent.kt:358-382 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiAnalysisComponent.kt:306-330 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/component/ChessAnalysisComponent.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuAnalysisComponent.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 77 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: `FenCodec` names `com.wanbaohe.chess.domain.FenCodec` in one and `com.wanbaohe.gomoku.domain.FenCodec` 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 (25 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessEmptyQuickPanel.kt:138— feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessEmptyQuickPanel.kt:138-162 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuEmptyQuickPanel.kt:138-162 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiEmptyQuickPanel.kt:138-162 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessEmptyQuickPanel.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuEmptyQuickPanel.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 72 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 `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessEmptyQuickPanel.kt:138` 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 (24 lines × 3) feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageChessTool.kt:160— feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageChessTool.kt:160-183 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageGomokuTool.kt:160-183 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageXiangqiTool.kt:160-183 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageChessTool.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageGomokuTool.kt` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 137 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 `feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageChessTool.kt:160` 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 × 3) feature/chess/src/main/java/com/wanbaohe/chess/application/port/outbound/ChessAiStore.kt:32— feature/chess/src/main/java/com/wanbaohe/chess/application/port/outbound/ChessAiStore.kt:32-55 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/port/outbound/GomokuAiStore.kt:32-55 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/port/outbound/XiangqiAiStore.kt:32-55 — 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `slot` to `EngineSlot): ChessAiSource = when (slot` in one and `EngineSlot): GomokuAiSource = when (slot` 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 (23 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/data/LlmMoveChooser.kt:65— feature/chess/src/main/java/com/wanbaohe/chess/data/LlmMoveChooser.kt:65-87 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/LlmMoveChooser.kt:65-87 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/LlmMoveChooser.kt:65-87 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/data/LlmMoveChooser.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/LlmMoveChooser.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 47 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. Note first that the copies are not typed on the same thing: `MoveDecision` names `com.wanbaohe.chess.application.port.outbound.MoveDecision` in one and `com.wanbaohe.gomoku.application.port.outbound.MoveDecision` 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 (23 lines × 3) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:1008— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:1008-1030 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlDeploymentSubPipeline.kt:647-669 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlObjectSubPipeline.kt:373-395 — before extracting anything, compare `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt` and `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlDeploymentSubPipeline.kt` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 163 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 `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:1008` 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 (21 lines × 4) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/BilaterialBlurParamsItem.kt:74— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/BilaterialBlurParamsItem.kt:74-94 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ClaheParamsItem.kt:73-93 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/LinearGaussianParamsItem.kt:75-95 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/quad_components/NumberQuadItem.kt:73-93 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/BilaterialBlurParamsItem.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/LinearGaussianParamsItem.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 83 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 `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/BilaterialBlurParamsItem.kt:74` 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, `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/LinearGaussianParamsItem.kt:74` calls `toInt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/BilaterialBlurParamsItem.kt:73` 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 (21 lines × 4) feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:245— feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:245-265 | feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/presentation/components/GradientMakerBottomButtons.kt:74-94 | feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/ImageCutterContent.kt:223-243 | feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt:287-307 — before extracting anything, compare `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt` and `feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/ImageCutterContent.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 71 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 `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:245` 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 (20–21 lines × 2) feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_pages/components/PdfPagesRemoveGrid.kt:243— feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_pages/components/PdfPagesRemoveGrid.kt:243-262 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rotate/components/PdfPagesRotationGrid.kt:238-258 — before extracting anything, compare `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_pages/components/PdfPagesRemoveGrid.kt` and `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rotate/components/PdfPagesRotationGrid.kt` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 161 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 `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_pages/components/PdfPagesRemoveGrid.kt:243` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (20–21 lines × 2) feature/visual-automation/src/main/java/com/wanbaohe/visual/automation/injector/TextInputInjector.kt:56— feature/visual-automation/src/main/java/com/wanbaohe/visual/automation/injector/TextInputInjector.kt:56-76 | feature/visual-automation/src/main/java/com/wanbaohe/visual/automation/injector/TouchInjector.kt:43-62 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `feature/visual-automation/src/main/java/com/wanbaohe/visual/automation/injector/TextInputInjector.kt:56` 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–18 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/color_picker/ColorPicker.kt:200— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/color_picker/ColorPicker.kt:200-217 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/color_picker/ColorPicker.kt:288-302 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/color_picker/ColorPicker.kt:200` 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–18 lines × 2) feature/habit-tracker/src/main/java/com/wanbaohe/habittracker/screen/tab/StatsTab.kt:236— feature/habit-tracker/src/main/java/com/wanbaohe/habittracker/screen/tab/StatsTab.kt:236-253 | feature/household-items/src/main/java/com/wanbaohe/householditems/screen/HouseholdStatsTab.kt:396-410 — 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 `feature/habit-tracker/src/main/java/com/wanbaohe/habittracker/screen/tab/StatsTab.kt:236` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `feature/household-items/src/main/java/com/wanbaohe/householditems/screen/HouseholdStatsTab.kt:394` calls `cardColors` and `feature/habit-tracker/src/main/java/com/wanbaohe/habittracker/screen/tab/StatsTab.kt:235` 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 (16–18 lines × 2) feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:936— feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:936-951 | feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt:931-948 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 625 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 `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:936` 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–18 lines × 2) feature/ai/src/main/java/com/shifenmiao/ai/upload/FileAnalyzer.kt:121— feature/ai/src/main/java/com/shifenmiao/ai/upload/FileAnalyzer.kt:121-138 | feature/ai/src/main/java/com/shifenmiao/ai/upload/FileAnalyzer.kt:232-247 — 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/ai/src/main/java/com/shifenmiao/ai/upload/FileAnalyzer.kt:121` 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–18 lines × 2) feature/ai/src/main/java/com/shifenmiao/ai/utils/AiUtils.kt:291— feature/ai/src/main/java/com/shifenmiao/ai/utils/AiUtils.kt:291-304 | feature/ai/src/main/java/com/shifenmiao/ai/utils/AiUtils.kt:552-569 — 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/ai/src/main/java/com/shifenmiao/ai/utils/AiUtils.kt:291` 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–18 lines × 2) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlMindmapSubPipeline.kt:89— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlMindmapSubPipeline.kt:89-102 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlWbsSubPipeline.kt:91-108 — before extracting anything, compare `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlMindmapSubPipeline.kt` and `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlWbsSubPipeline.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 82 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 `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlMindmapSubPipeline.kt:89` 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 (16 lines × 4) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ArcParamsItem.kt:105— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ArcParamsItem.kt:105-120 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RubberStampParamsItem.kt:106-121 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SmearParamsItem.kt:100-115 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/VoronoiCrystallizeParamsItem.kt:126-141 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ArcParamsItem.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SmearParamsItem.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 50 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 `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ArcParamsItem.kt:105` 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 × 4) feature/base64-tools/src/main/java/com/t8rin/imagetoolbox/feature/base64_tools/presentation/Base64ToolsContent.kt:253— feature/base64-tools/src/main/java/com/t8rin/imagetoolbox/feature/base64_tools/presentation/Base64ToolsContent.kt:253-268 | feature/crop/src/main/java/com/t8rin/imagetoolbox/feature/crop/presentation/CropContent.kt:369-384 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/DrawContent.kt:352-367 | feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/SingleEditContent.kt:333-348 — 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 `feature/base64-tools/src/main/java/com/t8rin/imagetoolbox/feature/base64_tools/presentation/Base64ToolsContent.kt:253` 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–16 lines × 2) feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/screen/CloudStorageScreen.kt:501— feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/screen/CloudStorageScreen.kt:501-516 | feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/screen/CloudStorageScreen.kt:621-634 — 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/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/screen/CloudStorageScreen.kt:501` 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–16 lines × 2) feature/marquee/src/main/java/com/shifenmiao/marquee/screen/components/ModeSettingsPanel.kt:226— feature/marquee/src/main/java/com/shifenmiao/marquee/screen/components/ModeSettingsPanel.kt:226-241 | feature/marquee/src/main/java/com/shifenmiao/marquee/screen/components/ModeSettingsPanel.kt:514-527 — 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/marquee/src/main/java/com/shifenmiao/marquee/screen/components/ModeSettingsPanel.kt:226` 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 × 4) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/FileReorderVerticalList.kt:162— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/FileReorderVerticalList.kt:162-176 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rearrange/components/PdfPagesRearrangeGrid.kt:127-141 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_pages/components/PdfPagesRemoveGrid.kt:125-139 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rotate/components/PdfPagesRotationGrid.kt:115-129 — before extracting anything, compare `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rearrange/components/PdfPagesRearrangeGrid.kt` and `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_pages/components/PdfPagesRemoveGrid.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 97 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/FileReorderVerticalList.kt:162` 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 × 4) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassOutlinedTextField.kt:302— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassOutlinedTextField.kt:302-316 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassOutlinedTextField.kt:395-409 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassOutlinedTextField.kt:490-504 | feature/app/src/main/java/com/wanbaohe/app/components/RoundedTextField.kt:147-161 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassOutlinedTextField.kt:507` calls `GlassOutlinedContainer` and `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassOutlinedTextField.kt:318` 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–14 lines × 27) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:152— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:152-160 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:202-210 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:253-261 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:454-462 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:506-514 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:558-566 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:660-668 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:762-770 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:862-870 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:914-922 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1093-1101 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1502-1510 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:772-785 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:505-513 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:565-573 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:678-686 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:910-918 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:965-973 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:160-168 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:298-306 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:343-351 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:388-396 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:363-371 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:402-410 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:484-492 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:469-477 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:530-538 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` as WHOLE FILES: this scan already matched 47 separate duplicated blocks between them, totalling at least 481 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 `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:152` 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, `libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:156` calls `param` and `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:148` 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–14 lines × 27) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:176— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:176-184 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:226-234 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:275-283 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:639-647 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:679-687 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:715-723 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:784-792 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:820-828 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:886-894 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:938-946 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:808-821 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:595-604 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:807-815 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:884-892 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:939-947 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:994-1002 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:169-177 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:406-414 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:450-458 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:530-538 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:416-424 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:498-506 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:289-297 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:376-384 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:437-445 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:503-511 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:549-557 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt` as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 445 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 `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:176` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:173` calls `listOf` and `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:781` 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 × 8) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ArcParamsItem.kt:81— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ArcParamsItem.kt:81-94 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ChannelMixParamsItem.kt:82-95 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/EnhancedZoomBlurParamsItem.kt:81-94 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/GlitchParamsItem.kt:81-94 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/KaleidoscopeParamsItem.kt:83-96 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/LinearTiltShiftParamsItem.kt:81-94 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SparkleParamsItem.kt:91-104 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/VoronoiCrystallizeParamsItem.kt:99-112 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ArcParamsItem.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/EnhancedZoomBlurParamsItem.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. 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 `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ArcParamsItem.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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/GlitchParamsItem.kt:78` calls `toInt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ArcParamsItem.kt:78` 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 × 8) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ArcParamsItem.kt:80— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ArcParamsItem.kt:80-93 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/EnhancedZoomBlurParamsItem.kt:80-93 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/GlitchParamsItem.kt:80-93 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/KaleidoscopeParamsItem.kt:82-95 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/LinearTiltShiftParamsItem.kt:80-93 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/PinchParamsItem.kt:76-89 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RadialTiltShiftParamsItem.kt:76-89 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/WaterParamsItem.kt:76-89 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ArcParamsItem.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/EnhancedZoomBlurParamsItem.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. 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 `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ArcParamsItem.kt:80` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/GlitchParamsItem.kt:78` calls `toInt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ArcParamsItem.kt:78` 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 (14 lines × 4) core/network/src/main/java/com/shifenmiao/network/service/WebSearchService.kt:174— core/network/src/main/java/com/shifenmiao/network/service/WebSearchService.kt:174-187 | core/network/src/main/java/com/shifenmiao/network/service/WebSearchService.kt:202-215 | core/network/src/main/java/com/shifenmiao/network/service/WebSearchService.kt:230-243 | core/network/src/main/java/com/shifenmiao/network/service/WebSearchService.kt:258-271 — 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 `core/network/src/main/java/com/shifenmiao/network/service/WebSearchService.kt:174` 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 × 4) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:204— feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:204-217 | feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/components/GifToolsTopAppBarActions.kt:98-111 | feature/load-net-image/src/main/java/com/t8rin/imagetoolbox/feature/load_net_image/presentation/components/LoadNetImageTopAppBarActions.kt:104-117 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt:204-217 — before extracting anything, compare `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt` and `feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 239 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 `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:204` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 4) core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/FilePickerRenderer.kt:98— core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/FilePickerRenderer.kt:98-110 | core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/FolderPickerRenderer.kt:74-86 | core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/ImagePickerRenderer.kt:83-95 | core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/LocationPickerRenderer.kt:72-84 — before extracting anything, compare `core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/FilePickerRenderer.kt` and `core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/ImagePickerRenderer.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/FilePickerRenderer.kt:98` 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 × 4) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheetComponent.kt:202— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheetComponent.kt:202-214 | feature/altitude/src/main/java/com/wanbaohe/altitude/component/AltitudeComponent.kt:406-418 | feature/calendar/src/main/java/com/wanbaohe/calendar/bazi/screenLogic/BaZiComponent.kt:130-142 | feature/calendar/src/main/java/com/wanbaohe/calendar/convert/screenLogic/ConvertComponent.kt:180-192 — 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 `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheetComponent.kt:202` 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 × 2) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/NumberTransferFuncPairItem.kt:69— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/NumberTransferFuncPairItem.kt:69-81 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberTransferFuncBlurEdgeModeTripleItem.kt:82-92 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/NumberTransferFuncPairItem.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberTransferFuncBlurEdgeModeTripleItem.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 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 `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/NumberTransferFuncPairItem.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. 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, `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/NumberTransferFuncPairItem.kt:68` calls `onFilterChange` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberTransferFuncBlurEdgeModeTripleItem.kt:81` 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 (11–13 lines × 2) feature/common/src/main/java/com/shifenmiao/common/editor/NativeMarkdownEditor.kt:489— feature/common/src/main/java/com/shifenmiao/common/editor/NativeMarkdownEditor.kt:489-501 | feature/common/src/main/java/com/shifenmiao/common/editor/NativeStructuredBlockEditors.kt:176-186 — 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 `feature/common/src/main/java/com/shifenmiao/common/editor/NativeMarkdownEditor.kt:489` 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 (8–12 lines × 31) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:159— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:159-166 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:209-216 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:260-267 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:461-468 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:672-679 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:769-776 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:869-876 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:921-928 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1100-1107 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1133-1140 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1509-1516 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:782-793 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:517-524 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:577-584 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:639-646 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:685-692 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:830-837 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:917-924 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:972-979 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:305-312 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:350-357 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:395-402 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:487-494 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:538-545 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:370-377 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:409-416 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:465-472 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:491-498 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:297-304 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:476-483 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:537-544 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` as WHOLE FILES: this scan already matched 47 separate duplicated blocks between them, totalling at least 481 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 `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:159` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:168` calls `listOf` and `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:778` 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 (8–12 lines × 31) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:182— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:182-189 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:232-239 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:281-288 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:690-697 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:736-743 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:790-797 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:831-838 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:892-899 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:944-951 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1141-1148 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1221-1228 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:818-829 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:602-609 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:657-664 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:774-781 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:813-820 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:890-897 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:945-952 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:1000-1007 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:175-182 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:412-419 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:456-463 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:500-507 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:546-553 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:422-429 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:504-511 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:648-655 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:325-332 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:448-455 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:509-516 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:555-562 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` as WHOLE FILES: this scan already matched 47 separate duplicated blocks between them, totalling at least 481 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 `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:182` 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 (12 lines × 5) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ArcParamsItem.kt:106— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ArcParamsItem.kt:106-117 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/AsciiParamsItem.kt:235-246 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RubberStampParamsItem.kt:107-118 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SmearParamsItem.kt:101-112 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/VoronoiCrystallizeParamsItem.kt:127-138 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ArcParamsItem.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SmearParamsItem.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 50 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 `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ArcParamsItem.kt:106` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 5) libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1135— libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1135-1146 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1215-1226 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:641-652 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:489-500 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:540-551 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 524 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 `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1135` 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–12 lines × 2) feature/app/src/main/java/com/wanbaohe/app/ui/WebViewModalBottomSheet.kt:237— feature/app/src/main/java/com/wanbaohe/app/ui/WebViewModalBottomSheet.kt:237-248 | feature/webview/src/main/java/com/shifenmiao/webview/PreviewWebViewScreen.kt:110-119 — 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 `feature/app/src/main/java/com/wanbaohe/app/ui/WebViewModalBottomSheet.kt:237` 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–12 lines × 2) libs/opencv-tools/src/main/java/com/t8rin/opencv_tools/seam_carving/SeamCarver.kt:489— libs/opencv-tools/src/main/java/com/t8rin/opencv_tools/seam_carving/SeamCarver.kt:489-500 | libs/opencv-tools/src/main/java/com/t8rin/opencv_tools/seam_carving/SeamCarver.kt:884-893 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9–11 lines × 2) core/camera/src/main/java/com/wanbaohe/camera/PhotoFileProcessor.kt:204— core/camera/src/main/java/com/wanbaohe/camera/PhotoFileProcessor.kt:204-212 | feature/id-photo/src/main/java/com/wanbaohe/idphoto/presentation/screenLogic/IdPhotoComponent.kt:694-704 — 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–11 lines × 2) libs/twain/src/main/java/io/noties/markwon/prism4j/languages/Prism_go.java:21— libs/twain/src/main/java/io/noties/markwon/prism4j/languages/Prism_go.java:21-29 | libs/twain/src/main/java/io/noties/markwon/prism4j/languages/Prism_kotlin.java:25-35 — 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 `libs/twain/src/main/java/io/noties/markwon/prism4j/languages/Prism_go.java:21` 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 (10 lines × 9) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidArchitectureSubPipeline.kt:473— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidArchitectureSubPipeline.kt:473-482 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidC4SubPipeline.kt:661-670 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidRequirementSubPipeline.kt:489-498 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlActivitySubPipeline.kt:647-656 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:946-955 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlDeploymentSubPipeline.kt:606-615 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlObjectSubPipeline.kt:330-339 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlStateSubPipeline.kt:350-359 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlUsecaseSubPipeline.kt:456-465 — before extracting anything, compare `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidArchitectureSubPipeline.kt` and `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidC4SubPipeline.kt` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 91 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 `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidArchitectureSubPipeline.kt:473` 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 × 9) feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/compress/screenLogic/CompressPdfToolComponent.kt:109— feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/compress/screenLogic/CompressPdfToolComponent.kt:109-118 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/images_to_pdf/screenLogic/ImagesToPdfComponent.kt:164-173 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/merge/screenLogic/MergePdfToolComponent.kt:99-108 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/pdf_preview/screenLogic/PreviewPdfToolComponent.kt:158-167 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/pdf_to_images/screenLogic/ExtractPagesPdfToolComponent.kt:212-221 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rearrange/screenLogic/RearrangePdfToolComponent.kt:109-118 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_pages/screenLogic/RemovePagesPdfToolComponent.kt:108-117 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rotate/screenLogic/RotatePdfToolComponent.kt:121-130 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/split/screenLogic/SplitPdfToolComponent.kt:120-129 — before extracting anything, compare `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/compress/screenLogic/CompressPdfToolComponent.kt` and `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rearrange/screenLogic/RearrangePdfToolComponent.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 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 `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/compress/screenLogic/CompressPdfToolComponent.kt:109` 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 × 5) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/BilaterialBlurParamsItem.kt:92— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/BilaterialBlurParamsItem.kt:92-101 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/LinearGaussianParamsItem.kt:93-102 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RubberStampParamsItem.kt:102-111 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SparkleParamsItem.kt:112-121 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/VoronoiCrystallizeParamsItem.kt:122-131 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/BilaterialBlurParamsItem.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/LinearGaussianParamsItem.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 83 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 `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/BilaterialBlurParamsItem.kt:92` 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 × 5) feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/FontScaleSettingTool.kt:208— feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/FontScaleSettingTool.kt:208-217 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ImportFontTool.kt:285-294 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/NightModeSettingTool.kt:202-211 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/StartEntrySettingTool.kt:238-247 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ThemeSettingTool.kt:859-868 — 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 `feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/FontScaleSettingTool.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. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (9–10 lines × 3) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/charts/LineTrendChart.kt:160— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/charts/LineTrendChart.kt:160-169 | feature/altitude/src/main/java/com/wanbaohe/altitude/ui/AltitudeTrendChart.kt:97-106 | feature/habit-tracker/src/main/java/com/wanbaohe/habittracker/screen/tab/StatsTab.kt:335-343 — before extracting anything, compare `feature/altitude/src/main/java/com/wanbaohe/altitude/ui/AltitudeTrendChart.kt` and `feature/habit-tracker/src/main/java/com/wanbaohe/habittracker/screen/tab/StatsTab.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 40 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/charts/LineTrendChart.kt:160` 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 (9–10 lines × 3) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlActivitySubPipeline.kt:607— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlActivitySubPipeline.kt:607-615 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlObjectSubPipeline.kt:148-156 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlUsecaseSubPipeline.kt:159-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 all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlActivitySubPipeline.kt:607` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (9 lines × 4) libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:193— libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:193-201 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:917-925 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:944-952 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:995-1003 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 544 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 (9 lines × 4) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:1010— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:1010-1018 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlDeploymentSubPipeline.kt:649-657 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlObjectSubPipeline.kt:375-383 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlUsecaseSubPipeline.kt:513-521 — before extracting anything, compare `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt` and `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlDeploymentSubPipeline.kt` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 163 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 `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:1010` 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–9 lines × 2) feature/code-editor/src/main/java/com/wanbaohe/code/editor/webview/WebViewCodeEditor.kt:92— feature/code-editor/src/main/java/com/wanbaohe/code/editor/webview/WebViewCodeEditor.kt:92-98 | feature/markdown-edit/src/main/java/com/wanbaohe/markdown/edit/webview/WebViewMarkdownEditor.kt:122-130 — before extracting anything, compare `feature/code-editor/src/main/java/com/wanbaohe/code/editor/webview/WebViewCodeEditor.kt` and `feature/markdown-edit/src/main/java/com/wanbaohe/markdown/edit/webview/WebViewMarkdownEditor.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 150 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–9 lines × 2) feature/text-card/src/main/java/com/wanbaohe/textcard/data/project/AndroidTextCardProjectStore.kt:122— feature/text-card/src/main/java/com/wanbaohe/textcard/data/project/AndroidTextCardProjectStore.kt:122-128 | feature/text-card/src/main/java/com/wanbaohe/textcard/data/project/AndroidTextCardProjectStore.kt:138-146 — 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/text-card/src/main/java/com/wanbaohe/textcard/data/project/AndroidTextCardProjectStore.kt:122` 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 × 34) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:156— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:156-163 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:206-213 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:257-264 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:458-465 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:510-517 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:562-569 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:669-676 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:766-773 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:866-873 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:918-925 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1097-1104 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1130-1137 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1506-1513 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:779-788 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:514-521 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:574-581 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:636-643 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:682-689 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:827-834 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:914-921 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:969-976 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:164-171 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:302-309 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:347-354 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:392-399 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:484-491 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:535-542 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:367-374 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:406-413 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:462-469 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:488-495 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:294-301 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:473-480 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:534-541 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` as WHOLE FILES: this scan already matched 47 separate duplicated blocks between them, totalling at least 481 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 `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:156` 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 × 34) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:331— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:331-338 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:383-390 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:433-440 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:483-490 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:520-527 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:577-584 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:939-946 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1039-1046 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1107-1114 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1170-1177 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1210-1217 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1264-1271 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1516-1523 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1636-1643 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:659-668 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1205-1214 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:540-548 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:708-716 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:229-236 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:261-268 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:322-329 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:367-374 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:264-271 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:337-344 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:377-384 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:452-459 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:555-562 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:607-614 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:632-639 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:78-85 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:139-146 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:201-208 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:263-270 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1407-1416 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` as WHOLE FILES: this scan already matched 47 separate duplicated blocks between them, totalling at least 481 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 `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:331` 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 × 12) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:525— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:525-532 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:582-589 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:740-747 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:835-842 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1063-1070 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1641-1648 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:737-746 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:179-186 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:266-273 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:342-349 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:637-644 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1523-1532 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` as WHOLE FILES: this scan already matched 47 separate duplicated blocks between them, totalling at least 481 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 `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:525` 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 × 12) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:318— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:318-325 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlObjectSubPipeline.kt:190-197 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlObjectSubPipeline.kt:228-235 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlSequenceSubPipeline.kt:126-133 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlSequenceSubPipeline.kt:161-168 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlSequenceSubPipeline.kt:177-184 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlStateSubPipeline.kt:116-123 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlStateSubPipeline.kt:205-212 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlStateSubPipeline.kt:238-245 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlStateSubPipeline.kt:268-275 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlUsecaseSubPipeline.kt:205-212 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlUsecaseSubPipeline.kt:352-359 — before extracting anything, compare `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt` and `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlObjectSubPipeline.kt` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 145 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 `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:318` 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 × 5) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:262— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:262-269 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:771-778 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:930-937 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1255-1262 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:397-404 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` as WHOLE FILES: this scan already matched 47 separate duplicated blocks between them, totalling at least 481 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 `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:262` 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 × 5) feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/AliyunOssAdapter.kt:76— feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/AliyunOssAdapter.kt:76-83 | feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/AwsS3Adapter.kt:76-83 | feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/BaiduBosAdapter.kt:76-83 | feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/HuaweiObsAdapter.kt:68-75 | feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/TencentCosAdapter.kt:73-80 — before extracting anything, compare `feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/AliyunOssAdapter.kt` and `feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/TencentCosAdapter.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 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 `feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/AliyunOssAdapter.kt:76` 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 × 7) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:262— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:262-268 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:771-777 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:930-936 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1255-1261 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:632-640 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:397-403 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1381-1389 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` as WHOLE FILES: this scan already matched 47 separate duplicated blocks between them, totalling at least 481 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 `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:262` 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 × 7) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/model/ClaheHSLFilter.kt:39— feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/model/ClaheHSLFilter.kt:39-45 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/model/ClaheHSVFilter.kt:39-45 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/model/ClaheJzazbzFilter.kt:39-45 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/model/ClaheLABFilter.kt:39-45 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/model/ClaheLUVFilter.kt:39-45 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/model/ClaheOklabFilter.kt:39-45 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/model/ClaheOklchFilter.kt:39-45 — before extracting anything, compare `feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/model/ClaheHSLFilter.kt` and `feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/model/ClaheHSVFilter.kt` as WHOLE FILES: 89% 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/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/model/ClaheHSLFilter.kt:39` 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 × 4) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidClassSubPipeline.kt:265— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidClassSubPipeline.kt:265-271 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidStateSubPipeline.kt:233-239 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlClassSubPipeline.kt:256-262 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlStateSubPipeline.kt:303-309 — before extracting anything, compare `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidClassSubPipeline.kt` and `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidStateSubPipeline.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 55 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidClassSubPipeline.kt:265` 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 (7 lines × 4) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/modifier/AutoCornersShape.kt:100— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/modifier/AutoCornersShape.kt:100-106 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/modifier/AutoCornersShape.kt:115-121 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/modifier/ContiniousRoundedRectangle.kt:260-266 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/modifier/ContiniousRoundedRectangle.kt:276-282 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/modifier/AutoCornersShape.kt:100` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6–7 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt:242— feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt:242-248 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/router/screenLogic/GomokuRouterComponent.kt:242-247 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/router/screenLogic/XiangqiRouterComponent.kt:266-272 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/router/screenLogic/GomokuRouterComponent.kt` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 136 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 `feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt:242` 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. Note first that the copies are not typed on the same thing: `EngineSlot` names `com.wanbaohe.chess.application.port.outbound.EngineSlot` in one and `com.wanbaohe.gomoku.application.port.outbound.EngineSlot` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `feature/gomoku/src/main/java/com/wanbaohe/gomoku/router/screenLogic/GomokuRouterComponent.kt:239` calls `capture` and `feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt:240` 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 (6–7 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessPlayHomeScreen.kt:73— feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessPlayHomeScreen.kt:73-78 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuPlayHomeScreen.kt:73-78 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiPlayHomeScreen.kt:75-81 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessPlayHomeScreen.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuPlayHomeScreen.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessPlayHomeScreen.kt:73` 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.wanbaohe.chess.R` in one and `com.wanbaohe.gomoku.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 (6–7 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/confetti/Particles.kt:371— core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/confetti/Particles.kt:371-376 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/confetti/Particles.kt:383-389 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/confetti/Particles.kt:383` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (6–7 lines × 2) libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1780— libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1780-1785 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1792-1798 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 7) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidArchitectureSubPipeline.kt:375— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidArchitectureSubPipeline.kt:375-380 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidC4SubPipeline.kt:438-443 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidC4SubPipeline.kt:510-515 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidRequirementSubPipeline.kt:180-185 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:829-834 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlDeploymentSubPipeline.kt:485-490 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlUsecaseSubPipeline.kt:423-428 — before extracting anything, compare `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidArchitectureSubPipeline.kt` and `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidC4SubPipeline.kt` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 91 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 `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidArchitectureSubPipeline.kt:375` 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 × 7) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlClassSubPipeline.kt:143— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlClassSubPipeline.kt:143-148 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:321-326 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:971-976 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlDeploymentSubPipeline.kt:208-213 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlSequenceSubPipeline.kt:129-134 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlSequenceSubPipeline.kt:164-169 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlUsecaseSubPipeline.kt:355-360 — before extracting anything, compare `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt` and `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlDeploymentSubPipeline.kt` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 163 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 `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlClassSubPipeline.kt:143` 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 × 6) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidStateSubPipeline.kt:296— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidStateSubPipeline.kt:296-300 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlActivitySubPipeline.kt:659-665 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:958-964 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlDeploymentSubPipeline.kt:618-624 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlObjectSubPipeline.kt:342-348 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlUsecaseSubPipeline.kt:468-474 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 6 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 6 times. Read the line range as the matched WINDOW rather than a finished unit: at `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidStateSubPipeline.kt:296` 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 (5 lines × 6) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlActivitySubPipeline.kt:803— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlActivitySubPipeline.kt:803-807 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:1049-1053 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlDeploymentSubPipeline.kt:688-692 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlObjectSubPipeline.kt:422-426 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlStateSubPipeline.kt:417-421 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlUsecaseSubPipeline.kt:558-562 — 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 6 call sites, so a change lands once.
Duplicated block (5 lines × 4) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:980— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:980-984 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlDeploymentSubPipeline.kt:354-358 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlErdSubPipeline.kt:499-503 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlUsecaseSubPipeline.kt:364-368 — before extracting anything, compare `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt` and `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlDeploymentSubPipeline.kt` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 163 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 4) core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/di/DynamicUiModule.kt:99— core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/di/DynamicUiModule.kt:99-103 | feature/dsh-client/src/main/java/com/wanbaohe/dsh/di/DshModule.kt:44-48 | feature/poem/src/main/java/com/wanbaohe/poem/di/PoemNetworkModule.kt:39-43 | feature/speed-test/src/main/java/com/wanbaohe/speedtest/data/di/SpeedTestModule.kt:53-57 — 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 (30 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt:625— feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt:625-654 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/OnlineMatchScreen.kt:625-654 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/OnlineMatchScreen.kt:625-654 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/OnlineMatchScreen.kt` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 428 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 `feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt:625` 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: `ConnectionState` names `com.wanbaohe.chess.domain.model.ConnectionState` in one and `com.wanbaohe.gomoku.domain.model.ConnectionState` 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 (30 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/SettingsUseCase.kt:33— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/SettingsUseCase.kt:33-62 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/SettingsUseCase.kt:33-62 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/SettingsUseCase.kt:33-62 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/SettingsUseCase.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/SettingsUseCase.kt` as WHOLE FILES: 93% 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. Note first that the copies are not typed on the same thing: `AudioSettings` names `com.wanbaohe.chess.application.port.outbound.AudioSettings` in one and `com.wanbaohe.gomoku.application.port.outbound.AudioSettings` 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 × 4) feature/habit-tracker/src/main/java/com/wanbaohe/habittracker/ai/tool/HabitToolMarkdown.kt:23— feature/habit-tracker/src/main/java/com/wanbaohe/habittracker/ai/tool/HabitToolMarkdown.kt:23-35 | feature/household-items/src/main/java/com/wanbaohe/householditems/ai/tool/HouseholdToolMarkdown.kt:23-35 | feature/period/src/main/java/com/wanbaohe/period/ai/tool/PeriodToolMarkdown.kt:23-34 | feature/record-center/src/main/java/com/wanbaohe/recordcenter/ai/tool/RecordCenterToolMarkdown.kt:23-35 — before extracting anything, compare `feature/habit-tracker/src/main/java/com/wanbaohe/habittracker/ai/tool/HabitToolMarkdown.kt` and `feature/household-items/src/main/java/com/wanbaohe/householditems/ai/tool/HouseholdToolMarkdown.kt` as WHOLE FILES: 93% 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. 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 × 4) feature/settings/src/main/java/com/wanbaohe/setting/local/screen/LocalModelManagementScreen.kt:69— feature/settings/src/main/java/com/wanbaohe/setting/local/screen/LocalModelManagementScreen.kt:69-80 | feature/settings/src/main/java/com/wanbaohe/setting/memory/screen/MemoryManagementScreen.kt:73-84 | feature/settings/src/main/java/com/wanbaohe/setting/prompt/screen/SystemPromptManagementScreen.kt:49-60 | feature/settings/src/main/java/com/wanbaohe/setting/skill/screen/SkillManagementScreen.kt:91-102 — 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 `feature/settings/src/main/java/com/wanbaohe/setting/local/screen/LocalModelManagementScreen.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. Note first that the copies are not typed on the same thing: the declarations holding them bind `component` to `LocalModelManagementComponent` in one and `MemoryManagementComponent` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (9 lines × 6) feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/screenLogic/DeleteExifComponent.kt:295— feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/screenLogic/DeleteExifComponent.kt:295-303 | feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/screenLogic/FormatConversionComponent.kt:435-443 | feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/screenLogic/ImageCutterComponent.kt:309-317 | feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/screenLogic/LimitsResizeComponent.kt:418-426 | feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:502-510 | feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/screenLogic/WeightResizeComponent.kt:488-496 — before extracting anything, compare `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/screenLogic/FormatConversionComponent.kt` and `feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.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 (9 lines × 6) feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/screenLogic/DeleteExifComponent.kt:305— feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/screenLogic/DeleteExifComponent.kt:305-313 | feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/screenLogic/FormatConversionComponent.kt:445-453 | feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/screenLogic/ImageCutterComponent.kt:319-327 | feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/screenLogic/LimitsResizeComponent.kt:428-436 | feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:512-520 | feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/screenLogic/WeightResizeComponent.kt:498-506 — before extracting anything, compare `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/screenLogic/FormatConversionComponent.kt` and `feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/screenLogic/LimitsResizeComponent.kt:438` calls `getFormatForFilenameSelection` and `feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/screenLogic/DeleteExifComponent.kt:316` 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 (12 lines × 2 locations) web/code-editor/editor.src.js:132— web/code-editor/editor.src.js:132 · web/milkdown-editor/editor.src.js:175 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
Duplicated block (12 lines × 2 locations) web/milkdown-editor/editor.src.js:1909— web/milkdown-editor/editor.src.js:1909 · web/milkdown-editor/editor.src.js:1935 — 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 locations) web/code-editor/build.js:5— web/code-editor/build.js:5 · web/milkdown-editor/build.js:5 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
Duplicated block (11 lines × 2 locations) web/file_viewer/src/prose-doc.js:1729— web/file_viewer/src/prose-doc.js:1729 · web/file_viewer/src/prose-rtf.js:489 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (8 lines × 2 locations) REDACTED:660— REDACTED:660 · REDACTED:697 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (8 lines × 2 locations) web/file_viewer/src/prose-doc.js:1745— web/file_viewer/src/prose-doc.js:1745 · web/file_viewer/src/prose-rtf.js:505 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Multiple navigation landmarks without distinguishing labels web/file_transfer/index.html:2— With more than one navigation landmark, each needs an aria-label/aria-labelledby (e.g. "Primary", "Footer") so assistive tech can tell them apart. At least one nav here is unlabelled.
ChildProvider.createChild (cyclomatic 179) feature/app/src/main/java/com/t8rin/imagetoolbox/feature/root/presentation/components/navigation/ChildProvider.kt:215— ChildProvider.createChild has cyclomatic complexity 179 (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.
PlantUmlSubPipelineRegistry.detectBufferedKind (cyclomatic 85) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlSubPipelineRegistry.kt:350— PlantUmlSubPipelineRegistry.detectBufferedKind has cyclomatic complexity 85 (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.
GlassMaterialKt.glassVeil (cyclomatic 72) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassMaterial.kt:95— GlassMaterialKt.glassVeil has cyclomatic complexity 72 (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.
MermaidSessionPipeline.preprocessForStyle (cyclomatic 71) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidSessionPipeline.kt:167— MermaidSessionPipeline.preprocessForStyle has cyclomatic complexity 71 (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.
TextCardEditorScreenKt.TextCardEditorScreen (cyclomatic 70) feature/text-card/src/main/java/com/wanbaohe/textcard/presentation/editor/TextCardEditorScreen.kt:117— TextCardEditorScreenKt.TextCardEditorScreen has cyclomatic complexity 70 (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.
CloudStorageScreenKt.CloudStorageScreen (cyclomatic 56) feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/screen/CloudStorageScreen.kt:125— CloudStorageScreenKt.CloudStorageScreen has cyclomatic complexity 56 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BoardGameGifExportDialogKt.BoardGameGifExportDialog (cyclomatic 54) feature/boardgame/src/main/java/com/wanbaohe/boardgame/export/BoardGameGifExportDialog.kt:124— BoardGameGifExportDialogKt.BoardGameGifExportDialog has cyclomatic complexity 54 (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.
EditorScaffoldKt.EditorScaffold (cyclomatic 53) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/editor/EditorScaffold.kt:213— EditorScaffoldKt.EditorScaffold has cyclomatic complexity 53 (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.
AIEngineSettingsDetailScreenKt.AIEngineSettingsDetailScreen (cyclomatic 52) feature/settings/src/main/java/com/wanbaohe/setting/ai/screen/AIEngineSettingsDetailScreen.kt:125— AIEngineSettingsDetailScreenKt.AIEngineSettingsDetailScreen has cyclomatic complexity 52 (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.
HandleDeeplinksKt.handleDeeplinks (cyclomatic 51) core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/HandleDeeplinks.kt:54— HandleDeeplinksKt.handleDeeplinks has cyclomatic complexity 51 (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.
PlantUmlSubPipelineRegistry.classifyImmediate (cyclomatic 49) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlSubPipelineRegistry.kt:146— PlantUmlSubPipelineRegistry.classifyImmediate has cyclomatic complexity 49 (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.
ChatScreenKt.ChatScreen (cyclomatic 46) feature/dsh-client/src/main/java/com/wanbaohe/dsh/screen/ChatScreen.kt:153— ChatScreenKt.ChatScreen has cyclomatic complexity 46 (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.
MarkdownInlineDecorationKt.resolveInlineEndMarkers (cyclomatic 46) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/MarkdownInlineDecoration.kt:69— MarkdownInlineDecorationKt.resolveInlineEndMarkers has cyclomatic complexity 46 (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.
DocConvertTaskListScreenKt.DocConvertTaskItem (cyclomatic 43) feature/ocr-document/src/main/java/com/shifenmiao/feature/document/screen/DocConvertTaskListScreen.kt:433— DocConvertTaskListScreenKt.DocConvertTaskItem has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CalendarTabKt.festivalIconFor (cyclomatic 41) feature/calendar/src/main/java/com/wanbaohe/calendar/ui/CalendarTab.kt:1942— CalendarTabKt.festivalIconFor 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.
EditorScaffoldKt.EditorCanvas (cyclomatic 41) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/editor/EditorScaffold.kt:1235— EditorScaffoldKt.EditorCanvas has cyclomatic complexity 41 (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.
ProfileSettingItemKt.ProfileSettingItem (cyclomatic 41) feature/profile/src/main/java/com/wanbaohe/profile/settingItem/ProfileSettingItem.kt:72— ProfileSettingItemKt.ProfileSettingItem 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.
AuthCodeSettingsScreenKt.AuthCodeFlowDialog (cyclomatic 41) feature/settings/src/main/java/com/wanbaohe/setting/authcode/screen/AuthCodeSettingsScreen.kt:523— AuthCodeSettingsScreenKt.AuthCodeFlowDialog has cyclomatic complexity 41 (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.
FileBrowserScreenKt.FileBrowserScreen (cyclomatic 40) feature/file-browser/src/main/java/com/wanbaohe/file/browser/screen/FileBrowserScreen.kt:149— FileBrowserScreenKt.FileBrowserScreen has cyclomatic complexity 40 (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.
MeasurementScreenKt.FullScreenRulerBackground (cyclomatic 40) feature/measurement/src/main/java/com/wanbaohe/measurement/screen/MeasurementScreen.kt:525— MeasurementScreenKt.FullScreenRulerBackground has cyclomatic complexity 40 (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.
AIDuelChatComponent.streamWithTypewriter (cyclomatic 39) feature/ai/src/main/java/com/shifenmiao/ai/component/AIDuelChatComponent.kt:1086— AIDuelChatComponent.streamWithTypewriter has cyclomatic complexity 39 (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.
MermaidClassSubPipeline.renderClass (cyclomatic 39) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidClassSubPipeline.kt:84— MermaidClassSubPipeline.renderClass has cyclomatic complexity 39 (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.
UiFilterCodec.decodeValue (cyclomatic 38) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/serialization/UiFilterCodec.kt:268— UiFilterCodec.decodeValue has cyclomatic complexity 38 (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.
PlantUmlStateSubPipeline.renderState (cyclomatic 38) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlStateSubPipeline.kt:82— PlantUmlStateSubPipeline.renderState has cyclomatic complexity 38 (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.
GomokuOnlineGameSync.accept (cyclomatic 36) feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuGameComponent.kt:221— GomokuOnlineGameSync.accept has cyclomatic complexity 36 (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.
AIAddEngineScreenKt.AIAddEngineScreen (cyclomatic 36) feature/settings/src/main/java/com/wanbaohe/setting/ai/screen/AIAddEngineScreen.kt:99— AIAddEngineScreenKt.AIAddEngineScreen has cyclomatic complexity 36 (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.
PlantUmlClassSubPipeline.renderClass (cyclomatic 36) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlClassSubPipeline.kt:57— PlantUmlClassSubPipeline.renderClass has cyclomatic complexity 36 (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.
PlantUmlErdSubPipeline.renderDraw (cyclomatic 36) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlErdSubPipeline.kt:142— PlantUmlErdSubPipeline.renderDraw has cyclomatic complexity 36 (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.
IncrementalSelectionIndexBuilder.selectionEntriesForBlock (cyclomatic 36) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/internal/selection/SelectionModelIndex.kt:243— IncrementalSelectionIndexBuilder.selectionEntriesForBlock has cyclomatic complexity 36 (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.
CameraCaptureFlowKt.CameraCaptureFlow (cyclomatic 34) core/camera/src/main/java/com/wanbaohe/camera/CameraCaptureFlow.kt:55— CameraCaptureFlowKt.CameraCaptureFlow has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
QWeatherDataSourceKt.compassText (cyclomatic 34) core/weather/src/nonfoss/java/com/wanbaohe/core/weather/data/source/QWeatherDataSource.kt:549— QWeatherDataSourceKt.compassText has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DefaultMarkdownComposePainterKt.PaintRenderBlock (cyclomatic 34) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/internal/compose/DefaultMarkdownComposePainter.kt:323— DefaultMarkdownComposePainterKt.PaintRenderBlock has cyclomatic complexity 34 (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.
InlineFlowLayoutEngineKt.computeInlineFlowLayout (cyclomatic 34) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/internal/layout/inline/InlineFlowLayoutEngine.kt:14— InlineFlowLayoutEngineKt.computeInlineFlowLayout has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
editor.src.executeAction (cyclomatic 34) web/milkdown-editor/editor.src.js:1341— editor.src.executeAction has cyclomatic complexity 34 (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.
ProtocolRoutingAIRequestHandler.handleChatStreamOperation (cyclomatic 33) feature/ai/src/main/java/com/shifenmiao/ai/request/ProtocolRoutingAIRequestHandler.kt:162— ProtocolRoutingAIRequestHandler.handleChatStreamOperation has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ChessPlayersRowKt.ChessPlayersRow (cyclomatic 32) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessPlayersRow.kt:26— ChessPlayersRowKt.ChessPlayersRow has cyclomatic complexity 32 (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.
BlockRendererKt.BlockRenderer (cyclomatic 32) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/block/BlockRenderer.kt:32— BlockRendererKt.BlockRenderer has cyclomatic complexity 32 (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.
InlineCompiler.compileInlineNode (cyclomatic 32) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/internal/core/compile/InlineCompiler.kt:149— InlineCompiler.compileInlineNode has cyclomatic complexity 32 (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.
QuickAddTextParser.parseTimeMatch (cyclomatic 31) feature/marktodo/src/main/java/com/shifenmiao/marktodo/domain/QuickAddTextParser.kt:146— QuickAddTextParser.parseTimeMatch has cyclomatic complexity 31 (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.
MermaidXYChartSubPipeline.render (cyclomatic 31) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidXYChartSubPipeline.kt:73— MermaidXYChartSubPipeline.render has cyclomatic complexity 31 (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.
EventNodesKt.nodesFor (cyclomatic 30) feature/dsh-client/src/main/java/com/wanbaohe/dsh/session/EventNodes.kt:722— EventNodesKt.nodesFor has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
QuickAddTodoComponent.applyParsedMetadata (cyclomatic 30) feature/marktodo/src/main/java/com/shifenmiao/marktodo/screenLogic/QuickAddTodoComponent.kt:312— QuickAddTodoComponent.applyParsedMetadata has cyclomatic complexity 30 (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.
XiangqiBoardKt.XiangqiBoard (cyclomatic 30) feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/ui/board/XiangqiBoard.kt:72— XiangqiBoardKt.XiangqiBoard has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
MermaidStateSubPipeline.renderState (cyclomatic 30) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidStateSubPipeline.kt:73— MermaidStateSubPipeline.renderState has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
EditorLayerBoxKt.EditorLayerBox (cyclomatic 29) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/editor/EditorLayerBox.kt:82— EditorLayerBoxKt.EditorLayerBox has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Tokenizer.tokenize (cyclomatic 29) feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/expression/AgentToolExpressionValidator.kt:124— Tokenizer.tokenize has cyclomatic complexity 29 (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.
AIChatComponent.executeStreamingChat (cyclomatic 29) feature/ai/src/main/java/com/shifenmiao/ai/component/AIChatComponent.kt:763— AIChatComponent.executeStreamingChat has cyclomatic complexity 29 (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.
ToolCenterBottomSheetKt.ToolCenterBottomSheet (cyclomatic 29) feature/ai/src/main/java/com/shifenmiao/ai/ui/ToolCenterBottomSheet.kt:68— ToolCenterBottomSheetKt.ToolCenterBottomSheet has cyclomatic complexity 29 (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.
FileTransferServer.handleRequest (cyclomatic 29) feature/file-transfer/src/main/java/com/wanbaohe/file_transfer/server/FileTransferServer.kt:289— FileTransferServer.handleRequest has cyclomatic complexity 29 (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.
TodoTaskQuery.matchesFilter (cyclomatic 29) feature/marktodo/src/main/java/com/shifenmiao/marktodo/domain/TodoTaskQuery.kt:104— TodoTaskQuery.matchesFilter has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SafeHtmlPolicy.blockAction (cyclomatic 29) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/internal/core/compile/SafeHtmlPolicy.kt:79— SafeHtmlPolicy.blockAction has cyclomatic complexity 29 (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.
DefaultMarkdownLayoutEngineKt.layoutBlockInternal (cyclomatic 29) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/internal/layout/engine/DefaultMarkdownLayoutEngine.kt:154— DefaultMarkdownLayoutEngineKt.layoutBlockInternal has cyclomatic complexity 29 (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.
updateDiagramPreviews (cyclomatic 29) web/milkdown-editor/editor.src.js:528— updateDiagramPreviews has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 3 of the 29 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 538, 581, 591). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
AndroidFilenameCreator.constructImageFilename (cyclomatic 28) core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/AndroidFilenameCreator.kt:63— AndroidFilenameCreator.constructImageFilename has cyclomatic complexity 28 (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.
ProtocolRoutingAIRequestHandler.parseResponsesSsePayload (cyclomatic 28) feature/ai/src/main/java/com/shifenmiao/ai/request/ProtocolRoutingAIRequestHandler.kt:686— ProtocolRoutingAIRequestHandler.parseResponsesSsePayload has cyclomatic complexity 28 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ChessBoardKt.ChessBoard (cyclomatic 28) feature/chess/src/main/java/com/wanbaohe/chess/ui/board/ChessBoard.kt:104— ChessBoardKt.ChessBoard 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.
BitmapDrawerKt.BitmapDrawer (cyclomatic 28) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/BitmapDrawer.kt:86— BitmapDrawerKt.BitmapDrawer has cyclomatic complexity 28 (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.
QrTypeUtilsKt.toIntent (cyclomatic 28) feature/scan-qr-code/src/main/java/com/t8rin/imagetoolbox/feature/scan_qr_code/presentation/components/QrTypeUtils.kt:91— QrTypeUtilsKt.toIntent 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.
WatermarkCanvasKt.WatermarkCanvas (cyclomatic 28) feature/watermarking/src/main/java/com/shifenmiao/app/watermarking/presentation/canvas/WatermarkCanvas.kt:101— WatermarkCanvasKt.WatermarkCanvas 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.
PlantUmlTimeSeriesSubPipeline.render (cyclomatic 28) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlTimeSeriesSubPipeline.kt:80— PlantUmlTimeSeriesSubPipeline.render 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.
FileUtils.getPath (cyclomatic 27) core/base/src/main/java/com/shifenmiao/base/utils/FileUtils.kt:211— FileUtils.getPath has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CreationMetaConfigSheetKt.CreationMetaConfigSheet (cyclomatic 27) feature/common/src/main/java/com/shifenmiao/common/ui/CreationMetaConfigSheet.kt:94— CreationMetaConfigSheetKt.CreationMetaConfigSheet has cyclomatic complexity 27 (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.
AndroidImageDrawApplier.applyDrawToImage (cyclomatic 27) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/data/AndroidImageDrawApplier.kt:95— AndroidImageDrawApplier.applyDrawToImage has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MediaPickerGridKt.MediaPickerGrid (cyclomatic 27) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaPickerGrid.kt:76— MediaPickerGridKt.MediaPickerGrid has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PlantUmlSequenceSubPipeline.renderSequence (cyclomatic 27) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlSequenceSubPipeline.kt:85— PlantUmlSequenceSubPipeline.renderSequence has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
UiFilterCodec.encodeValue (cyclomatic 26) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/serialization/UiFilterCodec.kt:190— UiFilterCodec.encodeValue 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.
AdaptiveLayoutScreenKt.AdaptiveLayoutScreen (cyclomatic 26) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/AdaptiveLayoutScreen.kt:99— AdaptiveLayoutScreenKt.AdaptiveLayoutScreen 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.
QualitySelectorKt.QualitySelector (cyclomatic 26) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/selection/QualitySelector.kt:92— QualitySelectorKt.QualitySelector 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.
MarkdownSummary.derive (cyclomatic 26) core/utils/src/main/java/com/wanbaohe/com/string/MarkdownSummary.kt:39— MarkdownSummary.derive 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.
AIDuelChatComponent.runDuelLoop (cyclomatic 26) feature/ai/src/main/java/com/shifenmiao/ai/component/AIDuelChatComponent.kt:847— AIDuelChatComponent.runDuelLoop 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.
ChessRouterComponent.startPreparation (cyclomatic 26) feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt:278— ChessRouterComponent.startPreparation 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.
ChessGameScreenKt.ChessGameContent (cyclomatic 26) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessGameScreen.kt:254— ChessGameScreenKt.ChessGameContent 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.
NativeMarkdownEditorKt.NativeMarkdownEditor (cyclomatic 26) feature/common/src/main/java/com/shifenmiao/common/editor/NativeMarkdownEditor.kt:77— NativeMarkdownEditorKt.NativeMarkdownEditor has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
PaletteToolsContentKt.PaletteToolsContent (cyclomatic 26) feature/palette-tools/src/main/java/com/t8rin/imagetoolbox/feature/palette_tools/presentation/PaletteToolsContent.kt:97— PaletteToolsContentKt.PaletteToolsContent has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
BrowserScreenKt.BrowserScreen (cyclomatic 26) feature/webview/src/main/java/com/shifenmiao/webview/browser/BrowserScreen.kt:83— BrowserScreenKt.BrowserScreen 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.
FrameImageView.snapToBorders (cyclomatic 26) libs/collages/src/main/java/com/t8rin/collages/view/FrameImageView.kt:439— FrameImageView.snapToBorders has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
DynamicCropState.updateOverlayRect (cyclomatic 26) libs/cropper/src/main/java/com/t8rin/cropper/state/DynamicCropState.kt:385— DynamicCropState.updateOverlayRect has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
push_images.main (cyclomatic 26) fastlane/push_images.py:264— push_images.main 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.
AndroidFileController.saveImpl (cyclomatic 25) core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/AndroidFileController.kt:123— AndroidFileController.saveImpl has cyclomatic complexity 25 (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.
BottomButtonsBlockKt.BottomButtonsBlock (cyclomatic 25) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/buttons/BottomButtonsBlock.kt:98— BottomButtonsBlockKt.BottomButtonsBlock has cyclomatic complexity 25 (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.
GlassOutlinedTextFieldKt.modernGlassTextFieldContainer (cyclomatic 25) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassOutlinedTextField.kt:696— GlassOutlinedTextFieldKt.modernGlassTextFieldContainer has cyclomatic complexity 25 (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.
FeedbackRowKt.FeedbackRow (cyclomatic 25) feature/dsh-client/src/main/java/com/wanbaohe/dsh/screen/FeedbackRow.kt:111— FeedbackRowKt.FeedbackRow has cyclomatic complexity 25 (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.
QuickAddTodoComponent.handleEvent (cyclomatic 25) feature/marktodo/src/main/java/com/shifenmiao/marktodo/screenLogic/QuickAddTodoComponent.kt:109— QuickAddTodoComponent.handleEvent 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.
ExportSettingsSheetKt.ExportSettingsSheet (cyclomatic 25) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/export/ExportSettingsSheet.kt:84— ExportSettingsSheetKt.ExportSettingsSheet has cyclomatic complexity 25 (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.
MediaPlayerScreenKt.MediaPlayerScreen (cyclomatic 25) feature/media-player/src/main/java/com/wanbaohe/media/screen/MediaPlayerScreen.kt:112— MediaPlayerScreenKt.MediaPlayerScreen has cyclomatic complexity 25 (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.
MermaidErSubPipeline.renderDraw (cyclomatic 25) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidErSubPipeline.kt:180— MermaidErSubPipeline.renderDraw has cyclomatic complexity 25 (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.
editor.src.bindSelectionToolbar (cyclomatic 25) web/code-editor/editor.src.js:496— editor.src.bindSelectionToolbar has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 2 of the 25 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 513, handleLongPressStart, a function literal at line 500, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
ScreenConstantsImpl.valueOf (cyclomatic 24) core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/navigation/ScreenUtils.kt:632— ScreenConstantsImpl.valueOf has cyclomatic complexity 24 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: ScreenUtilsKt.simpleName (cyclomatic 147) 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.
MeshGradientBackgroundKt.meshRecipe (cyclomatic 24) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/MeshGradientBackground.kt:334— MeshGradientBackgroundKt.meshRecipe 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.
ThemeSettingTool.buildThemeChange (cyclomatic 24) feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ThemeSettingTool.kt:535— ThemeSettingTool.buildThemeChange has cyclomatic complexity 24 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
MemoryRepository.buildPromptFragment (cyclomatic 24) feature/ai/src/main/java/com/shifenmiao/ai/memory/MemoryRepository.kt:191— MemoryRepository.buildPromptFragment 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.
AIDuelChatScreenKt.DuelChatContent (cyclomatic 24) feature/ai/src/main/java/com/shifenmiao/ai/screen/AIDuelChatScreen.kt:310— AIDuelChatScreenKt.DuelChatContent 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.
ApngToolsContentKt.ApngToolsContent (cyclomatic 24) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:119— ApngToolsContentKt.ApngToolsContent 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.
EventNodesKt.foldChunks (cyclomatic 24) feature/dsh-client/src/main/java/com/wanbaohe/dsh/session/EventNodes.kt:553— EventNodesKt.foldChunks 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.
UnitConverterComponent.buildExpression (cyclomatic 24) feature/unit-converter/src/main/java/com/wanbaohe/unitconverter/component/UnitConverterComponent.kt:329— UnitConverterComponent.buildExpression 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.
XiangqiAiPickerBottomSheetKt.SourceRow (cyclomatic 24) feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/ui/XiangqiAiPickerBottomSheet.kt:191— XiangqiAiPickerBottomSheetKt.SourceRow has cyclomatic complexity 24 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
DiagramCanvasKt.execute (cyclomatic 24) libs/diagram/src/upstream/java/com/hrm/diagram/render/compose/DiagramCanvas.kt:223— DiagramCanvasKt.execute has cyclomatic complexity 24 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
MermaidGanttSubPipeline.render (cyclomatic 24) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidGanttSubPipeline.kt:69— MermaidGanttSubPipeline.render 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.
AppDatabase.getInstanceOrCreate (cyclomatic 23) core/database/src/main/java/com/shifenmiao/database/AppDatabase.kt:307— AppDatabase.getInstanceOrCreate has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DefaultContentTypeResolver.resolve (cyclomatic 23) core/domain/src/main/kotlin/com/t8rin/imagetoolbox/core/domain/content/ContentTypeResolver.kt:65— DefaultContentTypeResolver.resolve 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.
TopAppBarTitleKt.TopAppBarTitle (cyclomatic 23) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/text/TopAppBarTitle.kt:49— TopAppBarTitleKt.TopAppBarTitle has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DecisionWheelSpinScreenKt.DecisionWheelSpinScreen (cyclomatic 23) feature/decision-wheel/src/main/java/com/wanbaohe/decisionwheel/screen/DecisionWheelSpinScreen.kt:114— DecisionWheelSpinScreenKt.DecisionWheelSpinScreen has cyclomatic complexity 23 (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.
GomokuGameComponent.onCellTap (cyclomatic 23) feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuGameComponent.kt:424— GomokuGameComponent.onCellTap has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
IdPhotoPresetCatalog.catalogKeyFor (cyclomatic 23) feature/id-photo/src/main/java/com/wanbaohe/idphoto/domain/IdPhotoPresetCatalog.kt:87— IdPhotoPresetCatalog.catalogKeyFor 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.
LoginComponent.onForgotPasswordUiEvent (cyclomatic 23) feature/login/src/main/java/com/shifenmiao/login/viewModel/LoginComponent.kt:678— LoginComponent.onForgotPasswordUiEvent has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AndroidTextCardLayoutEngine.paginate (cyclomatic 23) feature/text-card/src/main/java/com/wanbaohe/textcard/data/render/AndroidTextCardLayoutEngine.kt:52— AndroidTextCardLayoutEngine.paginate has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DefaultWatermarkContentResolver.resolve (cyclomatic 23) feature/watermarking/src/main/java/com/shifenmiao/app/watermarking/data/context/DefaultWatermarkContentResolver.kt:49— DefaultWatermarkContentResolver.resolve has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
WebpToolsContentKt.WebpToolsContent (cyclomatic 23) feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt:116— WebpToolsContentKt.WebpToolsContent has cyclomatic complexity 23 (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.
XiangqiGameComponent.observeGame (cyclomatic 23) feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiGameComponent.kt:693— XiangqiGameComponent.observeGame has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
GeometryUtils.shrinkPathCollage_3_3 (cyclomatic 23) libs/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:133— GeometryUtils.shrinkPathCollage_3_3 has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PlantUmlActivitySubPipeline.render (cyclomatic 23) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlActivitySubPipeline.kt:409— PlantUmlActivitySubPipeline.render has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AIDuelChatScreenKt.DuelStatusBar (cyclomatic 22) feature/ai/src/main/java/com/shifenmiao/ai/screen/AIDuelChatScreen.kt:1492— AIDuelChatScreenKt.DuelStatusBar 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.
AigcFileMetadataReader.readPdfLiteralString (cyclomatic 22) feature/common/src/main/java/com/shifenmiao/common/file/AigcFileMetadataReader.kt:138— AigcFileMetadataReader.readPdfLiteralString 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.
CompareScreenContentImplKt.CompareScreenContentImpl (cyclomatic 22) feature/compare/src/main/java/com/t8rin/imagetoolbox/feature/compare/presentation/components/CompareScreenContentImpl.kt:75— CompareScreenContentImplKt.CompareScreenContentImpl 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.
UiPathPaintCanvasActionKt.UiPathPaintCanvasAction (cyclomatic 22) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/UiPathPaintCanvasAction.kt:82— UiPathPaintCanvasActionKt.UiPathPaintCanvasAction 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.
GomokuRouterScreenKt.GomokuRouterScreen (cyclomatic 22) feature/gomoku/src/main/java/com/wanbaohe/gomoku/router/GomokuRouterScreen.kt:60— GomokuRouterScreenKt.GomokuRouterScreen 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.
GomokuGameScreenKt.gomokuPlayerData (cyclomatic 22) feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuGameScreen.kt:349— GomokuGameScreenKt.gomokuPlayerData has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
IdPhotoScreenKt.IdPhotoScreen (cyclomatic 22) feature/id-photo/src/main/java/com/wanbaohe/idphoto/presentation/screen/IdPhotoScreen.kt:124— IdPhotoScreenKt.IdPhotoScreen has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
AndroidImageCombiner.combineImages (cyclomatic 22) feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/data/AndroidImageCombiner.kt:78— AndroidImageCombiner.combineImages has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
MarkupProjectStore.normalizeDocument (cyclomatic 22) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupProjectStore.kt:161— MarkupProjectStore.normalizeDocument 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.
MaskToolSheetKt.MaskToolSheet (cyclomatic 22) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/tools/mask/MaskToolSheet.kt:93— MaskToolSheetKt.MaskToolSheet 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.
TextCardExportSheetKt.TextCardExportSheet (cyclomatic 22) feature/text-card/src/main/java/com/wanbaohe/textcard/presentation/editor/TextCardExportSheet.kt:59— TextCardExportSheetKt.TextCardExportSheet has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
DynamicThemeKt.getColorScheme (cyclomatic 22) libs/dynamic-theme/src/main/java/com/t8rin/dynamic/theme/DynamicTheme.kt:636— DynamicThemeKt.getColorScheme 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.
HtmlBlockModelCompiler.compileFlow (cyclomatic 22) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/internal/core/compile/HtmlBlockModelCompiler.kt:144— HtmlBlockModelCompiler.compileFlow 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.
Moire.applyMask (cyclomatic 22) libs/opencv-tools/src/main/java/com/t8rin/opencv_tools/moire/Moire.kt:179— Moire.applyMask 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.
AiUtils.buildUserRequestMessage (cyclomatic 21) feature/ai/src/main/java/com/shifenmiao/ai/utils/AiUtils.kt:366— AiUtils.buildUserRequestMessage has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
ChessGameComponent.observeGame (cyclomatic 21) feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:835— ChessGameComponent.observeGame 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.
ChessRouterScreenKt.ChessRouterScreen (cyclomatic 21) feature/chess/src/main/java/com/wanbaohe/chess/router/ChessRouterScreen.kt:60— ChessRouterScreenKt.ChessRouterScreen 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.
WebDavXmlParser.parsePropfind (cyclomatic 21) feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/adapter/WebDavXmlParser.kt:46— WebDavXmlParser.parsePropfind 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.
AIEngineRepository.ensureFlavorPresetEngines (cyclomatic 21) feature/common/src/main/java/com/shifenmiao/common/manager/AIEngineRepository.kt:216— AIEngineRepository.ensureFlavorPresetEngines 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.
ImageWorkspaceKt.ImageWorkspace (cyclomatic 21) feature/common/src/main/java/com/shifenmiao/common/ui/ImageWorkspace.kt:327— ImageWorkspaceKt.ImageWorkspace 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.
ZoomableImagePreviewKt.ZoomableImagePreview (cyclomatic 21) feature/common/src/main/java/com/shifenmiao/common/ui/ZoomableImagePreview.kt:102— ZoomableImagePreviewKt.ZoomableImagePreview 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.
GomokuGameComponent.observeGame (cyclomatic 21) feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuGameComponent.kt:959— GomokuGameComponent.observeGame 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.
GomokuGameScreenKt.GameContent (cyclomatic 21) feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuGameScreen.kt:217— GomokuGameScreenKt.GameContent 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.
CreateNoteScreenKt.CreateNoteScreen (cyclomatic 21) feature/online/src/main/java/com/shifenmiao/online/screen/CreateNoteScreen.kt:89— CreateNoteScreenKt.CreateNoteScreen has cyclomatic complexity 21 (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.
AIEngineSettingsDetailScreenKt.ServerConnectivityCard (cyclomatic 21) feature/settings/src/main/java/com/wanbaohe/setting/ai/screen/AIEngineSettingsDetailScreen.kt:847— AIEngineSettingsDetailScreenKt.ServerConnectivityCard has cyclomatic complexity 21 (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.
ThemeSettingsScreenKt.ThemeSettingsScreen (cyclomatic 21) feature/settings/src/main/java/com/wanbaohe/setting/theme/screen/ThemeSettingsScreen.kt:151— ThemeSettingsScreenKt.ThemeSettingsScreen has cyclomatic complexity 21 (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.
WatermarkingContentKt.WatermarkingContent (cyclomatic 21) feature/watermarking/src/main/java/com/shifenmiao/app/watermarking/presentation/WatermarkingContent.kt:78— WatermarkingContentKt.WatermarkingContent has cyclomatic complexity 21 (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.
CustomWebView.onTouchEvent (cyclomatic 21) feature/webview/src/main/java/com/shifenmiao/webview/common/CustomWebView.kt:101— CustomWebView.onTouchEvent 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.
XiangqiRouterScreenKt.XiangqiRouterScreen (cyclomatic 21) feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/router/XiangqiRouterScreen.kt:75— XiangqiRouterScreenKt.XiangqiRouterScreen 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.
XiangqiLibraryScreenKt.GameCard (cyclomatic 21) feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiLibraryScreen.kt:153— XiangqiLibraryScreenKt.GameCard 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.
XiangqiSetupScreenKt.XiangqiSetupScreen (cyclomatic 21) feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiSetupScreen.kt:87— XiangqiSetupScreenKt.XiangqiSetupScreen has cyclomatic complexity 21 (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.
PlantUmlSaltSubPipeline.render (cyclomatic 21) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlSaltSubPipeline.kt:50— PlantUmlSaltSubPipeline.render 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.
upload.handleFiles (cyclomatic 21) web/file_transfer/js/features/upload/upload.js:91— upload.handleFiles has cyclomatic complexity 21 (threshold 15). Of this number, 18 points are the body's own statements and 3 belong to 3 function literals inside it that branch. 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.
FilterItemKt.FilterItem (cyclomatic 20) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterItem.kt:91— FilterItemKt.FilterItem 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.
HttpRequestService.request (cyclomatic 20) core/network/src/main/java/com/shifenmiao/network/service/HttpRequestService.kt:87— HttpRequestService.request has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ManageTodoTool.handleList (cyclomatic 20) feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageTodoTool.kt:348— ManageTodoTool.handleList has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: ManageTodoTool.normalizeAction (cyclomatic 59) 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.
AgentFileServiceImpl.globToRegex (cyclomatic 20) feature/ai/src/main/java/com/shifenmiao/ai/service/AgentFileServiceImpl.kt:1238— AgentFileServiceImpl.globToRegex has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
StatsTabKt.SummaryMetricCard (cyclomatic 20) feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/screen/tab/StatsTab.kt:350— StatsTabKt.SummaryMetricCard has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
GomokuBoardKt.GomokuBoard (cyclomatic 20) feature/gomoku/src/main/java/com/wanbaohe/gomoku/ui/board/GomokuBoard.kt:74— GomokuBoardKt.GomokuBoard 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.
TodoDetailScreenKt.TodoDetailScreen (cyclomatic 20) feature/marktodo/src/main/java/com/shifenmiao/marktodo/screen/TodoDetailScreen.kt:89— TodoDetailScreenKt.TodoDetailScreen 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.
DrawEditOptionKt.DrawEditOption (cyclomatic 20) feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/components/DrawEditOption.kt:115— DrawEditOptionKt.DrawEditOption 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.
TextStylePanelKt.TextStylePanel (cyclomatic 20) feature/text-card/src/main/java/com/wanbaohe/textcard/presentation/editor/panels/TextStylePanel.kt:140— TextStylePanelKt.TextStylePanel 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.
MermaidCompatibilityNormalizerKt.topLevelArrowOffsets (cyclomatic 20) libs/diagram/src/main/java/com/wanbaohe/diagram/MermaidCompatibilityNormalizer.kt:39— MermaidCompatibilityNormalizerKt.topLevelArrowOffsets 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.
InlineRenderUtilsKt.parseCssColor (cyclomatic 20) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/inline/InlineRenderUtils.kt:74— InlineRenderUtilsKt.parseCssColor has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
InlineHtmlNormalizer.normalize (cyclomatic 20) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/internal/core/compile/InlineHtmlNormalizer.kt:65— InlineHtmlNormalizer.normalize 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.
upload.renderUploadModalList (cyclomatic 20) web/file_transfer/js/features/upload/upload.js:398— upload.renderUploadModalList has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 8 of the 20 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 417, 468). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
PairItemKt.PairItem (cyclomatic 19) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/PairItem.kt:40— PairItemKt.PairItem has cyclomatic complexity 19 (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.
MusicVideoObject.equals (cyclomatic 19) core/model/src/main/java/com/shifenmiao/model/wechat/common/MediaObject.kt:259— MusicVideoObject.equals 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.
ResumableFileDownloader.download (cyclomatic 19) core/network/src/main/java/com/shifenmiao/network/downloader/ResumableFileDownloader.kt:48— ResumableFileDownloader.download 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.
EnhancedRangeSliderItemKt.EnhancedRangeSliderItem (cyclomatic 19) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedRangeSliderItem.kt:90— EnhancedRangeSliderItemKt.EnhancedRangeSliderItem 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.
DragHandlerKt.dragHandler (cyclomatic 19) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/modifier/DragHandler.kt:61— DragHandlerKt.dragHandler 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.
EditFileTool.validate (cyclomatic 19) feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/EditFileTool.kt:236— EditFileTool.validate has cyclomatic complexity 19 (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.
AIChatComponent.handleLlmEvent (cyclomatic 19) feature/ai/src/main/java/com/shifenmiao/ai/component/AIChatComponent.kt:1040— AIChatComponent.handleLlmEvent has cyclomatic complexity 19 (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.
AiUtils.processStreamLine (cyclomatic 19) feature/ai/src/main/java/com/shifenmiao/ai/utils/AiUtils.kt:725— AiUtils.processStreamLine has cyclomatic complexity 19 (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.
CalendarTabKt.FotoCard (cyclomatic 19) feature/calendar/src/main/java/com/wanbaohe/calendar/ui/CalendarTab.kt:523— CalendarTabKt.FotoCard 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.
MoveGenerator.castlingMoves (cyclomatic 19) feature/chess/src/main/java/com/wanbaohe/chess/domain/MoveGenerator.kt:145— MoveGenerator.castlingMoves 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.
CodeEditorScreenKt.CodeEditorScreen (cyclomatic 19) feature/code-editor/src/main/java/com/wanbaohe/code/editor/screen/CodeEditorScreen.kt:90— CodeEditorScreenKt.CodeEditorScreen 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.
AIPromptExecutor.executeStreaming (cyclomatic 19) feature/common/src/main/java/com/shifenmiao/common/ai/AIPromptExecutor.kt:230— AIPromptExecutor.executeStreaming 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.
EventNodesKt.extractNodes (cyclomatic 19) feature/dsh-client/src/main/java/com/wanbaohe/dsh/session/EventNodes.kt:238— EventNodesKt.extractNodes 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.
OnlinePlayUseCase.connect (cyclomatic 19) feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/OnlinePlayUseCase.kt:231— OnlinePlayUseCase.connect 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.
GomokuSetupScreenKt.GomokuSetupScreen (cyclomatic 19) feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuSetupScreen.kt:79— GomokuSetupScreenKt.GomokuSetupScreen 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.
ScheduleLinkStatusKt.ScheduleLinkStatus (cyclomatic 19) feature/marktodo/src/main/java/com/shifenmiao/marktodo/components/ScheduleLinkStatus.kt:63— ScheduleLinkStatusKt.ScheduleLinkStatus 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.
TodoTaskRowKt.TodoTaskRow (cyclomatic 19) feature/marktodo/src/main/java/com/shifenmiao/marktodo/components/TodoTaskRow.kt:63— TodoTaskRowKt.TodoTaskRow 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.
MarkTodoScreenKt.MarkTodoScreen (cyclomatic 19) feature/marktodo/src/main/java/com/shifenmiao/marktodo/screen/MarkTodoScreen.kt:109— MarkTodoScreenKt.MarkTodoScreen has cyclomatic complexity 19 (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.
CropToolScreenKt.resizeLocked (cyclomatic 19) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/tools/crop/CropToolScreen.kt:556— CropToolScreenKt.resizeLocked 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.
GeometryUtils.shrinkPath (cyclomatic 19) libs/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:207— GeometryUtils.shrinkPath 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.
MultiTouchHandler.touch (cyclomatic 19) libs/collages/src/main/java/com/t8rin/collages/view/MultiTouchHandler.kt:80— MultiTouchHandler.touch 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.
MermaidSequenceSubPipeline.renderSequence (cyclomatic 19) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidSequenceSubPipeline.kt:64— MermaidSequenceSubPipeline.renderSequence 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.
PlantUmlXYChartSubPipeline.render (cyclomatic 19) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlXYChartSubPipeline.kt:57— PlantUmlXYChartSubPipeline.render 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.
TransformGestureKt.detectPointerTransformGestures (cyclomatic 19) libs/gesture/src/main/java/com/t8rin/gesture/TransformGesture.kt:203— TransformGestureKt.detectPointerTransformGestures 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.
InlineLayoutContentKt.PaintInlineLayoutContent (cyclomatic 19) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/internal/compose/InlineLayoutContent.kt:59— InlineLayoutContentKt.PaintInlineLayoutContent 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.
push_images.load_local (cyclomatic 19) fastlane/push_images.py:96— push_images.load_local 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.
i18n.detectLang::normalize (cyclomatic 19) web/file_transfer/js/core/i18n.js:14— i18n.detectLang::normalize 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.
editor.src.AndroidBridge.setImageWidth (cyclomatic 19) web/milkdown-editor/editor.src.js:1859— editor.src.AndroidBridge.setImageWidth has cyclomatic complexity 19 (threshold 15). Of this number, 13 points are the body's own statements and 6 belong to 2 function literals inside it that branch. 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.
ConfettiHostStateKt.ConfettiHost (cyclomatic 18) core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/confetti/ConfettiHostState.kt:162— ConfettiHostStateKt.ConfettiHost has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ColorSelectionRowKt.ColorSelectionRow (cyclomatic 18) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/color_picker/ColorSelectionRow.kt:84— ColorSelectionRowKt.ColorSelectionRow 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.
PickFontFamilySheetKt.DownloadableFontRow (cyclomatic 18) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/selection/PickFontFamilySheet.kt:348— PickFontFamilySheetKt.DownloadableFontRow 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.
HyperOSSwitchKt.HyperOSSwitch (cyclomatic 18) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/switches/HyperOSSwitch.kt:78— HyperOSSwitchKt.HyperOSSwitch 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.
AiExecutionTimelineCardKt.AiExecutionStepRow (cyclomatic 18) feature/ai/src/main/java/com/shifenmiao/ai/execution/component/AiExecutionTimelineCard.kt:280— AiExecutionTimelineCardKt.AiExecutionStepRow 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.
ElevationGaugeSectionKt.ElevationGaugeSection (cyclomatic 18) feature/altitude/src/main/java/com/wanbaohe/altitude/ui/ElevationGaugeSection.kt:76— ElevationGaugeSectionKt.ElevationGaugeSection 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.
ChessSetupScreenKt.ChessSetupScreen (cyclomatic 18) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessSetupScreen.kt:86— ChessSetupScreenKt.ChessSetupScreen 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.
FileBrowserScreenKt.NavigationToolbar (cyclomatic 18) feature/file-browser/src/main/java/com/wanbaohe/file/browser/screen/FileBrowserScreen.kt:720— FileBrowserScreenKt.NavigationToolbar 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.
DocConvertTaskListScreenKt.DocConvertTaskListScreen (cyclomatic 18) feature/ocr-document/src/main/java/com/shifenmiao/feature/document/screen/DocConvertTaskListScreen.kt:119— DocConvertTaskListScreenKt.DocConvertTaskListScreen has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Survive30sComponent.startGameLoop (cyclomatic 18) feature/survive30s/src/main/java/com/wanbaohe/survive30s/component/Survive30sComponent.kt:260— Survive30sComponent.startGameLoop 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.
AnnotationEditorUiKt.AnnotationToolRail (cyclomatic 18) feature/text-card/src/main/java/com/wanbaohe/textcard/presentation/editor/AnnotationEditorUi.kt:110— AnnotationEditorUiKt.AnnotationToolRail has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
DynamicCropState.getTouchRegion (cyclomatic 18) libs/cropper/src/main/java/com/t8rin/cropper/state/DynamicCropState.kt:742— DynamicCropState.getTouchRegion has cyclomatic complexity 18 (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.
MermaidRequirementSubPipeline.flowchartRender (cyclomatic 18) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidRequirementSubPipeline.kt:117— MermaidRequirementSubPipeline.flowchartRender has cyclomatic complexity 18 (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.
MermaidSessionPipeline.extractTripleColonClasses (cyclomatic 18) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidSessionPipeline.kt:532— MermaidSessionPipeline.extractTripleColonClasses 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.
InlineRenderUtilsKt.parseCssStyleToSpanStyle (cyclomatic 18) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/inline/InlineRenderUtils.kt:24— InlineRenderUtilsKt.parseCssStyleToSpanStyle has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: InlineRenderUtilsKt.inferStyleFromClasses (cyclomatic 19) 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.
InlineLayoutContentKt.drawInlineUnderlines (cyclomatic 18) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/internal/compose/InlineLayoutContent.kt:387— InlineLayoutContentKt.drawInlineUnderlines 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.
connectChat (cyclomatic 18) web/file_transfer/js/features/chat/ws.js:35— connectChat has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 5 of the 18 points are its own statements and the rest belongs to 5 function items inside it that branch (onmessage, a function literal at line 98, onopen, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
addTransferItem (cyclomatic 18) web/file_transfer/js/features/transfer/transfers.js:104— addTransferItem 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.
TripleItemKt.TripleItem (cyclomatic 17) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/TripleItem.kt:39— TripleItemKt.TripleItem 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.
CityPickerKt.CityPicker (cyclomatic 17) core/ui/src/main/java/com/wanbaohe/base/ui/picker/CityPicker.kt:144— CityPickerKt.CityPicker 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.
DefaultContentRouter.route (cyclomatic 17) core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/content/ContentRouter.kt:85— DefaultContentRouter.route 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.
EnhancedIconButtonKt.EnhancedIconButton (cyclomatic 17) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedIconButton.kt:63— EnhancedIconButtonKt.EnhancedIconButton 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.
EmojiSelectionSheetKt.EmojiSelectionSheet (cyclomatic 17) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/sheets/EmojiSelectionSheet.kt:100— EmojiSelectionSheetKt.EmojiSelectionSheet 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.
ThemePresetSelectorKt.ThemePresetCard (cyclomatic 17) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/theme/ThemePresetSelector.kt:269— ThemePresetSelectorKt.ThemePresetCard 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.
AIStreamAnswerComponent.runStreamingAnswer (cyclomatic 17) feature/ai/src/main/java/com/shifenmiao/ai/component/AIStreamAnswerComponent.kt:220— AIStreamAnswerComponent.runStreamingAnswer 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.
AIDuelChatScreenKt.DuelPickerBottomSheets (cyclomatic 17) feature/ai/src/main/java/com/shifenmiao/ai/screen/AIDuelChatScreen.kt:1627— AIDuelChatScreenKt.DuelPickerBottomSheets 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.
CreateAIAgentScreenKt.CreateAIAgentScreen (cyclomatic 17) feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:144— CreateAIAgentScreenKt.CreateAIAgentScreen 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.
CreateAIPromptScreenKt.CreateAIPromptScreen (cyclomatic 17) feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt:135— CreateAIPromptScreenKt.CreateAIPromptScreen 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.
AddRecordScreenKt.AddRecordScreen (cyclomatic 17) feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/screen/AddRecordScreen.kt:86— AddRecordScreenKt.AddRecordScreen 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.
CalendarTabKt.CalendarDayCell (cyclomatic 17) feature/calendar/src/main/java/com/wanbaohe/calendar/ui/CalendarTab.kt:1499— CalendarTabKt.CalendarDayCell 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.
ImportGameUseCase.parseImport (cyclomatic 17) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ImportGameUseCase.kt:203— ImportGameUseCase.parseImport 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.
OnlinePlayUseCase.connect (cyclomatic 17) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/OnlinePlayUseCase.kt:177— OnlinePlayUseCase.connect 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.
BoardState.nextCastlingRights (cyclomatic 17) feature/chess/src/main/java/com/wanbaohe/chess/domain/model/BoardState.kt:84— BoardState.nextCastlingRights 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.
BackupCenterScreenKt.message (cyclomatic 17) feature/common/src/main/java/com/shifenmiao/common/backup/BackupCenterScreen.kt:811— BackupCenterScreenKt.message 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.
CustomScrollableTabRowKt.GenericScrollableTabRow (cyclomatic 17) feature/common/src/main/java/com/shifenmiao/common/components/CustomScrollableTabRow.kt:70— CustomScrollableTabRowKt.GenericScrollableTabRow 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.
SubagentSheetKt.SubagentTranscriptView (cyclomatic 17) feature/dsh-client/src/main/java/com/wanbaohe/dsh/screen/SubagentSheet.kt:401— SubagentSheetKt.SubagentTranscriptView 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.
GifToolsContentKt.GifToolsContent (cyclomatic 17) feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/GifToolsContent.kt:68— GifToolsContentKt.GifToolsContent 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.
LibrariesContainerKt.LibrariesScaffold (cyclomatic 17) feature/libraries-info/src/main/java/com/t8rin/imagetoolbox/feature/libraries_info/presentation/components/LibrariesContainer.kt:303— LibrariesContainerKt.LibrariesScaffold 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.
AddTodoScreenKt.AddTodoScreen (cyclomatic 17) feature/marktodo/src/main/java/com/shifenmiao/marktodo/screen/AddTodoScreen.kt:92— AddTodoScreenKt.AddTodoScreen 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.
MediaPickerGridWithOverlaysKt.MediaPickerGridWithOverlays (cyclomatic 17) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaPickerGridWithOverlays.kt:107— MediaPickerGridWithOverlaysKt.MediaPickerGridWithOverlays 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.
OnDeviceOcrScreenKt.OnDeviceOcrScreen (cyclomatic 17) feature/on-device-ocr/src/main/java/com/wanbaohe/ocr/screen/OnDeviceOcrScreen.kt:93— OnDeviceOcrScreenKt.OnDeviceOcrScreen 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.
PagingDataItemScreenKt.PagingDataItemScreen (cyclomatic 17) feature/online/src/main/java/com/shifenmiao/online/screen/PagingDataItemScreen.kt:116— PagingDataItemScreenKt.PagingDataItemScreen 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.
QrTypeUtilsKt.createRaw (cyclomatic 17) feature/scan-qr-code/src/main/java/com/t8rin/imagetoolbox/feature/scan_qr_code/presentation/components/QrTypeUtils.kt:247— QrTypeUtilsKt.createRaw 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.
ContentPanelKt.DynamicContentControls (cyclomatic 17) feature/watermarking/src/main/java/com/shifenmiao/app/watermarking/presentation/panels/ContentPanel.kt:169— ContentPanelKt.DynamicContentControls 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.
XiangqiGameComponent.requestAiMove (cyclomatic 17) feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiGameComponent.kt:843— XiangqiGameComponent.requestAiMove 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.
GeometryUtils.createPathWithCircleCorner (cyclomatic 17) libs/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:366— GeometryUtils.createPathWithCircleCorner 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.
MermaidGitGraphSubPipeline.render (cyclomatic 17) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidGitGraphSubPipeline.kt:56— MermaidGitGraphSubPipeline.render 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.
PlantUmlActivitySubPipeline.buildSequence (cyclomatic 17) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlActivitySubPipeline.kt:176— PlantUmlActivitySubPipeline.buildSequence 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.
PlantUmlComponentSubPipeline.drawNode (cyclomatic 17) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:351— PlantUmlComponentSubPipeline.drawNode 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.
DocumentScannerActivity.onCreate (cyclomatic 17) libs/documentscanner/src/main/java/com/t8rin/documentscanner/DocumentScannerActivity.kt:144— DocumentScannerActivity.onCreate 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.
SeamCarver.findLowestEnergyVerticalSeamAvoidingMask (cyclomatic 17) libs/opencv-tools/src/main/java/com/t8rin/opencv_tools/seam_carving/SeamCarver.kt:450— SeamCarver.findLowestEnergyVerticalSeamAvoidingMask 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.
SeamCarver.findForwardVerticalSeamInternal (cyclomatic 17) libs/opencv-tools/src/main/java/com/t8rin/opencv_tools/seam_carving/SeamCarver.kt:595— SeamCarver.findForwardVerticalSeamInternal 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.
SafWorkspaceFileScanner.scan (cyclomatic 16) core/data/src/main/java/com/t8rin/imagetoolbox/core/data/workspace/search/SafWorkspaceFileScanner.kt:40— SafWorkspaceFileScanner.scan 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.
SkillFrontMatterParser.parse (cyclomatic 16) core/database/src/main/java/com/shifenmiao/database/ai/SkillFrontMatterParser.kt:46— SkillFrontMatterParser.parse 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.
MaterialComponentsKt.RowSelectorRenderer (cyclomatic 16) core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:1237— MaterialComponentsKt.RowSelectorRenderer 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. This shape REPEATS in the file: one other method here (MaterialComponentsKt.ColumnSelectorRenderer) 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.
MaterialComponentsKt.ColumnSelectorRenderer (cyclomatic 16) core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:1359— MaterialComponentsKt.ColumnSelectorRenderer 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. This shape REPEATS in the file: one other method here (MaterialComponentsKt.RowSelectorRenderer) 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.
ModifierRegistry.registerBuiltins (cyclomatic 16) core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/modifier/ModifierRegistry.kt:143— ModifierRegistry.registerBuiltins 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.
TemplateFilter.equals (cyclomatic 16) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/domain/model/TemplateFilter.kt:25— TemplateFilter.equals 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.
AsciiParamsItemKt.AsciiParamsItem (cyclomatic 16) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/AsciiParamsItem.kt:83— AsciiParamsItemKt.AsciiParamsItem 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.
ChineseDateRangePickerDialogKt.RangeDayCell (cyclomatic 16) core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDateRangePickerDialog.kt:512— ChineseDateRangePickerDialogKt.RangeDayCell has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
ImageFormatSelectorKt.ImageFormatSelector (cyclomatic 16) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/selection/ImageFormatSelector.kt:83— ImageFormatSelectorKt.ImageFormatSelector 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.
GlassModifierKt.flatContainerCoverage (cyclomatic 16) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassModifier.kt:237— GlassModifierKt.flatContainerCoverage 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.
GlassSegmentedButtonRowKt.GlassSegmentedButtonRowImpl (cyclomatic 16) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassSegmentedButtonRow.kt:276— GlassSegmentedButtonRowKt.GlassSegmentedButtonRowImpl 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.
ImageStickyHeaderKt.imageStickyHeader (cyclomatic 16) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/image/ImageStickyHeader.kt:93— ImageStickyHeaderKt.imageStickyHeader 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.
PictureKt.CoilPicture (cyclomatic 16) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/image/Picture.kt:180— PictureKt.CoilPicture 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.
CreateAIAgentComponent.generate (cyclomatic 16) feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:459— CreateAIAgentComponent.generate 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.
CreateAIPromptComponent.generate (cyclomatic 16) feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIPromptComponent.kt:496— CreateAIPromptComponent.generate 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.
AiChatErrorFactory.inferKindFromText (cyclomatic 16) feature/ai/src/main/java/com/shifenmiao/ai/error/AiChatError.kt:418— AiChatErrorFactory.inferKindFromText 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. This is NOT this file's highest cyclomatic complexity: AiChatErrorFactory.kindFor (cyclomatic 27) 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.
ProtocolRoutingAIRequestHandler.parseResponsesOutputItem (cyclomatic 16) feature/ai/src/main/java/com/shifenmiao/ai/request/ProtocolRoutingAIRequestHandler.kt:891— ProtocolRoutingAIRequestHandler.parseResponsesOutputItem 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.
AIChatScreenKt.AIChatScreen (cyclomatic 16) feature/ai/src/main/java/com/shifenmiao/ai/screen/AIChatScreen.kt:114— AIChatScreenKt.AIChatScreen has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
NewChatInputKt.StandardInputSection (cyclomatic 16) feature/ai/src/main/java/com/shifenmiao/ai/ui/NewChatInput.kt:293— NewChatInputKt.StandardInputSection 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.
NewChatInputKt.getStateText (cyclomatic 16) feature/ai/src/main/java/com/shifenmiao/ai/ui/NewChatInput.kt:678— NewChatInputKt.getStateText 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.
AppContentKt.StreamingRobotController (cyclomatic 16) feature/app/src/main/java/com/wanbaohe/app/AppContent.kt:494— AppContentKt.StreamingRobotController 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.
BlessingWallScreenKt.BlessingPage (cyclomatic 16) feature/blessing-wall/src/main/java/com/wanbaohe/blessingwall/screen/BlessingWallScreen.kt:565— BlessingWallScreenKt.BlessingPage 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.
LunarCalendarCalculator.solarToLunar (cyclomatic 16) feature/calendar/src/main/java/com/wanbaohe/calendar/data/LunarCalendarCalculator.kt:70— LunarCalendarCalculator.solarToLunar 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.
CalendarShareScreenKt.CalendarShareScreen (cyclomatic 16) feature/calendar/src/main/java/com/wanbaohe/calendar/share/CalendarShareScreen.kt:114— CalendarShareScreenKt.CalendarShareScreen 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.
ConversionTabKt.BuddhistCalendarCard (cyclomatic 16) feature/calendar/src/main/java/com/wanbaohe/calendar/ui/ConversionTab.kt:521— ConversionTabKt.BuddhistCalendarCard 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.
ChessGameComponent.start (cyclomatic 16) feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:506— ChessGameComponent.start 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.
ChessLibraryScreenKt.toCardData (cyclomatic 16) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessLibraryScreen.kt:141— ChessLibraryScreenKt.toCardData 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.
CollageMakerContentKt.CollageMakerContent (cyclomatic 16) feature/collage-maker/src/main/java/com/t8rin/imagetoolbox/collage_maker/presentation/CollageMakerContent.kt:139— CollageMakerContentKt.CollageMakerContent 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.
CommentsBottomSheetKt.CommentsList (cyclomatic 16) feature/common/src/main/java/com/shifenmiao/common/components/comments/CommentsBottomSheet.kt:276— CommentsBottomSheetKt.CommentsList 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.
GameEngine.move (cyclomatic 16) feature/game2048/src/main/java/com/wanbaohe/game2048/component/GameEngine.kt:44— GameEngine.move has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
MarkdownEditorScreenKt.MarkdownEditorScreen (cyclomatic 16) feature/markdown-edit/src/main/java/com/wanbaohe/markdown/edit/screen/MarkdownEditorScreen.kt:91— MarkdownEditorScreenKt.MarkdownEditorScreen 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.
TextLayerExportRenderer.draw (cyclomatic 16) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/render/TextLayerExportRenderer.kt:62— TextLayerExportRenderer.draw 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.
PasswordStrengthEvaluator.evaluate (cyclomatic 16) feature/password-vault/src/main/java/com/wanbaohe/passwordvault/util/PasswordStrength.kt:70— PasswordStrengthEvaluator.evaluate 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.
SkillManagementScreenKt.SkillManagementContent (cyclomatic 16) feature/settings/src/main/java/com/wanbaohe/setting/skill/screen/SkillManagementScreen.kt:105— SkillManagementScreenKt.SkillManagementContent 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.
SudokuEngine.generatePuzzleOnce (cyclomatic 16) feature/sudoku/src/main/java/com/wanbaohe/sudoku/logic/SudokuEngine.kt:131— SudokuEngine.generatePuzzleOnce 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.
TeleprompterPlayerScreenKt.TeleprompterPlayerScreen (cyclomatic 16) feature/teleprompter/src/main/java/com/wanbaohe/teleprompter/screen/TeleprompterPlayerScreen.kt:79— TeleprompterPlayerScreenKt.TeleprompterPlayerScreen 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.
CardAnnotationLayerKt.CardAnnotationLayer (cyclomatic 16) feature/text-card/src/main/java/com/wanbaohe/textcard/presentation/editor/CardAnnotationLayer.kt:45— CardAnnotationLayerKt.CardAnnotationLayer 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.
XiangqiGameScreenKt.XiangqiPlayersRow (cyclomatic 16) feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiGameScreen.kt:809— XiangqiGameScreenKt.XiangqiPlayersRow has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
ParamsManager.updateParams (cyclomatic 16) libs/collages/src/main/java/com/t8rin/collages/utils/ParamsManager.kt:50— ParamsManager.updateParams 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.
MermaidMindmapSubPipeline.render (cyclomatic 16) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidMindmapSubPipeline.kt:54— MermaidMindmapSubPipeline.render 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.
MarkdownDocumentRendererKt.MarkdownDocumentRenderer (cyclomatic 16) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/MarkdownDocumentRenderer.kt:40— MarkdownDocumentRendererKt.MarkdownDocumentRenderer 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.
MarkdownTextSearchKt.findTextMatches (cyclomatic 16) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/MarkdownTextSearch.kt:210— MarkdownTextSearchKt.findTextMatches 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.
SelectionModelIndexKt.buildSelectionIndexFromLayout (cyclomatic 16) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/internal/selection/SelectionModelIndex.kt:364— SelectionModelIndexKt.buildSelectionIndexFromLayout 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.
transfers.mergeCompletedDuplicates (cyclomatic 16) web/file_transfer/js/features/transfer/transfers.js:153— transfers.mergeCompletedDuplicates has cyclomatic complexity 16 (threshold 15). Of this number, 8 points are the body's own statements and 8 belong to one function literal inside it that branches. 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.
XxxComment feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/GetCurrentTimeTool.kt:70— // 使用 Z 代替 XXX,兼容 API 23+ — 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.
MermaidSessionPipeline.preprocessForStyle (cognitive 182) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidSessionPipeline.kt:167— MermaidSessionPipeline.preprocessForStyle has cognitive complexity 182 (threshold 15). Drivers by points: if/else 51 (117 pts), loops 11 (48 pts), boolean chains 17 (nesting depth added 103). 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.
HandleDeeplinksKt.handleDeeplinks (cognitive 135) core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/HandleDeeplinks.kt:54— HandleDeeplinksKt.handleDeeplinks has cognitive complexity 135 (threshold 15). Drivers by points: if/else 44 (117 pts), boolean chains 10, match/switch 3 (8 pts) (nesting depth added 78). 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.
CloudStorageScreenKt.CloudStorageScreen (cognitive 102) feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/screen/CloudStorageScreen.kt:125— CloudStorageScreenKt.CloudStorageScreen has cognitive complexity 102 (threshold 15). Drivers by points: if/else 66 (91 pts), boolean chains 7, match/switch 2 (4 pts) (nesting depth added 27). 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.
DocConvertTaskListScreenKt.DocConvertTaskItem (cognitive 100) feature/ocr-document/src/main/java/com/shifenmiao/feature/document/screen/DocConvertTaskListScreen.kt:433— DocConvertTaskListScreenKt.DocConvertTaskItem has cognitive complexity 100 (threshold 15). Drivers by points: if/else 48 (92 pts), boolean chains 5, match/switch 3 (nesting depth added 44). 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.
AIEngineSettingsDetailScreenKt.AIEngineSettingsDetailScreen (cognitive 94) feature/settings/src/main/java/com/wanbaohe/setting/ai/screen/AIEngineSettingsDetailScreen.kt:125— AIEngineSettingsDetailScreenKt.AIEngineSettingsDetailScreen has cognitive complexity 94 (threshold 15). Drivers by points: if/else 57 (80 pts), boolean chains 14 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InlineFlowLayoutEngineKt.computeInlineFlowLayout (cognitive 88) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/internal/layout/inline/InlineFlowLayoutEngine.kt:14— InlineFlowLayoutEngineKt.computeInlineFlowLayout has cognitive complexity 88 (threshold 15). Drivers by points: if/else 21 (62 pts), loops 5 (16 pts), boolean chains 8, match/switch 1 (2 pts) (nesting depth added 53). 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.
BoardGameGifExportDialogKt.BoardGameGifExportDialog (cognitive 85) feature/boardgame/src/main/java/com/wanbaohe/boardgame/export/BoardGameGifExportDialog.kt:124— BoardGameGifExportDialogKt.BoardGameGifExportDialog has cognitive complexity 85 (threshold 15). Drivers by points: if/else 36 (55 pts), error handling 11 (14 pts), boolean chains 10, match/switch 2 (6 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TextCardEditorScreenKt.TextCardEditorScreen (cognitive 83) feature/text-card/src/main/java/com/wanbaohe/textcard/presentation/editor/TextCardEditorScreen.kt:117— TextCardEditorScreenKt.TextCardEditorScreen has cognitive complexity 83 (threshold 15). Drivers by points: if/else 48 (65 pts), boolean chains 13, match/switch 5 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PlantUmlSubPipelineRegistry.detectBufferedKind (cognitive 83) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlSubPipelineRegistry.kt:350— PlantUmlSubPipelineRegistry.detectBufferedKind has cognitive complexity 83 (threshold 15). Drivers by points: if/else 26 (51 pts), boolean chains 30, loops 1, match/switch 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FileBrowserScreenKt.FileBrowserScreen (cognitive 82) feature/file-browser/src/main/java/com/wanbaohe/file/browser/screen/FileBrowserScreen.kt:149— FileBrowserScreenKt.FileBrowserScreen has cognitive complexity 82 (threshold 15). Drivers by points: if/else 50 (77 pts), boolean chains 5 (nesting depth added 27). 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.
MarkdownInlineDecorationKt.resolveInlineEndMarkers (cognitive 74) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/MarkdownInlineDecoration.kt:69— MarkdownInlineDecorationKt.resolveInlineEndMarkers has cognitive complexity 74 (threshold 15). Drivers by points: if/else 42 (64 pts), boolean chains 4, loops 2 (3 pts), match/switch 2 (3 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FileUtils.getPath (cognitive 71) core/base/src/main/java/com/shifenmiao/base/utils/FileUtils.kt:211— FileUtils.getPath has cognitive complexity 71 (threshold 15). Drivers by points: if/else 24 (54 pts), error handling 2 (10 pts), loops 1 (5 pts), boolean chains 2 (nesting depth added 42). 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.
MeasurementScreenKt.FullScreenRulerBackground (cognitive 70) feature/measurement/src/main/java/com/wanbaohe/measurement/screen/MeasurementScreen.kt:525— MeasurementScreenKt.FullScreenRulerBackground has cognitive complexity 70 (threshold 15). Drivers by points: match/switch 12 (32 pts), if/else 16 (30 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 36). 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.
EditorScaffoldKt.EditorCanvas (cognitive 68) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/editor/EditorScaffold.kt:1235— EditorScaffoldKt.EditorCanvas has cognitive complexity 68 (threshold 15). Drivers by points: if/else 27 (50 pts), boolean chains 15, match/switch 1 (2 pts), loops 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GlassMaterialKt.glassVeil (cognitive 67) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassMaterial.kt:95— GlassMaterialKt.glassVeil has cognitive complexity 67 (threshold 15). Drivers by points: if/else 34 (38 pts), boolean chains 21, match/switch 8 (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.
EditorScaffoldKt.EditorScaffold (cognitive 66) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/editor/EditorScaffold.kt:213— EditorScaffoldKt.EditorScaffold has cognitive complexity 66 (threshold 15). Drivers by points: if/else 37 (47 pts), match/switch 8 (10 pts), boolean chains 9 (nesting depth added 12). 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.
PlantUmlStateSubPipeline.renderState (cognitive 65) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlStateSubPipeline.kt:82— PlantUmlStateSubPipeline.renderState has cognitive complexity 65 (threshold 15). Drivers by points: if/else 24 (53 pts), loops 5 (7 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 32). 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.
PlantUmlErdSubPipeline.renderDraw (cognitive 61) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlErdSubPipeline.kt:142— PlantUmlErdSubPipeline.renderDraw has cognitive complexity 61 (threshold 15). Drivers by points: if/else 22 (36 pts), match/switch 4 (9 pts), boolean chains 8, loops 4 (8 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChatScreenKt.ChatScreen (cognitive 60) feature/dsh-client/src/main/java/com/wanbaohe/dsh/screen/ChatScreen.kt:153— ChatScreenKt.ChatScreen has cognitive complexity 60 (threshold 15). Drivers by points: if/else 36 (43 pts), boolean chains 14, error handling 1 (2 pts), loops 1 (nesting depth added 8). 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.
MermaidClassSubPipeline.renderClass (cognitive 60) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidClassSubPipeline.kt:84— MermaidClassSubPipeline.renderClass has cognitive complexity 60 (threshold 15). Drivers by points: if/else 18 (35 pts), loops 10 (17 pts), boolean chains 6, match/switch 1 (2 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MermaidXYChartSubPipeline.render (cognitive 59) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidXYChartSubPipeline.kt:73— MermaidXYChartSubPipeline.render has cognitive complexity 59 (threshold 15). Drivers by points: if/else 22 (41 pts), loops 7 (13 pts), boolean chains 3, match/switch 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.
AndroidImageDrawApplier.applyDrawToImage (cognitive 58) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/data/AndroidImageDrawApplier.kt:95— AndroidImageDrawApplier.applyDrawToImage has cognitive complexity 58 (threshold 15). Drivers by points: if/else 28 (50 pts), boolean chains 7, match/switch 1 (nesting depth added 22). 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.
GeometryUtils.createPathWithCircleCorner (cognitive 58) libs/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:366— GeometryUtils.createPathWithCircleCorner has cognitive complexity 58 (threshold 15). Drivers by points: if/else 20 (52 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AIDuelChatComponent.streamWithTypewriter (cognitive 57) feature/ai/src/main/java/com/shifenmiao/ai/component/AIDuelChatComponent.kt:1086— AIDuelChatComponent.streamWithTypewriter has cognitive complexity 57 (threshold 15). Drivers by points: if/else 24 (45 pts), boolean chains 7, error handling 2, loops 2, match/switch 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
push_images.main (cognitive 56) fastlane/push_images.py:264— push_images.main has cognitive complexity 56 (threshold 15). Drivers by points: if/else 16 (27 pts), loops 7 (18 pts), error handling 3 (8 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 28). 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.
BottomButtonsBlockKt.BottomButtonsBlock (cognitive 55) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/buttons/BottomButtonsBlock.kt:98— BottomButtonsBlockKt.BottomButtonsBlock has cognitive complexity 55 (threshold 15). Drivers by points: if/else 32 (53 pts), boolean chains 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ProtocolRoutingAIRequestHandler.handleChatStreamOperation (cognitive 55) feature/ai/src/main/java/com/shifenmiao/ai/request/ProtocolRoutingAIRequestHandler.kt:162— ProtocolRoutingAIRequestHandler.handleChatStreamOperation has cognitive complexity 55 (threshold 15). Drivers by points: if/else 20 (39 pts), error handling 6 (7 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GomokuOnlineGameSync.accept (cognitive 55) feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuGameComponent.kt:221— GomokuOnlineGameSync.accept has cognitive complexity 55 (threshold 15). Drivers by points: if/else 23 (37 pts), boolean chains 8, error handling 4 (7 pts), match/switch 2 (3 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PlantUmlClassSubPipeline.renderClass (cognitive 55) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlClassSubPipeline.kt:57— PlantUmlClassSubPipeline.renderClass has cognitive complexity 55 (threshold 15). Drivers by points: if/else 19 (35 pts), loops 7 (13 pts), boolean chains 5, match/switch 1 (2 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChessBoardKt.ChessBoard (cognitive 54) feature/chess/src/main/java/com/wanbaohe/chess/ui/board/ChessBoard.kt:104— ChessBoardKt.ChessBoard has cognitive complexity 54 (threshold 15). Drivers by points: if/else 20 (39 pts), loops 5 (7 pts), boolean chains 5, match/switch 1 (3 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MermaidGanttSubPipeline.render (cognitive 53) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidGanttSubPipeline.kt:69— MermaidGanttSubPipeline.render has cognitive complexity 53 (threshold 15). Drivers by points: if/else 19 (40 pts), loops 5 (8 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GeometryUtils.shrinkPathCollage_3_3 (cognitive 52) libs/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:133— GeometryUtils.shrinkPathCollage_3_3 has cognitive complexity 52 (threshold 15). Drivers by points: if/else 21 (43 pts), boolean chains 8, loops 1 (nesting depth added 22). 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.
QWeatherDataSourceKt.compassText (cognitive 51) core/weather/src/nonfoss/java/com/wanbaohe/core/weather/data/source/QWeatherDataSource.kt:549— QWeatherDataSourceKt.compassText has cognitive complexity 51 (threshold 15). Drivers by points: if/else 34 (50 pts), match/switch 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AuthCodeSettingsScreenKt.AuthCodeFlowDialog (cognitive 51) feature/settings/src/main/java/com/wanbaohe/setting/authcode/screen/AuthCodeSettingsScreen.kt:523— AuthCodeSettingsScreenKt.AuthCodeFlowDialog has cognitive complexity 51 (threshold 15). Drivers by points: if/else 28 (37 pts), match/switch 5 (8 pts), boolean chains 6 (nesting depth added 12). 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.
PlantUmlSequenceSubPipeline.renderSequence (cognitive 50) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlSequenceSubPipeline.kt:85— PlantUmlSequenceSubPipeline.renderSequence has cognitive complexity 50 (threshold 15). Drivers by points: if/else 16 (36 pts), match/switch 3 (7 pts), loops 4, boolean chains 3 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PlantUmlActivitySubPipeline.render (cognitive 49) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlActivitySubPipeline.kt:409— PlantUmlActivitySubPipeline.render has cognitive complexity 49 (threshold 15). Drivers by points: if/else 14 (36 pts), loops 5 (9 pts), match/switch 2 (4 pts) (nesting depth added 28). 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.
PlantUmlSubPipelineRegistry.classifyImmediate (cognitive 48) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlSubPipelineRegistry.kt:146— PlantUmlSubPipelineRegistry.classifyImmediate has cognitive complexity 48 (threshold 15). Drivers by points: if/else 26, boolean chains 22. 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.
AndroidFileController.saveImpl (cognitive 47) core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/AndroidFileController.kt:123— AndroidFileController.saveImpl has cognitive complexity 47 (threshold 15). Drivers by points: if/else 25 (40 pts), boolean chains 7 (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.
MediaPickerGridKt.MediaPickerGrid (cognitive 47) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaPickerGrid.kt:76— MediaPickerGridKt.MediaPickerGrid has cognitive complexity 47 (threshold 15). Drivers by points: if/else 29 (39 pts), boolean chains 5, loops 1 (2 pts), match/switch 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.
AIPromptExecutor.executeStreaming (cognitive 46) feature/common/src/main/java/com/shifenmiao/common/ai/AIPromptExecutor.kt:230— AIPromptExecutor.executeStreaming has cognitive complexity 46 (threshold 15). Drivers by points: if/else 16 (35 pts), error handling 2 (5 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AIAddEngineScreenKt.AIAddEngineScreen (cognitive 46) feature/settings/src/main/java/com/wanbaohe/setting/ai/screen/AIAddEngineScreen.kt:99— AIAddEngineScreenKt.AIAddEngineScreen has cognitive complexity 46 (threshold 15). Drivers by points: if/else 22 (32 pts), boolean chains 12, match/switch 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PlantUmlTimeSeriesSubPipeline.render (cognitive 46) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlTimeSeriesSubPipeline.kt:80— PlantUmlTimeSeriesSubPipeline.render has cognitive complexity 46 (threshold 15). Drivers by points: if/else 20 (35 pts), boolean chains 9, loops 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
updateDiagramPreviews (cognitive 46) web/milkdown-editor/editor.src.js:528— updateDiagramPreviews has cognitive complexity 46 (threshold 15). Drivers by points: if/else 16 (23 pts), boolean chains 8, ternaries 3 (8 pts), error handling 3 (7 pts) (nesting depth added 16). Most of this is not in the body itself: 2 of the 46 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 538, 581, 591). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
AdaptiveLayoutScreenKt.AdaptiveLayoutScreen (cognitive 45) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/AdaptiveLayoutScreen.kt:99— AdaptiveLayoutScreenKt.AdaptiveLayoutScreen has cognitive complexity 45 (threshold 15). Drivers by points: if/else 22 (33 pts), boolean chains 12 (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.
MermaidErSubPipeline.renderDraw (cognitive 45) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidErSubPipeline.kt:180— MermaidErSubPipeline.renderDraw has cognitive complexity 45 (threshold 15). Drivers by points: if/else 17 (28 pts), loops 4 (8 pts), match/switch 3 (7 pts), boolean chains 2 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EditorLayerBoxKt.EditorLayerBox (cognitive 44) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/editor/EditorLayerBox.kt:82— EditorLayerBoxKt.EditorLayerBox has cognitive complexity 44 (threshold 15). Drivers by points: if/else 23 (34 pts), boolean chains 9, 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.
UiPathPaintCanvasActionKt.UiPathPaintCanvasAction (cognitive 44) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/UiPathPaintCanvasAction.kt:82— UiPathPaintCanvasActionKt.UiPathPaintCanvasAction has cognitive complexity 44 (threshold 15). Drivers by points: if/else 18 (29 pts), loops 3 (9 pts), boolean chains 6 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WatermarkCanvasKt.WatermarkCanvas (cognitive 44) feature/watermarking/src/main/java/com/shifenmiao/app/watermarking/presentation/canvas/WatermarkCanvas.kt:101— WatermarkCanvasKt.WatermarkCanvas has cognitive complexity 44 (threshold 15). Drivers by points: if/else 20 (35 pts), boolean chains 6, match/switch 1 (2 pts), loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CameraCaptureFlowKt.CameraCaptureFlow (cognitive 43) core/camera/src/main/java/com/wanbaohe/camera/CameraCaptureFlow.kt:55— CameraCaptureFlowKt.CameraCaptureFlow has cognitive complexity 43 (threshold 15). Drivers by points: if/else 21 (28 pts), boolean chains 8, error handling 4 (5 pts), match/switch 2 (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.
MermaidStateSubPipeline.renderState (cognitive 43) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidStateSubPipeline.kt:73— MermaidStateSubPipeline.renderState has cognitive complexity 43 (threshold 15). Drivers by points: if/else 16 (31 pts), loops 5 (7 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AndroidFilenameCreator.constructImageFilename (cognitive 42) core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/AndroidFilenameCreator.kt:63— AndroidFilenameCreator.constructImageFilename has cognitive complexity 42 (threshold 15). Drivers by points: if/else 28 (36 pts), boolean chains 6 (nesting depth added 8). 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.
DragHandlerKt.dragHandler (cognitive 42) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/modifier/DragHandler.kt:61— DragHandlerKt.dragHandler has cognitive complexity 42 (threshold 15). Drivers by points: if/else 20 (35 pts), match/switch 1 (3 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TopAppBarTitleKt.TopAppBarTitle (cognitive 42) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/text/TopAppBarTitle.kt:49— TopAppBarTitleKt.TopAppBarTitle has cognitive complexity 42 (threshold 15). Drivers by points: if/else 18 (28 pts), boolean chains 8, match/switch 2 (6 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AIChatComponent.executeStreamingChat (cognitive 42) feature/ai/src/main/java/com/shifenmiao/ai/component/AIChatComponent.kt:763— AIChatComponent.executeStreamingChat has cognitive complexity 42 (threshold 15). Drivers by points: if/else 21 (25 pts), error handling 5 (6 pts), match/switch 3 (6 pts), boolean chains 5 (nesting depth added 8). 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.
AIDuelChatComponent.runDuelLoop (cognitive 42) feature/ai/src/main/java/com/shifenmiao/ai/component/AIDuelChatComponent.kt:847— AIDuelChatComponent.runDuelLoop has cognitive complexity 42 (threshold 15). Drivers by points: if/else 16 (26 pts), error handling 4 (8 pts), boolean chains 6, loops 1, match/switch 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MemoryRepository.buildPromptFragment (cognitive 42) feature/ai/src/main/java/com/shifenmiao/ai/memory/MemoryRepository.kt:191— MemoryRepository.buildPromptFragment has cognitive complexity 42 (threshold 15). Drivers by points: if/else 21 (29 pts), loops 2 (5 pts), boolean chains 4, match/switch 1 (4 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EventNodesKt.foldChunks (cognitive 42) feature/dsh-client/src/main/java/com/wanbaohe/dsh/session/EventNodes.kt:553— EventNodesKt.foldChunks has cognitive complexity 42 (threshold 15). Drivers by points: if/else 12 (25 pts), loops 6 (13 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PaletteEditorKt.PaletteEditor (cognitive 41) feature/color-tools/src/main/java/com/t8rin/imagetoolbox/color_tools/presentation/components/PaletteEditor.kt:97— PaletteEditorKt.PaletteEditor has cognitive complexity 41 (threshold 15). Drivers by points: if/else 23 (41 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EventNodesKt.extractNodes (cognitive 41) feature/dsh-client/src/main/java/com/wanbaohe/dsh/session/EventNodes.kt:238— EventNodesKt.extractNodes has cognitive complexity 41 (threshold 15). Drivers by points: if/else 11 (30 pts), loops 2 (6 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
QuickAddTextParser.parseTimeMatch (cognitive 41) feature/marktodo/src/main/java/com/shifenmiao/marktodo/domain/QuickAddTextParser.kt:146— QuickAddTextParser.parseTimeMatch has cognitive complexity 41 (threshold 15). Drivers by points: if/else 15 (24 pts), match/switch 5 (9 pts), boolean chains 8 (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.
XiangqiBoardKt.XiangqiBoard (cognitive 41) feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/ui/board/XiangqiBoard.kt:72— XiangqiBoardKt.XiangqiBoard has cognitive complexity 41 (threshold 15). Drivers by points: if/else 19 (24 pts), boolean chains 8, loops 4 (5 pts), match/switch 1 (4 pts) (nesting depth added 9). 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.
GeometryUtils.shrinkPath (cognitive 41) libs/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:207— GeometryUtils.shrinkPath has cognitive complexity 41 (threshold 15). Drivers by points: if/else 13 (31 pts), boolean chains 6, loops 2 (4 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.
TransformGestureKt.detectPointerTransformGestures (cognitive 41) libs/gesture/src/main/java/com/t8rin/gesture/TransformGesture.kt:203— TransformGestureKt.detectPointerTransformGestures has cognitive complexity 41 (threshold 15). Drivers by points: if/else 12 (33 pts), boolean chains 5, match/switch 1 (2 pts), loops 1 (nesting depth added 22). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ImageExpander.copyUnknownPatch (cognitive 41) libs/opencv-tools/src/main/java/com/t8rin/opencv_tools/expand/ImageExpander.kt:386— ImageExpander.copyUnknownPatch has cognitive complexity 41 (threshold 15). Drivers by points: if/else 13 (34 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 22). 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.
AndroidImageCombiner.combineImages (cognitive 40) feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/data/AndroidImageCombiner.kt:78— AndroidImageCombiner.combineImages has cognitive complexity 40 (threshold 15). Drivers by points: if/else 17 (22 pts), match/switch 5 (14 pts), boolean chains 3, loops 1 (nesting depth added 14). 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.
SudokuEngine.generatePuzzleOnce (cognitive 40) feature/sudoku/src/main/java/com/wanbaohe/sudoku/logic/SudokuEngine.kt:131— SudokuEngine.generatePuzzleOnce has cognitive complexity 40 (threshold 15). Drivers by points: if/else 14 (34 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PlantUmlActivitySubPipeline.buildSequence (cognitive 40) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlActivitySubPipeline.kt:176— PlantUmlActivitySubPipeline.buildSequence has cognitive complexity 40 (threshold 15). Drivers by points: if/else 13 (29 pts), loops 4 (11 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InlineLayoutContentKt.drawInlineUnderlines (cognitive 40) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/internal/compose/InlineLayoutContent.kt:387— InlineLayoutContentKt.drawInlineUnderlines has cognitive complexity 40 (threshold 15). Drivers by points: if/else 12 (26 pts), loops 3 (7 pts), boolean chains 4, match/switch 1 (3 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.
GlassOutlinedTextFieldKt.modernGlassTextFieldContainer (cognitive 39) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassOutlinedTextField.kt:696— GlassOutlinedTextFieldKt.modernGlassTextFieldContainer has cognitive complexity 39 (threshold 15). Drivers by points: if/else 28 (31 pts), match/switch 5 (7 pts), boolean chains 1 (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.
MarkdownSummary.derive (cognitive 38) core/utils/src/main/java/com/wanbaohe/com/string/MarkdownSummary.kt:39— MarkdownSummary.derive has cognitive complexity 38 (threshold 15). Drivers by points: if/else 16 (29 pts), boolean chains 7, loops 1, match/switch 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.
ChessPlayersRowKt.ChessPlayersRow (cognitive 38) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessPlayersRow.kt:26— ChessPlayersRowKt.ChessPlayersRow has cognitive complexity 38 (threshold 15). Drivers by points: if/else 25 (27 pts), boolean chains 8, match/switch 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.
CompareScreenContentImplKt.CompareScreenContentImpl (cognitive 38) feature/compare/src/main/java/com/t8rin/imagetoolbox/feature/compare/presentation/components/CompareScreenContentImpl.kt:75— CompareScreenContentImplKt.CompareScreenContentImpl has cognitive complexity 38 (threshold 15). Drivers by points: if/else 17 (34 pts), boolean chains 3, match/switch 1 (nesting depth added 17). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
EventNodesKt.nodesFor (cognitive 38) feature/dsh-client/src/main/java/com/wanbaohe/dsh/session/EventNodes.kt:722— EventNodesKt.nodesFor has cognitive complexity 38 (threshold 15). Drivers by points: if/else 19 (28 pts), boolean chains 10 (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.
CustomWebView.onTouchEvent (cognitive 38) feature/webview/src/main/java/com/shifenmiao/webview/common/CustomWebView.kt:101— CustomWebView.onTouchEvent has cognitive complexity 38 (threshold 15). Drivers by points: if/else 15 (33 pts), boolean chains 4, match/switch 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InlineLayoutContentKt.PaintInlineLayoutContent (cognitive 38) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/internal/compose/InlineLayoutContent.kt:59— InlineLayoutContentKt.PaintInlineLayoutContent has cognitive complexity 38 (threshold 15). Drivers by points: if/else 19 (30 pts), boolean chains 3, loops 3, match/switch 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
push_images.load_local (cognitive 38) fastlane/push_images.py:96— push_images.load_local has cognitive complexity 38 (threshold 15). Drivers by points: if/else 8 (24 pts), loops 4 (9 pts), boolean chains 5 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GomokuGameComponent.observeGame (cognitive 37) feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuGameComponent.kt:959— GomokuGameComponent.observeGame has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (26 pts), boolean chains 5, match/switch 1 (4 pts), loops 1 (2 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.
AndroidTextCardLayoutEngine.paginate (cognitive 37) feature/text-card/src/main/java/com/wanbaohe/textcard/data/render/AndroidTextCardLayoutEngine.kt:52— AndroidTextCardLayoutEngine.paginate has cognitive complexity 37 (threshold 15). Drivers by points: if/else 21 (30 pts), boolean chains 4, match/switch 1 (2 pts), loops 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.
HtmlBlockModelCompiler.compileFlow (cognitive 37) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/internal/core/compile/HtmlBlockModelCompiler.kt:144— HtmlBlockModelCompiler.compileFlow has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (28 pts), match/switch 3 (8 pts), loops 1 (nesting depth added 22). 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.
UiFilterCodec.decodeValue (cognitive 36) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/serialization/UiFilterCodec.kt:268— UiFilterCodec.decodeValue has cognitive complexity 36 (threshold 15). Drivers by points: if/else 17 (31 pts), match/switch 3 (5 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.
ChessRouterComponent.startPreparation (cognitive 36) feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt:278— ChessRouterComponent.startPreparation has cognitive complexity 36 (threshold 15). Drivers by points: if/else 17 (26 pts), error handling 4, boolean chains 3, match/switch 1 (2 pts), loops 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.
ZoomableImagePreviewKt.ZoomableImagePreview (cognitive 36) feature/common/src/main/java/com/shifenmiao/common/ui/ZoomableImagePreview.kt:102— ZoomableImagePreviewKt.ZoomableImagePreview has cognitive complexity 36 (threshold 15). Drivers by points: if/else 22 (33 pts), boolean chains 1, loops 1, match/switch 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.
PathHelper.drawStar (cognitive 36) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/utils/PathHelper.kt:250— PathHelper.drawStar has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (29 pts), loops 2 (6 pts), boolean chains 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MarkdownTextSearchKt.findTextMatches (cognitive 36) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/MarkdownTextSearch.kt:210— MarkdownTextSearchKt.findTextMatches has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (26 pts), loops 3 (6 pts), boolean chains 4 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SeamCarver.findForwardVerticalSeamInternal (cognitive 36) libs/opencv-tools/src/main/java/com/t8rin/opencv_tools/seam_carving/SeamCarver.kt:595— SeamCarver.findForwardVerticalSeamInternal has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (30 pts), loops 4 (5 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FilterItemKt.FilterItem (cognitive 35) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterItem.kt:91— FilterItemKt.FilterItem has cognitive complexity 35 (threshold 15). Drivers by points: if/else 24 (31 pts), boolean chains 4 (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.
ChessGameScreenKt.ChessGameContent (cognitive 35) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessGameScreen.kt:254— ChessGameScreenKt.ChessGameContent has cognitive complexity 35 (threshold 15). Drivers by points: if/else 16 (24 pts), boolean chains 9, match/switch 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BitmapDrawerKt.BitmapDrawer (cognitive 35) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/BitmapDrawer.kt:86— BitmapDrawerKt.BitmapDrawer has cognitive complexity 35 (threshold 15). Drivers by points: if/else 18 (22 pts), boolean chains 13 (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.
QuickAddTodoComponent.applyParsedMetadata (cognitive 35) feature/marktodo/src/main/java/com/shifenmiao/marktodo/screenLogic/QuickAddTodoComponent.kt:312— QuickAddTodoComponent.applyParsedMetadata has cognitive complexity 35 (threshold 15). Drivers by points: boolean chains 18, if/else 12 (17 pts) (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.
TransformGestureKt.detectTransformGestures (cognitive 35) libs/gesture/src/main/java/com/t8rin/gesture/TransformGesture.kt:68— TransformGestureKt.detectTransformGestures has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (30 pts), boolean chains 4, loops 1 (nesting depth added 21). 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.
FeedbackRowKt.FeedbackRow (cognitive 34) feature/dsh-client/src/main/java/com/wanbaohe/dsh/screen/FeedbackRow.kt:111— FeedbackRowKt.FeedbackRow has cognitive complexity 34 (threshold 15). Drivers by points: if/else 24 (25 pts), error handling 7, boolean chains 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
FiltersContentControlsKt.FiltersContentControls (cognitive 34) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/FiltersContentControls.kt:83— FiltersContentControlsKt.FiltersContentControls has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15 (33 pts), match/switch 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GomokuBoardKt.GomokuBoard (cognitive 34) feature/gomoku/src/main/java/com/wanbaohe/gomoku/ui/board/GomokuBoard.kt:74— GomokuBoardKt.GomokuBoard has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (22 pts), boolean chains 5, loops 3 (4 pts), match/switch 1 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LoginComponent.onForgotPasswordUiEvent (cognitive 34) feature/login/src/main/java/com/shifenmiao/login/viewModel/LoginComponent.kt:678— LoginComponent.onForgotPasswordUiEvent has cognitive complexity 34 (threshold 15). Drivers by points: if/else 16 (24 pts), match/switch 3 (5 pts), boolean chains 3, loops 1 (2 pts) (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.
XiangqiGameComponent.observeGame (cognitive 34) feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiGameComponent.kt:693— XiangqiGameComponent.observeGame has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15 (22 pts), boolean chains 6, match/switch 1 (4 pts), loops 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GeometryUtils.createPathWithCircleCorner (cognitive 34) libs/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:462— GeometryUtils.createPathWithCircleCorner has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (29 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DynamicCropState.updateOverlayRect (cognitive 34) libs/cropper/src/main/java/com/t8rin/cropper/state/DynamicCropState.kt:385— DynamicCropState.updateOverlayRect has cognitive complexity 34 (threshold 15). Drivers by points: if/else 25 (33 pts), match/switch 1 (nesting depth added 8). 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.
MermaidSequenceSubPipeline.renderSequence (cognitive 34) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidSequenceSubPipeline.kt:64— MermaidSequenceSubPipeline.renderSequence has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (19 pts), match/switch 4 (10 pts), loops 4, boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CreationMetaConfigSheetKt.CreationMetaConfigSheet (cognitive 33) feature/common/src/main/java/com/shifenmiao/common/ui/CreationMetaConfigSheet.kt:94— CreationMetaConfigSheetKt.CreationMetaConfigSheet has cognitive complexity 33 (threshold 15). Drivers by points: if/else 22 (25 pts), boolean chains 5, match/switch 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
CollageLayoutFactory.collageParametricGrid (cognitive 33) libs/collages/src/main/java/com/t8rin/collages/utils/CollageLayoutFactory.kt:112— CollageLayoutFactory.collageParametricGrid has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (29 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FrameImageView.snapToBorders (cognitive 33) libs/collages/src/main/java/com/t8rin/collages/view/FrameImageView.kt:439— FrameImageView.snapToBorders has cognitive complexity 33 (threshold 15). Drivers by points: if/else 24 (30 pts), boolean chains 3 (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.
InlineHtmlNormalizer.normalize (cognitive 33) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/internal/core/compile/InlineHtmlNormalizer.kt:65— InlineHtmlNormalizer.normalize has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (28 pts), loops 2, match/switch 1 (2 pts), boolean chains 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.
SafWorkspaceFileScanner.scan (cognitive 32) core/data/src/main/java/com/t8rin/imagetoolbox/core/data/workspace/search/SafWorkspaceFileScanner.kt:40— SafWorkspaceFileScanner.scan has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (21 pts), error handling 4 (7 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AppDatabase.getInstanceOrCreate (cognitive 32) core/database/src/main/java/com/shifenmiao/database/AppDatabase.kt:307— AppDatabase.getInstanceOrCreate has cognitive complexity 32 (threshold 15). Drivers by points: if/else 15 (20 pts), error handling 4 (6 pts), boolean chains 4, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SkillFrontMatterParser.parse (cognitive 32) core/database/src/main/java/com/shifenmiao/database/ai/SkillFrontMatterParser.kt:46— SkillFrontMatterParser.parse has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 2 (5 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EnhancedRangeSliderItemKt.EnhancedRangeSliderItem (cognitive 32) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedRangeSliderItem.kt:90— EnhancedRangeSliderItemKt.EnhancedRangeSliderItem has cognitive complexity 32 (threshold 15). Drivers by points: if/else 20 (25 pts), boolean chains 7 (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.
MeshGradientBackgroundKt.meshRecipe (cognitive 32) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/MeshGradientBackground.kt:334— MeshGradientBackgroundKt.meshRecipe has cognitive complexity 32 (threshold 15). Drivers by points: if/else 21 (31 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.
EmojiSelectionSheetKt.EmojiSelectionSheet (cognitive 32) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/sheets/EmojiSelectionSheet.kt:100— EmojiSelectionSheetKt.EmojiSelectionSheet has cognitive complexity 32 (threshold 15). Drivers by points: if/else 25 (32 pts) (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.
StreamContentProcessor.doRenderMessage (cognitive 32) feature/ai/src/main/java/com/shifenmiao/ai/component/StreamContentProcessor.kt:283— StreamContentProcessor.doRenderMessage has cognitive complexity 32 (threshold 15). Drivers by points: if/else 15 (21 pts), match/switch 2 (8 pts), boolean chains 3 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ConversionTabKt.BuddhistCalendarCard (cognitive 32) feature/calendar/src/main/java/com/wanbaohe/calendar/ui/ConversionTab.kt:521— ConversionTabKt.BuddhistCalendarCard has cognitive complexity 32 (threshold 15). Drivers by points: if/else 17 (32 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.
WebDavXmlParser.parsePropfind (cognitive 32) feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/adapter/WebDavXmlParser.kt:46— WebDavXmlParser.parsePropfind has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (21 pts), match/switch 2 (7 pts), boolean chains 3, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TodoTaskRowKt.TodoTaskRow (cognitive 32) feature/marktodo/src/main/java/com/shifenmiao/marktodo/components/TodoTaskRow.kt:63— TodoTaskRowKt.TodoTaskRow has cognitive complexity 32 (threshold 15). Drivers by points: if/else 21 (27 pts), boolean chains 5 (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.
Survive30sComponent.startGameLoop (cognitive 32) feature/survive30s/src/main/java/com/wanbaohe/survive30s/component/Survive30sComponent.kt:260— Survive30sComponent.startGameLoop has cognitive complexity 32 (threshold 15). Drivers by points: if/else 15 (27 pts), boolean chains 4, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MarkdownSelectionController.highlightBoxesFor (cognitive 32) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/internal/selection/MarkdownSelectionController.kt:209— MarkdownSelectionController.highlightBoxesFor has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (24 pts), loops 2 (5 pts), boolean chains 3 (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.
Moire.applyMask (cognitive 32) libs/opencv-tools/src/main/java/com/t8rin/opencv_tools/moire/Moire.kt:179— Moire.applyMask has cognitive complexity 32 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 5 (7 pts), boolean chains 6, match/switch 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
setImageWidth (cognitive 32) web/milkdown-editor/editor.src.js:1859— setImageWidth has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 7, ternaries 1 (3 pts), error handling 1 (nesting depth added 12). Of this number, 18 points are the body's own statements and 14 belong to 3 function literals inside it that branch. 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.
LocalWorkspaceFileScanner.scan (cognitive 31) core/data/src/main/java/com/t8rin/imagetoolbox/core/data/workspace/search/LocalWorkspaceFileScanner.kt:44— LocalWorkspaceFileScanner.scan has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (25 pts), loops 2 (3 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ColorSelectionRowKt.ColorSelectionRow (cognitive 31) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/color_picker/ColorSelectionRow.kt:84— ColorSelectionRowKt.ColorSelectionRow has cognitive complexity 31 (threshold 15). Drivers by points: if/else 30, boolean chains 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.
ImagesPreviewWithSelectionKt.ImagesPreviewWithSelection (cognitive 31) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/image/ImagesPreviewWithSelection.kt:97— ImagesPreviewWithSelectionKt.ImagesPreviewWithSelection has cognitive complexity 31 (threshold 15). Drivers by points: if/else 23 (30 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.
AIDuelChatScreenKt.DuelChatContent (cognitive 31) feature/ai/src/main/java/com/shifenmiao/ai/screen/AIDuelChatScreen.kt:310— AIDuelChatScreenKt.DuelChatContent has cognitive complexity 31 (threshold 15). Drivers by points: if/else 23 (27 pts), boolean chains 4 (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.
IdPhotoScreenKt.IdPhotoScreen (cognitive 31) feature/id-photo/src/main/java/com/wanbaohe/idphoto/presentation/screen/IdPhotoScreen.kt:124— IdPhotoScreenKt.IdPhotoScreen has cognitive complexity 31 (threshold 15). Drivers by points: if/else 18 (23 pts), boolean chains 7, match/switch 1 (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.
UriUtilsKt.toUiPath (cognitive 30) core/data/src/main/java/com/t8rin/imagetoolbox/core/data/utils/UriUtils.kt:160— UriUtilsKt.toUiPath has cognitive complexity 30 (threshold 15). Drivers by points: if/else 19 (30 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.
CityPickerKt.CityPicker (cognitive 30) core/ui/src/main/java/com/wanbaohe/base/ui/picker/CityPicker.kt:144— CityPickerKt.CityPicker has cognitive complexity 30 (threshold 15). Drivers by points: if/else 18 (29 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.
ToolCenterBottomSheetKt.ToolCenterBottomSheet (cognitive 30) feature/ai/src/main/java/com/shifenmiao/ai/ui/ToolCenterBottomSheet.kt:68— ToolCenterBottomSheetKt.ToolCenterBottomSheet has cognitive complexity 30 (threshold 15). Drivers by points: if/else 19, boolean chains 8, match/switch 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.
ChessGameComponent.observeGame (cognitive 30) feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:835— ChessGameComponent.observeGame has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 6, match/switch 1 (4 pts), loops 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ImageWorkspaceKt.ImageWorkspace (cognitive 30) feature/common/src/main/java/com/shifenmiao/common/ui/ImageWorkspace.kt:327— ImageWorkspaceKt.ImageWorkspace has cognitive complexity 30 (threshold 15). Drivers by points: if/else 17 (23 pts), boolean chains 6, 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.
GomokuGameComponent.onCellTap (cognitive 30) feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuGameComponent.kt:424— GomokuGameComponent.onCellTap has cognitive complexity 30 (threshold 15). Drivers by points: if/else 16 (23 pts), boolean chains 6, 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.
GomokuGameScreenKt.GameContent (cognitive 30) feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuGameScreen.kt:217— GomokuGameScreenKt.GameContent has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 7, match/switch 1 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
QrTypeUtilsKt.toIntent (cognitive 30) feature/scan-qr-code/src/main/java/com/t8rin/imagetoolbox/feature/scan_qr_code/presentation/components/QrTypeUtils.kt:91— QrTypeUtilsKt.toIntent has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (23 pts), match/switch 4 (7 pts) (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
FullscreenEditOptionKt.FullscreenEditOption (cognitive 30) feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/components/FullscreenEditOption.kt:97— FullscreenEditOptionKt.FullscreenEditOption has cognitive complexity 30 (threshold 15). Drivers by points: if/else 17 (28 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MultiTouchHandler.touch (cognitive 30) libs/collages/src/main/java/com/t8rin/collages/view/MultiTouchHandler.kt:80— MultiTouchHandler.touch has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (27 pts), boolean chains 2, match/switch 1 (nesting depth added 16). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
DynamicThemeKt.getColorScheme (cognitive 30) libs/dynamic-theme/src/main/java/com/t8rin/dynamic/theme/DynamicTheme.kt:636— DynamicThemeKt.getColorScheme has cognitive complexity 30 (threshold 15). Drivers by points: if/else 16 (24 pts), boolean chains 4, match/switch 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SeamCarver.findLowestEnergyVerticalSeamAvoidingMask (cognitive 30) libs/opencv-tools/src/main/java/com/t8rin/opencv_tools/seam_carving/SeamCarver.kt:450— SeamCarver.findLowestEnergyVerticalSeamAvoidingMask has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 5 (6 pts), boolean chains 3 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AddFiltersSheetKt.AddFiltersSheet (cognitive 29) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheet.kt:132— AddFiltersSheetKt.AddFiltersSheet has cognitive complexity 29 (threshold 15). Drivers by points: if/else 20 (23 pts), match/switch 2 (6 pts) (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.
Api21Impl.getLocaleConfigResourceId (cognitive 29) core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/LocaleConfigCompat.kt:113— Api21Impl.getLocaleConfigResourceId has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 3 (6 pts), error handling 1 (2 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GlassModifierKt.flatContainerCoverage (cognitive 29) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassModifier.kt:237— GlassModifierKt.flatContainerCoverage has cognitive complexity 29 (threshold 15). Drivers by points: if/else 21 (26 pts), boolean chains 2, match/switch 1 (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.
LiquidToggleKt.LiquidToggle (cognitive 29) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/switches/LiquidToggle.kt:98— LiquidToggleKt.LiquidToggle has cognitive complexity 29 (threshold 15). Drivers by points: if/else 22 (28 pts), boolean chains 1 (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.
ApngToolsContentKt.ApngToolsContent (cognitive 29) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:119— ApngToolsContentKt.ApngToolsContent has cognitive complexity 29 (threshold 15). Drivers by points: if/else 18, match/switch 5 (6 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.
CustomScrollableTabRowKt.GenericScrollableTabRow (cognitive 29) feature/common/src/main/java/com/shifenmiao/common/components/CustomScrollableTabRow.kt:70— CustomScrollableTabRowKt.GenericScrollableTabRow has cognitive complexity 29 (threshold 15). Drivers by points: if/else 21 (27 pts), boolean chains 2 (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.
DecisionWheelSpinScreenKt.DecisionWheelSpinScreen (cognitive 29) feature/decision-wheel/src/main/java/com/wanbaohe/decisionwheel/screen/DecisionWheelSpinScreen.kt:114— DecisionWheelSpinScreenKt.DecisionWheelSpinScreen has cognitive complexity 29 (threshold 15). Drivers by points: if/else 16 (21 pts), boolean chains 8 (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.
StackBlurFilterKt.stackBlur (cognitive 29) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/model/StackBlurFilter.kt:55— StackBlurFilterKt.stackBlur has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 7 (11 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GomokuRouterScreenKt.GomokuRouterScreen (cognitive 29) feature/gomoku/src/main/java/com/wanbaohe/gomoku/router/GomokuRouterScreen.kt:60— GomokuRouterScreenKt.GomokuRouterScreen has cognitive complexity 29 (threshold 15). Drivers by points: if/else 17 (25 pts), match/switch 3, 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.
GomokuGameScreenKt.gomokuPlayerData (cognitive 29) feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuGameScreen.kt:349— GomokuGameScreenKt.gomokuPlayerData has cognitive complexity 29 (threshold 15). Drivers by points: if/else 18 (21 pts), boolean chains 6, match/switch 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.
MaskToolSheetKt.MaskToolSheet (cognitive 29) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/tools/mask/MaskToolSheet.kt:93— MaskToolSheetKt.MaskToolSheet has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (19 pts), error handling 2 (4 pts), boolean chains 3, match/switch 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MediaPlayerScreenKt.MediaPlayerScreen (cognitive 29) feature/media-player/src/main/java/com/wanbaohe/media/screen/MediaPlayerScreen.kt:112— MediaPlayerScreenKt.MediaPlayerScreen has cognitive complexity 29 (threshold 15). Drivers by points: if/else 20 (22 pts), boolean chains 6, 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.
TextStylePanelKt.TextStylePanel (cognitive 29) feature/text-card/src/main/java/com/wanbaohe/textcard/presentation/editor/panels/TextStylePanel.kt:140— TextStylePanelKt.TextStylePanel has cognitive complexity 29 (threshold 15). Drivers by points: if/else 26 (28 pts), 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.
MermaidRequirementSubPipeline.flowchartRender (cognitive 29) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidRequirementSubPipeline.kt:117— MermaidRequirementSubPipeline.flowchartRender has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (12 pts), match/switch 4 (9 pts), loops 4 (8 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MermaidRequirementSubPipeline.parseMarkdownRuns (cognitive 29) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidRequirementSubPipeline.kt:389— MermaidRequirementSubPipeline.parseMarkdownRuns has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (25 pts), boolean chains 3, loops 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.
PlantUmlComponentSubPipeline.drawNode (cognitive 29) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:351— PlantUmlComponentSubPipeline.drawNode has cognitive complexity 29 (threshold 15). Drivers by points: if/else 17 (24 pts), match/switch 2 (3 pts), boolean chains 2 (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.
fetch_images.main (cognitive 29) fastlane/fetch_images.py:64— fetch_images.main has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 4 (9 pts), ternaries 1 (4 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AsciiParamsItemKt.AsciiParamsItem (cognitive 28) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/AsciiParamsItem.kt:83— AsciiParamsItemKt.AsciiParamsItem has cognitive complexity 28 (threshold 15). Drivers by points: if/else 18 (26 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.
ImageContainerKt.ImageContainer (cognitive 28) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/image/ImageContainer.kt:50— ImageContainerKt.ImageContainer has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15 (24 pts), boolean chains 4 (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.
ImageStickyHeaderKt.imageStickyHeader (cognitive 28) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/image/ImageStickyHeader.kt:93— ImageStickyHeaderKt.imageStickyHeader has cognitive complexity 28 (threshold 15). Drivers by points: if/else 22 (25 pts), boolean chains 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
FadingEdgesKt.fadingEdges (cognitive 28) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/modifier/FadingEdges.kt:49— FadingEdgesKt.fadingEdges has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15 (26 pts), match/switch 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ProtocolRoutingAIRequestHandler.createChatCall (cognitive 28) feature/ai/src/main/java/com/shifenmiao/ai/request/ProtocolRoutingAIRequestHandler.kt:433— ProtocolRoutingAIRequestHandler.createChatCall has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (25 pts), match/switch 2 (3 pts) (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
LunarCalendarCalculator.solarToLunar (cognitive 28) feature/calendar/src/main/java/com/wanbaohe/calendar/data/LunarCalendarCalculator.kt:70— LunarCalendarCalculator.solarToLunar has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 5, loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CodeEditorScreenKt.CodeEditorScreen (cognitive 28) feature/code-editor/src/main/java/com/wanbaohe/code/editor/screen/CodeEditorScreen.kt:90— CodeEditorScreenKt.CodeEditorScreen has cognitive complexity 28 (threshold 15). Drivers by points: if/else 21 (25 pts), boolean chains 2, 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.
AIEngineRepository.ensureFlavorPresetEngines (cognitive 28) feature/common/src/main/java/com/shifenmiao/common/manager/AIEngineRepository.kt:216— AIEngineRepository.ensureFlavorPresetEngines has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16 (22 pts), boolean chains 6 (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.
GameEngine.move (cognitive 28) feature/game2048/src/main/java/com/wanbaohe/game2048/component/GameEngine.kt:44— GameEngine.move has cognitive complexity 28 (threshold 15). Drivers by points: loops 6 (14 pts), if/else 5 (13 pts), match/switch 1 (nesting depth added 16). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
DrawEditOptionKt.DrawEditOption (cognitive 28) feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/components/DrawEditOption.kt:115— DrawEditOptionKt.DrawEditOption has cognitive complexity 28 (threshold 15). Drivers by points: if/else 21, boolean chains 5, match/switch 1 (2 pts) (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.
ParamsManager.updateParams (cognitive 28) libs/collages/src/main/java/com/t8rin/collages/utils/ParamsManager.kt:50— ParamsManager.updateParams has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 6 (8 pts), boolean chains 1, error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SwipeableV2State.computeTarget (cognitive 28) libs/modalsheet/src/main/java/com/t8rin/modalsheet/SwipeableV2.kt:423— SwipeableV2State.computeTarget has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15 (27 pts), boolean chains 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.
PickFontFamilySheetKt.DownloadableFontRow (cognitive 27) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/selection/PickFontFamilySheet.kt:348— PickFontFamilySheetKt.DownloadableFontRow has cognitive complexity 27 (threshold 15). Drivers by points: if/else 20 (24 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.
EnhancedIconButtonKt.EnhancedIconButton (cognitive 27) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedIconButton.kt:63— EnhancedIconButtonKt.EnhancedIconButton has cognitive complexity 27 (threshold 15). Drivers by points: if/else 17 (22 pts), boolean chains 3, match/switch 1 (2 pts) (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.
HyperOSSwitchKt.HyperOSSwitch (cognitive 27) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/switches/HyperOSSwitch.kt:78— HyperOSSwitchKt.HyperOSSwitch has cognitive complexity 27 (threshold 15). Drivers by points: if/else 22 (24 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.
ConversionTabKt.DaoistCalendarCard (cognitive 27) feature/calendar/src/main/java/com/wanbaohe/calendar/ui/ConversionTab.kt:675— ConversionTabKt.DaoistCalendarCard has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15 (27 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChessBoardKt.ChessCueLayer (cognitive 27) feature/chess/src/main/java/com/wanbaohe/chess/ui/board/ChessBoard.kt:333— ChessBoardKt.ChessCueLayer has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 4 (8 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CropToolScreenKt.resizeLocked (cognitive 27) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/tools/crop/CropToolScreen.kt:556— CropToolScreenKt.resizeLocked has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 4, match/switch 2 (3 pts) (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.
MediaImageKt.MediaImage (cognitive 27) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaImage.kt:79— MediaImageKt.MediaImage has cognitive complexity 27 (threshold 15). Drivers by points: if/else 26 (27 pts) (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.
VerticalStaggeredCardKt.VerticalStaggeredCard (cognitive 27) feature/online/src/main/java/com/shifenmiao/online/ui/VerticalStaggeredCard.kt:69— VerticalStaggeredCardKt.VerticalStaggeredCard has cognitive complexity 27 (threshold 15). Drivers by points: if/else 21 (26 pts), match/switch 1 (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.
AIEngineSettingsDetailScreenKt.ServerConnectivityCard (cognitive 27) feature/settings/src/main/java/com/wanbaohe/setting/ai/screen/AIEngineSettingsDetailScreen.kt:847— AIEngineSettingsDetailScreenKt.ServerConnectivityCard has cognitive complexity 27 (threshold 15). Drivers by points: if/else 18 (20 pts), boolean chains 5, 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.
WatermarkingContentKt.WatermarkingContent (cognitive 27) feature/watermarking/src/main/java/com/shifenmiao/app/watermarking/presentation/WatermarkingContent.kt:78— WatermarkingContentKt.WatermarkingContent has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 9, match/switch 1 (2 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.
WebpToolsContentKt.WebpToolsContent (cognitive 27) feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt:116— WebpToolsContentKt.WebpToolsContent has cognitive complexity 27 (threshold 15). Drivers by points: if/else 16, match/switch 5 (6 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.
BrowserSettingsPageKt.BrowserSettingsPage (cognitive 27) feature/webview/src/main/java/com/shifenmiao/webview/browser/BrowserSettingsPage.kt:71— BrowserSettingsPageKt.BrowserSettingsPage has cognitive complexity 27 (threshold 15). Drivers by points: if/else 16 (25 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FrameImageView.buildRealClearPath (cognitive 27) libs/collages/src/main/java/com/t8rin/collages/view/FrameImageView.kt:745— FrameImageView.buildRealClearPath has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (25 pts), match/switch 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MermaidSessionPipeline.extractTripleColonClasses (cognitive 27) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidSessionPipeline.kt:532— MermaidSessionPipeline.extractTripleColonClasses has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 5 (9 pts), boolean chains 5 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ImageForensics.detectCopyMove (cognitive 27) libs/opencv-tools/src/main/java/com/t8rin/opencv_tools/forensics/ImageForensics.kt:188— ImageForensics.detectCopyMove has cognitive complexity 27 (threshold 15). Drivers by points: loops 7 (15 pts), if/else 5 (12 pts) (nesting depth added 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
AddToPaletteSheetKt.AddToPaletteSheet (cognitive 26) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/color_picker/AddToPaletteSheet.kt:87— AddToPaletteSheetKt.AddToPaletteSheet has cognitive complexity 26 (threshold 15). Drivers by points: if/else 18 (24 pts), boolean chains 1, 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.
GlassSegmentedButtonRowKt.GlassSegmentedButtonRowImpl (cognitive 26) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassSegmentedButtonRow.kt:276— GlassSegmentedButtonRowKt.GlassSegmentedButtonRowImpl has cognitive complexity 26 (threshold 15). Drivers by points: if/else 23, loops 1 (2 pts), boolean chains 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ThemePresetSelectorKt.ThemePresetCard (cognitive 26) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/theme/ThemePresetSelector.kt:269— ThemePresetSelectorKt.ThemePresetCard has cognitive complexity 26 (threshold 15). Drivers by points: if/else 16 (23 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AiUtils.buildUserRequestMessage (cognitive 26) feature/ai/src/main/java/com/shifenmiao/ai/utils/AiUtils.kt:366— AiUtils.buildUserRequestMessage has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 8, error handling 1 (3 pts), match/switch 1 (3 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.
AppContentKt.StreamingRobotController (cognitive 26) feature/app/src/main/java/com/wanbaohe/app/AppContent.kt:494— AppContentKt.StreamingRobotController has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 3, match/switch 1 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CollageMakerContentKt.CollageMakerContent (cognitive 26) feature/collage-maker/src/main/java/com/t8rin/imagetoolbox/collage_maker/presentation/CollageMakerContent.kt:139— CollageMakerContentKt.CollageMakerContent has cognitive complexity 26 (threshold 15). Drivers by points: if/else 24 (25 pts), boolean chains 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
BasicGlitchEffects.blockGlitch (cognitive 26) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/glitch/tools/BasicGlitchEffects.kt:162— BasicGlitchEffects.blockGlitch has cognitive complexity 26 (threshold 15). Drivers by points: if/else 3 (14 pts), loops 4 (12 pts) (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.
ExportSettingsSheetKt.ExportSettingsSheet (cognitive 26) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/export/ExportSettingsSheet.kt:84— ExportSettingsSheetKt.ExportSettingsSheet has cognitive complexity 26 (threshold 15). Drivers by points: if/else 19 (22 pts), boolean chains 2, match/switch 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.
UnitConverterComponent.buildExpression (cognitive 26) feature/unit-converter/src/main/java/com/wanbaohe/unitconverter/component/UnitConverterComponent.kt:329— UnitConverterComponent.buildExpression has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 5, match/switch 2 (3 pts) (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.
DefaultWatermarkContentResolver.resolve (cognitive 26) feature/watermarking/src/main/java/com/shifenmiao/app/watermarking/data/context/DefaultWatermarkContentResolver.kt:49— DefaultWatermarkContentResolver.resolve has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (18 pts), match/switch 3 (5 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.
XiangqiSetupScreenKt.XiangqiSetupScreen (cognitive 26) feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiSetupScreen.kt:87— XiangqiSetupScreenKt.XiangqiSetupScreen has cognitive complexity 26 (threshold 15). Drivers by points: if/else 17, boolean chains 8, 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.
ExtendedFrameImage.parametricStackedRowStrips (cognitive 26) libs/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:83— ExtendedFrameImage.parametricStackedRowStrips has cognitive complexity 26 (threshold 15). Drivers by points: if/else 16 (25 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FamilyOneShotRenderersKt.buildSequenceFrame (cognitive 26) libs/diagram/src/upstream/java/com/hrm/diagram/render/export/FamilyOneShotRenderers.kt:173— FamilyOneShotRenderersKt.buildSequenceFrame has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (15 pts), match/switch 3 (7 pts), loops 3, boolean chains 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.
MermaidMindmapSubPipeline.render (cognitive 26) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidMindmapSubPipeline.kt:54— MermaidMindmapSubPipeline.render has cognitive complexity 26 (threshold 15). Drivers by points: if/else 19 (24 pts), loops 1, match/switch 1 (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.
PlantUmlActivitySubPipeline.buildBlock (cognitive 26) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlActivitySubPipeline.kt:275— PlantUmlActivitySubPipeline.buildBlock has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 4 (11 pts), match/switch 1 (nesting depth added 12). 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.
PlantUmlXYChartSubPipeline.render (cognitive 26) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlXYChartSubPipeline.kt:57— PlantUmlXYChartSubPipeline.render has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (14 pts), loops 6 (10 pts), match/switch 2 (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.
ChessRouterScreenKt.ChessRouterScreen (cognitive 25) feature/chess/src/main/java/com/wanbaohe/chess/router/ChessRouterScreen.kt:60— ChessRouterScreenKt.ChessRouterScreen has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 3, match/switch 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NativeMarkdownEditorKt.NativeMarkdownEditor (cognitive 25) feature/common/src/main/java/com/shifenmiao/common/editor/NativeMarkdownEditor.kt:77— NativeMarkdownEditorKt.NativeMarkdownEditor has cognitive complexity 25 (threshold 15). Drivers by points: if/else 17 (19 pts), boolean chains 4, 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.
DrawUtilsKt.rememberPaint (cognitive 25) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/utils/DrawUtils.kt:241— DrawUtilsKt.rememberPaint has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TodoTaskQuery.matchesFilter (cognitive 25) feature/marktodo/src/main/java/com/shifenmiao/marktodo/domain/TodoTaskQuery.kt:104— TodoTaskQuery.matchesFilter has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 7, match/switch 2 (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.
MinesweeperComponent.placeMinesAndCalculateNeighbors (cognitive 25) feature/minesweeper/src/main/java/com/wanbaohe/minesweeper/component/MinesweeperComponent.kt:175— MinesweeperComponent.placeMinesAndCalculateNeighbors has cognitive complexity 25 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 5 (11 pts), boolean chains 2 (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.
PaletteToolsContentKt.PaletteToolsContent (cognitive 25) feature/palette-tools/src/main/java/com/t8rin/imagetoolbox/feature/palette_tools/presentation/PaletteToolsContent.kt:97— PaletteToolsContentKt.PaletteToolsContent has cognitive complexity 25 (threshold 15). Drivers by points: if/else 16, boolean chains 7, match/switch 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
XiangqiAttacks.byRookCannonOrKing (cognitive 25) feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/search/XiangqiAttacks.kt:68— XiangqiAttacks.byRookCannonOrKing has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (15 pts), boolean chains 5, loops 3 (5 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XiangqiRouterScreenKt.XiangqiRouterScreen (cognitive 25) feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/router/XiangqiRouterScreen.kt:75— XiangqiRouterScreenKt.XiangqiRouterScreen has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 3, match/switch 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FrameImageView.setSpace (cognitive 25) libs/collages/src/main/java/com/t8rin/collages/view/FrameImageView.kt:535— FrameImageView.setSpace has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (17 pts), loops 2 (5 pts), match/switch 1 (2 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.
MarkdownDocumentRendererKt.MarkdownDocumentRenderer (cognitive 25) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/MarkdownDocumentRenderer.kt:40— MarkdownDocumentRendererKt.MarkdownDocumentRenderer has cognitive complexity 25 (threshold 15). Drivers by points: if/else 20 (21 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.
fetch_listing.main (cognitive 25) fastlane/fetch_listing.py:38— fetch_listing.main has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 5 (9 pts), boolean chains 4 (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.
upload.renderUploadModalList (cognitive 25) web/file_transfer/js/features/upload/upload.js:398— upload.renderUploadModalList has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 7 (11 pts), boolean chains 7, if/else 6 (7 pts) (nesting depth added 5). Most of this is not in the body itself: 9 of the 25 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 417, 468). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
addTransferItem (cognitive 25) web/file_transfer/js/features/transfer/transfers.js:104— addTransferItem has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (20 pts), other 4, 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.
DataSelectorKt.DataSelector (cognitive 24) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/selection/DataSelector.kt:83— DataSelectorKt.DataSelector has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
QualitySelectorKt.QualitySelector (cognitive 24) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/selection/QualitySelector.kt:92— QualitySelectorKt.QualitySelector has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (13 pts), match/switch 6 (9 pts), boolean chains 2 (nesting depth added 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.
UrisPreviewKt.UrisPreview (cognitive 24) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/image/UrisPreview.kt:75— UrisPreviewKt.UrisPreview has cognitive complexity 24 (threshold 15). Drivers by points: if/else 15 (23 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.
AgentComponent.fetchLocalData (cognitive 24) feature/ai/src/main/java/com/shifenmiao/ai/component/AgentComponent.kt:195— AgentComponent.fetchLocalData has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 1 (nesting depth added 12). 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.
CalendarTabKt.FotoCard (cognitive 24) feature/calendar/src/main/java/com/wanbaohe/calendar/ui/CalendarTab.kt:523— CalendarTabKt.FotoCard has cognitive complexity 24 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CropContentKt.CropContent (cognitive 24) feature/crop/src/main/java/com/t8rin/imagetoolbox/feature/crop/presentation/CropContent.kt:104— CropContentKt.CropContent has cognitive complexity 24 (threshold 15). Drivers by points: if/else 18 (22 pts), boolean chains 2 (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.
MarkdownEditorScreenKt.MarkdownEditorScreen (cognitive 24) feature/markdown-edit/src/main/java/com/wanbaohe/markdown/edit/screen/MarkdownEditorScreen.kt:91— MarkdownEditorScreenKt.MarkdownEditorScreen has cognitive complexity 24 (threshold 15). Drivers by points: if/else 20 (21 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
MediaLibraryContentKt.MediaLibraryContent (cognitive 24) feature/media-player/src/main/java/com/wanbaohe/media/ui/MediaLibraryContent.kt:94— MediaLibraryContentKt.MediaLibraryContent has cognitive complexity 24 (threshold 15). Drivers by points: if/else 19 (23 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.
MinesweeperComponent.chordReveal (cognitive 24) feature/minesweeper/src/main/java/com/wanbaohe/minesweeper/component/MinesweeperComponent.kt:291— MinesweeperComponent.chordReveal has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OnDeviceOcrScreenKt.OnDeviceOcrScreen (cognitive 24) feature/on-device-ocr/src/main/java/com/wanbaohe/ocr/screen/OnDeviceOcrScreen.kt:93— OnDeviceOcrScreenKt.OnDeviceOcrScreen has cognitive complexity 24 (threshold 15). Drivers by points: if/else 16 (19 pts), match/switch 2 (3 pts), boolean chains 2 (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.
PagingDataItemScreenKt.PagingDataItemScreen (cognitive 24) feature/online/src/main/java/com/shifenmiao/online/screen/PagingDataItemScreen.kt:116— PagingDataItemScreenKt.PagingDataItemScreen has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 5, match/switch 2 (4 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.
TextCardExportSheetKt.TextCardExportSheet (cognitive 24) feature/text-card/src/main/java/com/wanbaohe/textcard/presentation/editor/TextCardExportSheet.kt:59— TextCardExportSheetKt.TextCardExportSheet has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 6, match/switch 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.
BrowserScreenKt.BrowserScreen (cognitive 24) feature/webview/src/main/java/com/shifenmiao/webview/browser/BrowserScreen.kt:83— BrowserScreenKt.BrowserScreen has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (15 pts), match/switch 4 (6 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
SeamCarver.findMaskBounds (cognitive 24) libs/opencv-tools/src/main/java/com/t8rin/opencv_tools/seam_carving/SeamCarver.kt:833— SeamCarver.findMaskBounds has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (20 pts), loops 2 (3 pts), boolean chains 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.
ResumableFileDownloader.download (cognitive 23) core/network/src/main/java/com/shifenmiao/network/downloader/ResumableFileDownloader.kt:48— ResumableFileDownloader.download has cognitive complexity 23 (threshold 15). Drivers by points: if/else 15 (17 pts), boolean chains 3, error handling 2, loops 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.
LineTrendChartKt.LineTrendChart (cognitive 23) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/charts/LineTrendChart.kt:57— LineTrendChartKt.LineTrendChart has cognitive complexity 23 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DataMultipleSelectorKt.DataMultipleSelector (cognitive 23) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/selection/DataMultipleSelector.kt:85— DataMultipleSelectorKt.DataMultipleSelector has cognitive complexity 23 (threshold 15). Drivers by points: if/else 19 (21 pts), boolean chains 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.
CustomRangeSliderUtilsKt.rangeSliderPressDragModifier (cognitive 23) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/sliders/custom_slider/CustomRangeSliderUtils.kt:49— CustomRangeSliderUtilsKt.rangeSliderPressDragModifier has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (20 pts), error handling 1 (2 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.
CustomSliderUtilsKt.awaitPointerSlopOrCancellation (cognitive 23) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/sliders/custom_slider/CustomSliderUtils.kt:119— CustomSliderUtilsKt.awaitPointerSlopOrCancellation has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (22 pts), 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.
AgentLoopExecutor.executeSingleToolCall (cognitive 23) feature/ai/src/main/java/com/shifenmiao/ai/agent/AgentLoopExecutor.kt:588— AgentLoopExecutor.executeSingleToolCall has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (17 pts), error handling 2 (4 pts), boolean chains 1, loops 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.
AgentFileServiceImpl.grepFiles (cognitive 23) feature/ai/src/main/java/com/shifenmiao/ai/service/AgentFileServiceImpl.kt:194— AgentFileServiceImpl.grepFiles has cognitive complexity 23 (threshold 15). Drivers by points: if/else 19 (22 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
AddRecordScreenKt.AddRecordScreen (cognitive 23) feature/bookkeeping/src/main/java/com/wanbaohe/bookkeeping/screen/AddRecordScreen.kt:86— AddRecordScreenKt.AddRecordScreen has cognitive complexity 23 (threshold 15). Drivers by points: if/else 20 (21 pts), match/switch 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
MoveGenerator.castlingMoves (cognitive 23) feature/chess/src/main/java/com/wanbaohe/chess/domain/MoveGenerator.kt:145— MoveGenerator.castlingMoves has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 8 (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.
DataSyncScreenKt.ImportContent (cognitive 23) feature/common/src/main/java/com/shifenmiao/common/export/DataSyncScreen.kt:330— DataSyncScreenKt.ImportContent has cognitive complexity 23 (threshold 15). Drivers by points: if/else 15 (22 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.
DshRootScreenKt.CloudRelaySection (cognitive 23) feature/dsh-client/src/main/java/com/wanbaohe/dsh/screen/DshRootScreen.kt:755— DshRootScreenKt.CloudRelaySection has cognitive complexity 23 (threshold 15). Drivers by points: if/else 16 (20 pts), loops 1 (2 pts), match/switch 1 (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.
SubagentSheetKt.SubagentTranscriptView (cognitive 23) feature/dsh-client/src/main/java/com/wanbaohe/dsh/screen/SubagentSheet.kt:401— SubagentSheetKt.SubagentTranscriptView has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (11 pts), error handling 4 (7 pts), boolean chains 5 (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.
GomokuSetupScreenKt.GomokuSetupScreen (cognitive 23) feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuSetupScreen.kt:79— GomokuSetupScreenKt.GomokuSetupScreen has cognitive complexity 23 (threshold 15). Drivers by points: if/else 15, boolean chains 7, 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.
AddTodoScreenKt.AddTodoScreen (cognitive 23) feature/marktodo/src/main/java/com/shifenmiao/marktodo/screen/AddTodoScreen.kt:92— AddTodoScreenKt.AddTodoScreen has cognitive complexity 23 (threshold 15). Drivers by points: if/else 22, boolean chains 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.
BuyCoffeeScreenKt.BuyCoffeeBody (cognitive 23) feature/profile/src/main/java/com/wanbaohe/profile/screen/BuyCoffeeScreen.kt:150— BuyCoffeeScreenKt.BuyCoffeeBody has cognitive complexity 23 (threshold 15). Drivers by points: if/else 16 (19 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, 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.
UserInfoScreenKt.UserInfoScreen (cognitive 23) feature/profile/src/main/java/com/wanbaohe/profile/screen/UserInfoScreen.kt:95— UserInfoScreenKt.UserInfoScreen has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (22 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.
ProfileSettingItemKt.ProfileSettingItem (cognitive 23) feature/profile/src/main/java/com/wanbaohe/profile/settingItem/ProfileSettingItem.kt:72— ProfileSettingItemKt.ProfileSettingItem has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (15 pts), error handling 1 (3 pts), match/switch 2 (3 pts), loops 1 (2 pts) (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.
FrameImageView.onTouchEvent (cognitive 23) libs/collages/src/main/java/com/t8rin/collages/view/FrameImageView.kt:405— FrameImageView.onTouchEvent has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (22 pts), boolean chains 1 (nesting depth added 13). 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.
MermaidCompatibilityNormalizerKt.topLevelArrowOffsets (cognitive 23) libs/diagram/src/main/java/com/wanbaohe/diagram/MermaidCompatibilityNormalizer.kt:39— MermaidCompatibilityNormalizerKt.topLevelArrowOffsets has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 2 (5 pts), boolean chains 4, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MermaidGitGraphSubPipeline.render (cognitive 23) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidGitGraphSubPipeline.kt:56— MermaidGitGraphSubPipeline.render has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 3, loops 3, match/switch 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MermaidTimelineSubPipeline.render (cognitive 23) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidTimelineSubPipeline.kt:73— MermaidTimelineSubPipeline.render has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 3 (6 pts), boolean chains 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PlantUmlSaltSubPipeline.render (cognitive 23) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlSaltSubPipeline.kt:50— PlantUmlSaltSubPipeline.render has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (17 pts), match/switch 3 (6 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.
IncrementalSelectionIndexBuilder.selectionEntriesForBlock (cognitive 23) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/internal/selection/SelectionModelIndex.kt:243— IncrementalSelectionIndexBuilder.selectionEntriesForBlock has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (20 pts), match/switch 2 (3 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.
SelectionModifiersKt.selectableBlock (cognitive 23) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/internal/selection/SelectionModifiers.kt:24— SelectionModifiersKt.selectableBlock has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (13 pts), loops 4 (9 pts), boolean chains 1 (nesting depth added 8). 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.
bindSelectionToolbar (cognitive 23) web/code-editor/editor.src.js:496— bindSelectionToolbar has cognitive complexity 23 (threshold 15). Drivers by points: if/else 15, boolean chains 8. Most of this is not in the body itself: 1 of the 23 points is its own statement and the rest belongs to 6 function items inside it that branch (a function literal at line 513, handleLongPressStart, a function literal at line 535, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
SaveResultHandlerKt.deriveFolderUri (cognitive 22) core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/SaveResultHandler.kt:428— SaveResultHandlerKt.deriveFolderUri has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 1, 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.
ImageFormatSelectorKt.ImageFormatSelector (cognitive 22) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/selection/ImageFormatSelector.kt:83— ImageFormatSelectorKt.ImageFormatSelector has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15 (16 pts), boolean chains 6 (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.
PictureKt.CoilPicture (cognitive 22) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/image/Picture.kt:180— PictureKt.CoilPicture has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15 (17 pts), boolean chains 5 (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.
AIDuelChatScreenKt.DuelRoleSummaryCard (cognitive 22) feature/ai/src/main/java/com/shifenmiao/ai/screen/AIDuelChatScreen.kt:847— AIDuelChatScreenKt.DuelRoleSummaryCard has cognitive complexity 22 (threshold 15). Drivers by points: if/else 20, 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.
AIDuelChatScreenKt.DuelPickerBottomSheets (cognitive 22) feature/ai/src/main/java/com/shifenmiao/ai/screen/AIDuelChatScreen.kt:1627— AIDuelChatScreenKt.DuelPickerBottomSheets has cognitive complexity 22 (threshold 15). Drivers by points: if/else 18 (20 pts), boolean chains 1, 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.
AIQuestionContentKt.AIQuestionItem (cognitive 22) feature/app/src/main/java/com/wanbaohe/app/ui/AIQuestionContent.kt:133— AIQuestionContentKt.AIQuestionItem has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15 (20 pts), 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.
BlessingWallScreenKt.BlessingPage (cognitive 22) feature/blessing-wall/src/main/java/com/wanbaohe/blessingwall/screen/BlessingWallScreen.kt:565— BlessingWallScreenKt.BlessingPage has cognitive complexity 22 (threshold 15). Drivers by points: if/else 18 (22 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.
LunarCalendarCalculator.getMonthCalendarDays (cognitive 22) feature/calendar/src/main/java/com/wanbaohe/calendar/data/LunarCalendarCalculator.kt:92— LunarCalendarCalculator.getMonthCalendarDays has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TrajectoryPageKt.TrajectoryPage (cognitive 22) feature/dsh-client/src/main/java/com/wanbaohe/dsh/screen/TrajectoryPage.kt:108— TrajectoryPageKt.TrajectoryPage has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 3 (8 pts), match/switch 2 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GifToolsContentKt.GifToolsContent (cognitive 22) feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/GifToolsContent.kt:68— GifToolsContentKt.GifToolsContent has cognitive complexity 22 (threshold 15). Drivers by points: if/else 17, match/switch 3, 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.
BackgroundPanelKt.BackgroundColorItem (cognitive 22) feature/id-photo/src/main/java/com/wanbaohe/idphoto/presentation/components/BackgroundPanel.kt:83— BackgroundPanelKt.BackgroundColorItem has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (12 pts), loops 2 (5 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TodoDetailScreenKt.TodoDetailScreen (cognitive 22) feature/marktodo/src/main/java/com/shifenmiao/marktodo/screen/TodoDetailScreen.kt:89— TodoDetailScreenKt.TodoDetailScreen has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15 (18 pts), match/switch 3, boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
FullScreenSubtitlesKt.FullScreenSubtitles (cognitive 22) feature/marquee/src/main/java/com/shifenmiao/marquee/screen/FullScreenSubtitles.kt:83— FullScreenSubtitlesKt.FullScreenSubtitles has cognitive complexity 22 (threshold 15). Drivers by points: if/else 18 (21 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.
CreateNoteScreenKt.CreateNoteScreen (cognitive 22) feature/online/src/main/java/com/shifenmiao/online/screen/CreateNoteScreen.kt:89— CreateNoteScreenKt.CreateNoteScreen has cognitive complexity 22 (threshold 15). Drivers by points: if/else 18 (19 pts), match/switch 2, boolean chains 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
BaseSettingItemKt.BaseSettingItem (cognitive 22) feature/profile/src/main/java/com/wanbaohe/profile/settingItem/BaseSettingItem.kt:53— BaseSettingItemKt.BaseSettingItem has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15 (20 pts), boolean chains 1, 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.
ThemeSettingsScreenKt.ThemeSettingsScreen (cognitive 22) feature/settings/src/main/java/com/wanbaohe/setting/theme/screen/ThemeSettingsScreen.kt:151— ThemeSettingsScreenKt.ThemeSettingsScreen has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14, boolean chains 7, 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.
TeleprompterPlayerScreenKt.TeleprompterPlayerScreen (cognitive 22) feature/teleprompter/src/main/java/com/wanbaohe/teleprompter/screen/TeleprompterPlayerScreen.kt:79— TeleprompterPlayerScreenKt.TeleprompterPlayerScreen has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 3, error handling 1 (2 pts), loops 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.
FenCodec.toFenChar (cognitive 22) feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/domain/FenCodec.kt:124— FenCodec.toFenChar 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.
XiangqiBoardKt.pieceLabel (cognitive 22) feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/ui/board/XiangqiBoard.kt:457— XiangqiBoardKt.pieceLabel 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.
ZipBrowserContentKt.ZipBrowserContent (cognitive 22) feature/zip/src/main/java/com/t8rin/imagetoolbox/feature/zip/presentation/ZipBrowserContent.kt:82— ZipBrowserContentKt.ZipBrowserContent has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (14 pts), match/switch 3 (7 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MermaidSessionPipeline.advance (cognitive 22) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidSessionPipeline.kt:52— MermaidSessionPipeline.advance has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DefaultMarkdownComposePainterKt.PaintRenderBlock (cognitive 22) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/internal/compose/DefaultMarkdownComposePainter.kt:323— DefaultMarkdownComposePainterKt.PaintRenderBlock has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (21 pts), match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ModalSheetLayoutKt.ModalSheetLayout (cognitive 22) libs/modalsheet/src/main/java/com/t8rin/modalsheet/ModalSheetLayout.kt:326— ModalSheetLayoutKt.ModalSheetLayout has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (19 pts), match/switch 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
push_images.run_batch (cognitive 22) fastlane/push_images.py:209— push_images.run_batch has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 4 (6 pts), error handling 2 (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.
upload.handleFiles (cognitive 22) web/file_transfer/js/features/upload/upload.js:91— upload.handleFiles has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 9, ternaries 2 (nesting depth added 3). Of this number, 19 points are the body's own statements and 3 belong to 3 function literals inside it that branch. 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.
MaterialComponentsKt.RowSelectorRenderer (cognitive 21) core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:1237— MaterialComponentsKt.RowSelectorRenderer has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15 (17 pts), boolean chains 3, 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. This shape REPEATS in the file: one other method here (MaterialComponentsKt.ColumnSelectorRenderer) 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.
MaterialComponentsKt.ColumnSelectorRenderer (cognitive 21) core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:1359— MaterialComponentsKt.ColumnSelectorRenderer has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15 (17 pts), boolean chains 3, 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. This shape REPEATS in the file: one other method here (MaterialComponentsKt.RowSelectorRenderer) 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.
FilterPreviewSheetKt.FilterPreviewSheet (cognitive 21) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterPreviewSheet.kt:87— FilterPreviewSheetKt.FilterPreviewSheet has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15 (17 pts), boolean chains 4 (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.
UrlCheckService.check (cognitive 21) core/network/src/main/java/com/shifenmiao/network/service/UrlCheckService.kt:71— UrlCheckService.check has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (15 pts), error handling 3 (4 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MediaCheckBoxKt.MediaCheckBox (cognitive 21) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/buttons/MediaCheckBox.kt:62— MediaCheckBoxKt.MediaCheckBox has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (21 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.
AIDuelChatScreenKt.DuelRoleConfigSection (cognitive 21) feature/ai/src/main/java/com/shifenmiao/ai/screen/AIDuelChatScreen.kt:990— AIDuelChatScreenKt.DuelRoleConfigSection has cognitive complexity 21 (threshold 15). Drivers by points: if/else 20, boolean chains 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.
ElevationGaugeSectionKt.ElevationGaugeSection (cognitive 21) feature/altitude/src/main/java/com/wanbaohe/altitude/ui/ElevationGaugeSection.kt:76— ElevationGaugeSectionKt.ElevationGaugeSection has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (15 pts), match/switch 4 (5 pts), boolean chains 1 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
FavoriteScreenKt.ContentListSection (cognitive 21) feature/app/src/main/java/com/wanbaohe/app/app_screen/FavoriteScreen.kt:212— FavoriteScreenKt.ContentListSection has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WebViewModalBottomSheetKt.WebViewModalBottomSheet (cognitive 21) feature/app/src/main/java/com/wanbaohe/app/ui/WebViewModalBottomSheet.kt:93— WebViewModalBottomSheetKt.WebViewModalBottomSheet has cognitive complexity 21 (threshold 15). Drivers by points: if/else 17 (20 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
AuspiciousDayTabKt.AuspiciousDayTab (cognitive 21) feature/calendar/src/main/java/com/wanbaohe/calendar/ui/AuspiciousDayTab.kt:85— AuspiciousDayTabKt.AuspiciousDayTab has cognitive complexity 21 (threshold 15). Drivers by points: if/else 18 (20 pts), 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.
BoardState.nextCastlingRights (cognitive 21) feature/chess/src/main/java/com/wanbaohe/chess/domain/model/BoardState.kt:84— BoardState.nextCastlingRights has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 4, 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.
ChessSetupScreenKt.ChessSetupScreen (cognitive 21) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessSetupScreen.kt:86— ChessSetupScreenKt.ChessSetupScreen has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13, boolean chains 7, 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.
OneBoxPreferenceItemKt.OneBoxPreferenceItem (cognitive 21) feature/common/src/main/java/com/shifenmiao/common/ui/OneBoxPreferenceItem.kt:43— OneBoxPreferenceItemKt.OneBoxPreferenceItem has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (21 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.
DrawContentKt.DrawContent (cognitive 21) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/DrawContent.kt:101— DrawContentKt.DrawContent has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15 (18 pts), boolean chains 2, 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.
ScheduleLinkStatusKt.ScheduleLinkStatus (cognitive 21) feature/marktodo/src/main/java/com/shifenmiao/marktodo/components/ScheduleLinkStatus.kt:63— ScheduleLinkStatusKt.ScheduleLinkStatus has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 8, match/switch 1 (nesting depth added 4). 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.
MarkTodoScreenKt.MarkTodoScreen (cognitive 21) feature/marktodo/src/main/java/com/shifenmiao/marktodo/screen/MarkTodoScreen.kt:109— MarkTodoScreenKt.MarkTodoScreen has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 8, match/switch 3 (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.
MarkupExportEncoder.encodeForExport (cognitive 21) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/recipe/MarkupExportEncoder.kt:48— MarkupExportEncoder.encodeForExport has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 3, loops 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.
VideoPlayerContentKt.VideoStage (cognitive 21) feature/media-player/src/main/java/com/wanbaohe/media/ui/VideoPlayerContent.kt:162— VideoPlayerContentKt.VideoStage 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.
QrCodePreviewKt.QrCodePreview (cognitive 21) feature/scan-qr-code/src/main/java/com/t8rin/imagetoolbox/feature/scan_qr_code/presentation/components/QrCodePreview.kt:72— QrCodePreviewKt.QrCodePreview has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15 (17 pts), boolean chains 4 (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.
TTSSettingsScreenKt.TTSSettingsContent (cognitive 21) feature/settings/src/main/java/com/wanbaohe/setting/ai/screen/TTSSettingsScreen.kt:110— TTSSettingsScreenKt.TTSSettingsContent has cognitive complexity 21 (threshold 15). Drivers by points: if/else 20, boolean chains 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.
XiangqiGameComponent.requestAiMove (cognitive 21) feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiGameComponent.kt:843— XiangqiGameComponent.requestAiMove has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 3, match/switch 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GeometryUtils.createPathWithCubicCorner (cognitive 21) libs/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:317— GeometryUtils.createPathWithCubicCorner has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FrameImageView.buildRealPath (cognitive 21) libs/collages/src/main/java/com/t8rin/collages/view/FrameImageView.kt:652— FrameImageView.buildRealPath has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (18 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DiagramCanvasKt.DiagramCanvas (cognitive 21) libs/diagram/src/upstream/java/com/hrm/diagram/render/compose/DiagramCanvas.kt:112— DiagramCanvasKt.DiagramCanvas has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
MarkdownSelectionController.anchorFromWindow (cognitive 21) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/internal/selection/MarkdownSelectionController.kt:570— MarkdownSelectionController.anchorFromWindow has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 2, match/switch 1 (2 pts), 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.
connectChat (cognitive 21) web/file_transfer/js/features/chat/ws.js:35— connectChat has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 3, error handling 2, ternaries 2 (nesting depth added 4). Most of this is not in the body itself: 5 of the 21 points are its own statements and the rest belongs to 5 function items inside it that branch (onmessage, a function literal at line 98, onopen, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
MusicVideoObject.equals (cognitive 20) core/model/src/main/java/com/shifenmiao/model/wechat/common/MediaObject.kt:259— MusicVideoObject.equals has cognitive complexity 20 (threshold 15). Drivers by points: if/else 17 (19 pts), 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.
SaveResultHandlerImpl.parseSaveResults (cognitive 20) core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/SaveResultHandler.kt:133— SaveResultHandlerImpl.parseSaveResults has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AdaptiveBottomScaffoldLayoutScreenKt.AdaptiveBottomScaffoldLayoutScreen (cognitive 20) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/AdaptiveBottomScaffoldLayoutScreen.kt:88— AdaptiveBottomScaffoldLayoutScreenKt.AdaptiveBottomScaffoldLayoutScreen has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 3, 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.
ColorInfoKt.ColorInfo (cognitive 20) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/color_picker/ColorInfo.kt:97— ColorInfoKt.ColorInfo has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15 (18 pts), loops 1 (2 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.
EnhancedSliderItemKt.EnhancedSliderItem (cognitive 20) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedSliderItem.kt:87— EnhancedSliderItemKt.EnhancedSliderItem has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 4 (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.
PreferenceRowKt.PreferenceRow (cognitive 20) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/preferences/PreferenceRow.kt:71— PreferenceRowKt.PreferenceRow has cognitive complexity 20 (threshold 15). Drivers by points: if/else 18 (20 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.
ScreenPreferenceKt.ScreenPreference (cognitive 20) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/preferences/ScreenPreference.kt:35— ScreenPreferenceKt.ScreenPreference has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (19 pts), 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.
NewChatInputKt.StandardInputSection (cognitive 20) feature/ai/src/main/java/com/shifenmiao/ai/ui/NewChatInput.kt:293— NewChatInputKt.StandardInputSection has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13, boolean chains 6, 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.
PlaceHolderMessageCardKt.PromptWorkCard (cognitive 20) feature/ai/src/main/java/com/shifenmiao/ai/ui/PlaceHolderMessageCard.kt:271— PlaceHolderMessageCardKt.PromptWorkCard has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
CalendarTabKt.festivalIconFor (cognitive 20) feature/calendar/src/main/java/com/wanbaohe/calendar/ui/CalendarTab.kt:1942— CalendarTabKt.festivalIconFor has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 5 (9 pts), boolean chains 7, if/else 4 (nesting depth added 4). 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.
MoveGenerator.pawnMoves (cognitive 20) feature/chess/src/main/java/com/wanbaohe/chess/domain/MoveGenerator.kt:98— MoveGenerator.pawnMoves has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 4 (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.
DataSyncComponent.importData (cognitive 20) feature/common/src/main/java/com/shifenmiao/common/export/DataSyncComponent.kt:189— DataSyncComponent.importData has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (3 pts), error handling 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.
AigcFileMetadataReader.readPdfLiteralString (cognitive 20) feature/common/src/main/java/com/shifenmiao/common/file/AigcFileMetadataReader.kt:138— AigcFileMetadataReader.readPdfLiteralString has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (9 pts), match/switch 2 (5 pts), boolean chains 4, loops 2 (nesting depth added 5). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ZoomableAsyncImageKt.ZoomableAsyncImage (cognitive 20) feature/common/src/main/java/com/shifenmiao/common/ui/ZoomableAsyncImage.kt:105— ZoomableAsyncImageKt.ZoomableAsyncImage has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15 (18 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.
SubagentSheetKt.CatalogEntryRow (cognitive 20) feature/dsh-client/src/main/java/com/wanbaohe/dsh/screen/SubagentSheet.kt:297— SubagentSheetKt.CatalogEntryRow has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (19 pts), match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
FileBrowserScreenKt.NavigationToolbar (cognitive 20) feature/file-browser/src/main/java/com/wanbaohe/file/browser/screen/FileBrowserScreen.kt:720— FileBrowserScreenKt.NavigationToolbar has cognitive complexity 20 (threshold 15). Drivers by points: if/else 17 (18 pts), match/switch 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
MarkTodoScreenKt.CategoriesContent (cognitive 20) feature/marktodo/src/main/java/com/shifenmiao/marktodo/screen/MarkTodoScreen.kt:742— MarkTodoScreenKt.CategoriesContent has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 4 (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.
MarkupDocumentCodecKt.decodeStyleSpan (cognitive 20) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupDocumentCodec.kt:649— MarkupDocumentCodecKt.decodeStyleSpan has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 2 (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.
LayerEffectsProcessor.rasterMask (cognitive 20) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/render/LayerEffectsProcessor.kt:219— LayerEffectsProcessor.rasterMask has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (15 pts), loops 2 (3 pts), boolean chains 2 (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.
FullScreenMarqueeRendererKt.ClockFullScreenText (cognitive 20) feature/marquee/src/main/java/com/shifenmiao/marquee/screen/FullScreenMarqueeRenderer.kt:523— FullScreenMarqueeRendererKt.ClockFullScreenText has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16 (19 pts), loops 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.
OpticalCenteredTextKt.OpticalCenteredText (cognitive 20) feature/marquee/src/main/java/com/shifenmiao/marquee/screen/OpticalCenteredText.kt:45— OpticalCenteredTextKt.OpticalCenteredText has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MediaPickerGridWithOverlaysKt.MediaPickerGridWithOverlays (cognitive 20) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaPickerGridWithOverlays.kt:107— MediaPickerGridWithOverlaysKt.MediaPickerGridWithOverlays has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 10, if/else 10. 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.
UnlockPdfToolContentKt.UnlockPdfToolContent (cognitive 20) feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/unlock/UnlockPdfToolContent.kt:58— UnlockPdfToolContentKt.UnlockPdfToolContent has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (17 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TranslationPaneKt.TranslationPane (cognitive 20) feature/translator/src/main/java/com/wanbaohe/translator/screen/TranslationPane.kt:88— TranslationPaneKt.TranslationPane has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 5, match/switch 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
XiangqiAiPickerBottomSheetKt.SourceRow (cognitive 20) feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/ui/XiangqiAiPickerBottomSheet.kt:191— XiangqiAiPickerBottomSheetKt.SourceRow has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (9 pts), match/switch 5 (7 pts), boolean chains 4 (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.
DiagramCanvasKt.execute (cognitive 20) libs/diagram/src/upstream/java/com/hrm/diagram/render/compose/DiagramCanvas.kt:223— DiagramCanvasKt.execute has cognitive complexity 20 (threshold 15). Drivers by points: loops 3 (8 pts), if/else 4 (6 pts), match/switch 3 (5 pts), boolean chains 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.
PlantUmlErdSubPipeline.prepareLayout (cognitive 20) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlErdSubPipeline.kt:85— PlantUmlErdSubPipeline.prepareLayout has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 3, loops 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InlineRenderUtilsKt.parseCssStyleToSpanStyle (cognitive 20) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/inline/InlineRenderUtils.kt:24— InlineRenderUtilsKt.parseCssStyleToSpanStyle has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 4 (11 pts), if/else 6 (7 pts), boolean chains 1, loops 1 (nesting depth added 8). 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.
OtherContentKt.OtherContent (cognitive 19) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/OtherContent.kt:86— OtherContentKt.OtherContent has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 2, 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.
MeshGradientBackgroundKt.vertexColors (cognitive 19) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/MeshGradientBackground.kt:526— MeshGradientBackgroundKt.vertexColors has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15 (17 pts), boolean chains 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.
AgentLoopRunner.requestLlmFollowUp (cognitive 19) feature/ai/src/main/java/com/shifenmiao/ai/component/AgentLoopRunner.kt:519— AgentLoopRunner.requestLlmFollowUp has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AiExecutionTimelineCardKt.AiExecutionStepRow (cognitive 19) feature/ai/src/main/java/com/shifenmiao/ai/execution/component/AiExecutionTimelineCard.kt:280— AiExecutionTimelineCardKt.AiExecutionStepRow has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 4, match/switch 1 (2 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
AgentJsonEditorScreenKt.AgentJsonEditorScreen (cognitive 19) feature/ai/src/main/java/com/shifenmiao/ai/screen/AgentJsonEditorScreen.kt:66— AgentJsonEditorScreenKt.AgentJsonEditorScreen has cognitive complexity 19 (threshold 15). Drivers by points: if/else 18 (19 pts) (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.
AgentFileServiceImpl.unzipFile (cognitive 19) feature/ai/src/main/java/com/shifenmiao/ai/service/AgentFileServiceImpl.kt:621— AgentFileServiceImpl.unzipFile has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 2, 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.
AiModelTabViewKt.AiModelTabView (cognitive 19) feature/ai/src/main/java/com/shifenmiao/ai/ui/AiModelTabView.kt:65— AiModelTabViewKt.AiModelTabView has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16 (17 pts), boolean chains 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
AiUtils.processStreamLine (cognitive 19) feature/ai/src/main/java/com/shifenmiao/ai/utils/AiUtils.kt:725— AiUtils.processStreamLine has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 5, error handling 2 (4 pts), 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.
AuspiciousDayTabKt.AuspiciousDayCard (cognitive 19) feature/calendar/src/main/java/com/wanbaohe/calendar/ui/AuspiciousDayTab.kt:409— AuspiciousDayTabKt.AuspiciousDayCard 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.
ImportGameUseCase.parseImport (cognitive 19) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/ImportGameUseCase.kt:203— ImportGameUseCase.parseImport has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 9, if/else 9, match/switch 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.
GameArbiter.isSquareAttacked (cognitive 19) feature/chess/src/main/java/com/wanbaohe/chess/domain/GameArbiter.kt:128— GameArbiter.isSquareAttacked has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3, loops 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChessBoardKt.glyph (cognitive 19) feature/chess/src/main/java/com/wanbaohe/chess/ui/board/ChessBoard.kt:72— ChessBoardKt.glyph has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (18 pts), 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.
CipherContentKt.CipherContent (cognitive 19) feature/cipher/src/main/java/com/t8rin/imagetoolbox/feature/cipher/presentation/CipherContent.kt:80— CipherContentKt.CipherContent has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16 (18 pts), 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.
WebDavXmlParser.entriesToItems (cognitive 19) feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/adapter/WebDavXmlParser.kt:125— WebDavXmlParser.entriesToItems has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 3, 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.
JpegAigcInjector.findXmpApp1Range (cognitive 19) feature/common/src/main/java/com/shifenmiao/common/file/JpegAigcInjector.kt:109— JpegAigcInjector.findXmpApp1Range has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 3, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AIEngineManager.resolveSelection (cognitive 19) feature/common/src/main/java/com/shifenmiao/common/manager/AIEngineManager.kt:495— AIEngineManager.resolveSelection has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 3, 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.
RobotController.updateRobotPosition (cognitive 19) feature/common/src/main/java/com/shifenmiao/common/robot/RobotController.kt:61— RobotController.updateRobotPosition has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15 (17 pts), boolean chains 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.
PairingManagerKt.parsePairInvite (cognitive 19) REDACTED:163— PairingManagerKt.parsePairInvite has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SessionStore.fetchPage (cognitive 19) feature/dsh-client/src/main/java/com/wanbaohe/dsh/session/SessionStore.kt:316— SessionStore.fetchPage has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (9 pts), error handling 3 (6 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FileTransferScreenKt.FileTransferScreen (cognitive 19) feature/file-transfer/src/main/java/com/wanbaohe/file_transfer/screen/FileTransferScreen.kt:129— FileTransferScreenKt.FileTransferScreen has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 1, match/switch 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
GomokuOpponentPickerKt.GomokuOpponentPicker (cognitive 19) feature/gomoku/src/main/java/com/wanbaohe/gomoku/ui/GomokuOpponentPicker.kt:41— GomokuOpponentPickerKt.GomokuOpponentPicker has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (16 pts), match/switch 1 (2 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.
LifeTimeAddCountdownScreenKt.CountdownForm (cognitive 19) feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeAddCountdownScreen.kt:99— LifeTimeAddCountdownScreenKt.CountdownForm has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16, boolean chains 3. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
MarkTodoScreenKt.ActiveConditionChips (cognitive 19) feature/marktodo/src/main/java/com/shifenmiao/marktodo/screen/MarkTodoScreen.kt:601— MarkTodoScreenKt.ActiveConditionChips has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (13 pts), match/switch 2 (4 pts), boolean chains 2 (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.
FullScreenMarqueeRendererKt.paginateTextByHeight (cognitive 19) feature/marquee/src/main/java/com/shifenmiao/marquee/screen/FullScreenMarqueeRenderer.kt:443— FullScreenMarqueeRendererKt.paginateTextByHeight has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 2 (3 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.
AndroidPdfManager.printPdf (cognitive 19) feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/data/AndroidPdfManager.kt:845— AndroidPdfManager.printPdf has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VipLevelScreenKt.VipLevelItem (cognitive 19) feature/profile/src/main/java/com/wanbaohe/profile/screen/VipLevelScreen.kt:321— VipLevelScreenKt.VipLevelItem has cognitive complexity 19 (threshold 15). Drivers by points: if/else 17 (18 pts), boolean chains 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
AIEngineSettingsDetailScreenKt.ModelSelectionCard (cognitive 19) feature/settings/src/main/java/com/wanbaohe/setting/ai/screen/AIEngineSettingsDetailScreen.kt:1004— AIEngineSettingsDetailScreenKt.ModelSelectionCard has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XiangqiGameScreenKt.XiangqiPlayersRow (cognitive 19) feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiGameScreen.kt:809— XiangqiGameScreenKt.XiangqiPlayersRow has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9, boolean chains 8, match/switch 1 (2 pts) (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.
CollageLayoutFactory.collageLinear (cognitive 19) libs/collages/src/main/java/com/t8rin/collages/utils/CollageLayoutFactory.kt:80— CollageLayoutFactory.collageLinear has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15 (19 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.
GeometryUtils.commonShrinkPath (cognitive 19) libs/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:266— GeometryUtils.commonShrinkPath has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (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.
FamilyOneShotRenderersKt.buildTreeFrame (cognitive 19) libs/diagram/src/upstream/java/com/hrm/diagram/render/export/FamilyOneShotRenderers.kt:114— FamilyOneShotRenderersKt.buildTreeFrame has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16 (18 pts), loops 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.
PlantUmlComponentSubPipeline.applyPrimaryClearance (cognitive 19) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:247— PlantUmlComponentSubPipeline.applyPrimaryClearance has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (12 pts), loops 3 (6 pts), boolean chains 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.
DocumentScannerActivity.onCreate (cognitive 19) libs/documentscanner/src/main/java/com/t8rin/documentscanner/DocumentScannerActivity.kt:144— DocumentScannerActivity.onCreate has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 5, error handling 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.
push_listing.main (cognitive 19) fastlane/push_listing.py:85— push_listing.main has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (13 pts), ternaries 2 (4 pts), loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
i18n.detectLang::normalize (cognitive 19) web/file_transfer/js/core/i18n.js:14— i18n.detectLang::normalize has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14, boolean chains 3, ternaries 1 (2 pts) (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.
BmpBackend.compress (cognitive 18) core/data/src/main/java/com/t8rin/imagetoolbox/core/data/image/utils/compressor/BmpBackend.kt:54— BmpBackend.compress has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 3 (5 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ModifierRegistry.registerBuiltins (cognitive 18) core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/modifier/ModifierRegistry.kt:143— ModifierRegistry.registerBuiltins has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14, boolean chains 3, 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.
TemplateFilter.equals (cognitive 18) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/domain/model/TemplateFilter.kt:25— TemplateFilter.equals has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (14 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.
ChineseDateRangePickerDialogKt.RangeDayCell (cognitive 18) core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDateRangePickerDialog.kt:512— ChineseDateRangePickerDialogKt.RangeDayCell has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8, boolean chains 5, match/switch 3 (5 pts) (nesting depth added 2). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ScreenConstantsImpl.valueOf (cognitive 18) core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/navigation/ScreenUtils.kt:632— ScreenConstantsImpl.valueOf has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (13 pts), match/switch 2 (3 pts), boolean chains 1, error handling 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.
EnhancedDropdownMenuKt.EnhancedDropdownMenu (cognitive 18) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedDropdownMenu.kt:200— EnhancedDropdownMenuKt.EnhancedDropdownMenu has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16, boolean chains 1, 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.
ManageTodoTool.handleList (cognitive 18) feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageTodoTool.kt:348— ManageTodoTool.handleList has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11, match/switch 4, boolean chains 3. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CreateAIAgentScreenKt.CreateAIAgentScreen (cognitive 18) feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:144— CreateAIAgentScreenKt.CreateAIAgentScreen has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12, match/switch 3 (5 pts), boolean chains 1 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CreateAIPromptScreenKt.CreateAIPromptScreen (cognitive 18) feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt:135— CreateAIPromptScreenKt.CreateAIPromptScreen has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12, match/switch 3 (5 pts), boolean chains 1 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
NewChatInputKt.getStateText (cognitive 18) feature/ai/src/main/java/com/shifenmiao/ai/ui/NewChatInput.kt:678— NewChatInputKt.getStateText has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 pts), match/switch 2 (3 pts), boolean chains 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.
BoardGameControlsKt.BoardGamePillButton (cognitive 18) feature/boardgame/src/main/java/com/wanbaohe/boardgame/ui/BoardGameControls.kt:63— BoardGameControlsKt.BoardGamePillButton has cognitive complexity 18 (threshold 15). Drivers by points: if/else 17 (18 pts) (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.
PlayersBarKt.PlayerBarItem (cognitive 18) feature/boardgame/src/main/java/com/wanbaohe/boardgame/ui/PlayersBar.kt:107— PlayersBarKt.PlayerBarItem has cognitive complexity 18 (threshold 15). Drivers by points: if/else 17, boolean chains 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.
ChessSearch.negamax (cognitive 18) feature/chess/src/main/java/com/wanbaohe/chess/data/search/ChessSearch.kt:139— ChessSearch.negamax has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 2, 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.
CommentsBottomSheetKt.CommentsList (cognitive 18) feature/common/src/main/java/com/shifenmiao/common/components/comments/CommentsBottomSheet.kt:276— CommentsBottomSheetKt.CommentsList has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 6 (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.
BaseScreenKt.BaseScreen (cognitive 18) feature/common/src/main/java/com/shifenmiao/common/ui/BaseScreen.kt:126— BaseScreenKt.BaseScreen has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16 (17 pts), boolean chains 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
PlayerControlPanelKt.PlayerControlPanel (cognitive 18) feature/common/src/main/java/com/shifenmiao/common/ui/PlayerControlPanel.kt:120— PlayerControlPanelKt.PlayerControlPanel has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 4 (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.
ChatScreenKt.SessionDrawer (cognitive 18) feature/dsh-client/src/main/java/com/wanbaohe/dsh/screen/ChatScreen.kt:1111— ChatScreenKt.SessionDrawer has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 5, loops 1 (2 pts), match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FileTransferComponent.sendFileFromUri (cognitive 18) feature/file-transfer/src/main/java/com/wanbaohe/file_transfer/screenLogic/FileTransferComponent.kt:498— FileTransferComponent.sendFileFromUri has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 3, loops 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.
FastBlurFilterKt.fastBlur (cognitive 18) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/model/FastBlurFilter.kt:54— FastBlurFilterKt.fastBlur has cognitive complexity 18 (threshold 15). Drivers by points: loops 7 (11 pts), if/else 3 (7 pts) (nesting depth added 8). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
LocationManageTabKt.LocationTreeRow (cognitive 18) feature/household-items/src/main/java/com/wanbaohe/householditems/screen/LocationManageTab.kt:291— LocationManageTabKt.LocationTreeRow has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15 (17 pts), 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.
HourglassHeroCardKt.HourglassBackdrop (cognitive 18) feature/lifetime/src/main/java/com/shifenmiao/lifetime/ui/HourglassHeroCard.kt:410— HourglassHeroCardKt.HourglassBackdrop has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 pts), match/switch 1 (3 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MarkupProjectStore.normalizeDocument (cognitive 18) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupProjectStore.kt:161— MarkupProjectStore.normalizeDocument has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (10 pts), match/switch 5 (8 pts) (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.
RecipeBatchSheetKt.RecipeBatchSheet (cognitive 18) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/recipe/RecipeBatchSheet.kt:62— RecipeBatchSheetKt.RecipeBatchSheet has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 3 (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.
InPlaceTextLayerEditorKt.InPlaceTextLayerEditor (cognitive 18) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/render/InPlaceTextLayerEditor.kt:104— InPlaceTextLayerEditorKt.InPlaceTextLayerEditor has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 2 (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.
MinesweeperScreenKt.BottomBar (cognitive 18) feature/minesweeper/src/main/java/com/wanbaohe/minesweeper/screen/MinesweeperScreen.kt:374— MinesweeperScreenKt.BottomBar 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.
PoemScreenKt.PoemDetailPage (cognitive 18) feature/poem/src/main/java/com/wanbaohe/poem/screen/PoemScreen.kt:293— PoemScreenKt.PoemDetailPage has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12, 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.
QrTypeUtilsKt.createRaw (cognitive 18) feature/scan-qr-code/src/main/java/com/t8rin/imagetoolbox/feature/scan_qr_code/presentation/components/QrTypeUtils.kt:247— QrTypeUtilsKt.createRaw has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 1, match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
AIEngineSettingsScreenKt.EngineListCard (cognitive 18) feature/settings/src/main/java/com/wanbaohe/setting/ai/screen/AIEngineSettingsScreen.kt:271— AIEngineSettingsScreenKt.EngineListCard has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
XiangqiSearch.findBestMove (cognitive 18) feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/search/XiangqiSearch.kt:74— XiangqiSearch.findBestMove has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (3 pts), boolean chains 1, error handling 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.
XiangqiGameScreenKt.XiangqiGameScreen (cognitive 18) feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiGameScreen.kt:129— XiangqiGameScreenKt.XiangqiGameScreen has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 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.
XiangqiLibraryScreenKt.GameCard (cognitive 18) feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiLibraryScreen.kt:153— XiangqiLibraryScreenKt.GameCard has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12, match/switch 4 (5 pts), boolean chains 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
HtmlBlockModelCompiler.buildTree (cognitive 18) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/internal/core/compile/HtmlBlockModelCompiler.kt:99— HtmlBlockModelCompiler.buildTree has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 2 (5 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SafeHtmlPolicy.blockAction (cognitive 18) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/internal/core/compile/SafeHtmlPolicy.kt:79— SafeHtmlPolicy.blockAction has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 3, 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.
DefaultMarkdownLayoutEngineKt.layoutBlockInternal (cognitive 18) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/internal/layout/engine/DefaultMarkdownLayoutEngine.kt:154— DefaultMarkdownLayoutEngineKt.layoutBlockInternal has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (14 pts), match/switch 2 (3 pts), boolean chains 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.
deviceInfo.loadDeviceInfo (cognitive 18) web/file_transfer/js/features/device/deviceInfo.js:11— deviceInfo.loadDeviceInfo has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 1, error handling 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.
prettier (cognitive 18) web/file_viewer/build.mjs:40— prettier has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), ternaries 1 (3 pts), error handling 1, loops 1 (nesting depth added 6). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to 4 function items inside it that branch (main, transformFile, a function literal at line 77, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
SelectorSupportKt.rememberSelectorState (cognitive 17) core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/SelectorSupport.kt:86— SelectorSupportKt.rememberSelectorState has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (9 pts), match/switch 2 (5 pts), boolean chains 3 (nesting depth added 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.
ChineseDatePickerDialogKt.ChineseDatePickerDialog (cognitive 17) core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDatePickerDialog.kt:152— ChineseDatePickerDialogKt.ChineseDatePickerDialog has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, boolean chains 2, error handling 1 (2 pts), match/switch 1 (2 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
DatePickerKt.handleColumnChange (cognitive 17) core/ui/src/main/java/com/wanbaohe/base/ui/picker/DatePicker.kt:83— DatePickerKt.handleColumnChange has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 5, match/switch 1 (2 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
EnhancedModalTopSheetKt.EnhancedModalTopSheet (cognitive 17) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedModalTopSheet.kt:99— EnhancedModalTopSheetKt.EnhancedModalTopSheet has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (13 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.
GlassFilterChipKt.GlassFilterChip (cognitive 17) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassFilterChip.kt:54— GlassFilterChipKt.GlassFilterChip has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (17 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.
ProtocolRoutingAIRequestHandler.parseResponsesSsePayload (cognitive 17) feature/ai/src/main/java/com/shifenmiao/ai/request/ProtocolRoutingAIRequestHandler.kt:686— ProtocolRoutingAIRequestHandler.parseResponsesSsePayload has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ProtocolRoutingAIRequestHandler.parseResponsesOutputItem (cognitive 17) feature/ai/src/main/java/com/shifenmiao/ai/request/ProtocolRoutingAIRequestHandler.kt:891— ProtocolRoutingAIRequestHandler.parseResponsesOutputItem has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), match/switch 3 (5 pts), boolean chains 3 (nesting depth added 4). 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.
ProtocolRoutingAIRequestHandler.convertContent (cognitive 17) feature/ai/src/main/java/com/shifenmiao/ai/request/ProtocolRoutingAIRequestHandler.kt:1328— ProtocolRoutingAIRequestHandler.convertContent has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (11 pts), match/switch 2 (4 pts), loops 1 (2 pts) (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.
AIDuelChatScreenKt.DuelStatusBar (cognitive 17) feature/ai/src/main/java/com/shifenmiao/ai/screen/AIDuelChatScreen.kt:1492— AIDuelChatScreenKt.DuelStatusBar has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 4, match/switch 3 (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.
FileUploadRouter.processWithBase64AndCollect (cognitive 17) feature/ai/src/main/java/com/shifenmiao/ai/upload/FileUploadRouter.kt:213— FileUploadRouter.processWithBase64AndCollect has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), error handling 2 (5 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GpsAltitudeSource.altitudeFlow (cognitive 17) feature/altitude/src/main/java/com/wanbaohe/altitude/data/sensor/GpsAltitudeSource.kt:88— GpsAltitudeSource.altitudeFlow has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 2, error handling 1, 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.
CalendarShareScreenKt.CalendarShareScreen (cognitive 17) feature/calendar/src/main/java/com/wanbaohe/calendar/share/CalendarShareScreen.kt:114— CalendarShareScreenKt.CalendarShareScreen has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, boolean chains 3, error handling 2, 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.
ConversionTabKt.ConversionTab (cognitive 17) feature/calendar/src/main/java/com/wanbaohe/calendar/ui/ConversionTab.kt:90— ConversionTabKt.ConversionTab has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 1, match/switch 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
DispatchingMoveChooser.chooseForGame (cognitive 17) feature/chess/src/main/java/com/wanbaohe/chess/data/DispatchingMoveChooser.kt:62— DispatchingMoveChooser.chooseForGame has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 3, 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.
CloudFileGridKt.CloudFileListRow (cognitive 17) feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/screen/components/CloudFileGrid.kt:385— CloudFileGridKt.CloudFileListRow has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 3, 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.
CommentsComponent.toggleBlock (cognitive 17) feature/common/src/main/java/com/shifenmiao/common/components/comments/CommentsComponent.kt:444— CommentsComponent.toggleBlock has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (16 pts), error handling 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.
TextSelectionToolbarKt.TextSelectionActionButton (cognitive 17) feature/common/src/main/java/com/shifenmiao/common/components/text/TextSelectionToolbar.kt:236— TextSelectionToolbarKt.TextSelectionActionButton has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, match/switch 2, boolean chains 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.
AIEngineSyncManager.performReplaceUpdate (cognitive 17) feature/common/src/main/java/com/shifenmiao/common/manager/AIEngineSyncManager.kt:101— AIEngineSyncManager.performReplaceUpdate has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), match/switch 2 (5 pts), boolean chains 3 (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.
ImageBaseScreenKt.ImageBaseScreen (cognitive 17) feature/common/src/main/java/com/shifenmiao/common/ui/ImageBaseScreen.kt:209— ImageBaseScreenKt.ImageBaseScreen has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 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.
DrawContentControlsKt.DrawContentControls (cognitive 17) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/controls/DrawContentControls.kt:81— DrawContentControlsKt.DrawContentControls has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, boolean chains 4, match/switch 1 (2 pts) (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.
FileBrowserComponent.getBreadcrumbs (cognitive 17) feature/file-browser/src/main/java/com/wanbaohe/file/browser/screenLogic/FileBrowserComponent.kt:638— FileBrowserComponent.getBreadcrumbs has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 4, loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChatMessageItemKt.ChatMessageItem (cognitive 17) feature/file-transfer/src/main/java/com/wanbaohe/file_transfer/screen/components/ChatMessageItem.kt:63— ChatMessageItemKt.ChatMessageItem has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 3, match/switch 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
FileTransferServer.handleDelete (cognitive 17) feature/file-transfer/src/main/java/com/wanbaohe/file_transfer/server/FileTransferServer.kt:1058— FileTransferServer.handleDelete has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (14 pts), error handling 2, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Pixelate.getPixelColor (cognitive 17) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/Pixelate.kt:187— Pixelate.getPixelColor has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 3 (7 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PixelationTool.getPixelColor (cognitive 17) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/PixelationTool.kt:147— PixelationTool.getPixelColor has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 3 (7 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FiltersContentKt.FiltersContent (cognitive 17) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/FiltersContent.kt:86— FiltersContentKt.FiltersContent has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, boolean chains 3. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
GameEngine.isGameOver (cognitive 17) feature/game2048/src/main/java/com/wanbaohe/game2048/component/GameEngine.kt:100— GameEngine.isGameOver has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 4 (6 pts), boolean chains 2 (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.
ImportGameUseCase.importJson (cognitive 17) feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/ImportGameUseCase.kt:145— ImportGameUseCase.importJson has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), error handling 4, boolean chains 1, match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AndroidImageCutter.cutHorizontally (cognitive 17) feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/data/AndroidImageCutter.kt:125— AndroidImageCutter.cutHorizontally has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 5, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (AndroidImageCutter.cutVertically) 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.
AndroidImageCutter.cutVertically (cognitive 17) feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/data/AndroidImageCutter.kt:203— AndroidImageCutter.cutVertically has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 5, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (AndroidImageCutter.cutHorizontally) 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.
ImagePreviewContentKt.ImagePreviewContent (cognitive 17) feature/image-preview/src/main/java/com/t8rin/imagetoolbox/feature/image_preview/presentation/ImagePreviewContent.kt:121— ImagePreviewContentKt.ImagePreviewContent 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.
LibrariesContainerKt.LibrariesScaffold (cognitive 17) feature/libraries-info/src/main/java/com/t8rin/imagetoolbox/feature/libraries_info/presentation/components/LibrariesContainer.kt:303— LibrariesContainerKt.LibrariesScaffold has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8, boolean chains 7, error handling 1 (2 pts) (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.
LifeTimeAddMilestoneScreenKt.MilestoneForm (cognitive 17) feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeAddMilestoneScreen.kt:96— LifeTimeAddMilestoneScreenKt.MilestoneForm has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, boolean chains 3. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
EditorScaffoldKt.EditorLayerStack (cognitive 17) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/editor/EditorScaffold.kt:1088— EditorScaffoldKt.EditorLayerStack has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, boolean chains 8. 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.
MediaPickerComponent.collectMedia (cognitive 17) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/screenLogic/MediaPickerComponent.kt:163— MediaPickerComponent.collectMedia has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PagingDataItemScreenKt.PinListToNewestHead (cognitive 17) feature/online/src/main/java/com/shifenmiao/online/screen/PagingDataItemScreen.kt:670— PagingDataItemScreenKt.PinListToNewestHead has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 5 (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.
AddRecordScreenKt.AddRecordScreen (cognitive 17) feature/record-center/src/main/java/com/wanbaohe/recordcenter/screen/AddRecordScreen.kt:78— AddRecordScreenKt.AddRecordScreen has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13 (17 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.
AiEngineProtocolSwitchKt.switchedRequestProtocol (cognitive 17) feature/settings/src/main/java/com/wanbaohe/setting/ai/component/AiEngineProtocolSwitch.kt:42— AiEngineProtocolSwitchKt.switchedRequestProtocol has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (11 pts), match/switch 4, boolean chains 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
AIEngineFormPartsKt.ProviderModelsPickerDialog (cognitive 17) feature/settings/src/main/java/com/wanbaohe/setting/ai/screen/AIEngineFormParts.kt:215— AIEngineFormPartsKt.ProviderModelsPickerDialog has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 1, match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SudokuGameContentKt.SudokuCell (cognitive 17) feature/sudoku/src/main/java/com/wanbaohe/sudoku/screen/SudokuGameContent.kt:246— SudokuGameContentKt.SudokuCell has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 3, 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.
SetupPositionValidator.validate (cognitive 17) feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/domain/SetupPositionValidator.kt:43— SetupPositionValidator.validate has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 4 (6 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MermaidKanbanSubPipeline.render (cognitive 17) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidKanbanSubPipeline.kt:62— MermaidKanbanSubPipeline.render has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (6 pts), loops 3 (6 pts), match/switch 1 (3 pts), boolean chains 2 (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.
PlantUmlComponentSubPipeline.measureNodeSize (cognitive 17) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:168— PlantUmlComponentSubPipeline.measureNodeSize has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (16 pts), match/switch 1 (nesting depth added 5). 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.
PlantUmlMindmapSubPipeline.render (cognitive 17) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlMindmapSubPipeline.kt:62— PlantUmlMindmapSubPipeline.render has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 1, loops 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.
PlantUmlSessionPipeline.processLine (cognitive 17) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlSessionPipeline.kt:93— PlantUmlSessionPipeline.processLine has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
ListRendererKt.ListItemRow (cognitive 17) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/block/ListRenderer.kt:168— ListRendererKt.ListItemRow has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (16 pts), match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SeamCarver.findLowestEnergyVerticalSeam (cognitive 17) libs/opencv-tools/src/main/java/com/t8rin/opencv_tools/seam_carving/SeamCarver.kt:868— SeamCarver.findLowestEnergyVerticalSeam has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 4 (5 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
push_images.image_size (cognitive 17) fastlane/push_images.py:68— push_images.image_size has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
push_listing.load_local (cognitive 17) fastlane/push_listing.py:50— push_listing.load_local has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
render.getFileIcon (cognitive 17) web/file_transfer/js/features/files/render.js:195— render.getFileIcon 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.
editor.src.insertList (cognitive 17) web/milkdown-editor/editor.src.js:1454— editor.src.insertList has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 2 (7 pts), if/else 5 (6 pts), error handling 1 (2 pts), match/switch 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MaterialComponentsKt.IconRenderer (cognitive 16) core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:677— MaterialComponentsKt.IconRenderer has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), match/switch 2 (6 pts) (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.
FavoritesContentKt.FavoritesContent (cognitive 16) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/FavoritesContent.kt:72— FavoritesContentKt.FavoritesContent has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (16 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.
AiRequestUrlResolver.resolveRequestUrl (cognitive 16) core/network/src/main/java/com/shifenmiao/network/AiRequestUrlResolver.kt:67— AiRequestUrlResolver.resolveRequestUrl has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (15 pts), match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FileAccessGuidanceKt.rememberFileAccessController (cognitive 16) core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/content/FileAccessGuidance.kt:222— FileAccessGuidanceKt.rememberFileAccessController has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 6 (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.
PaletteColorsCardKt.PaletteColorsCard (cognitive 16) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/color_picker/PaletteColorsCard.kt:76— PaletteColorsCardKt.PaletteColorsCard has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), match/switch 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OneTimeSaveLocationSelectionDialogKt.OneTimeSaveLocationSelectionDialog (cognitive 16) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/dialogs/OneTimeSaveLocationSelectionDialog.kt:99— OneTimeSaveLocationSelectionDialogKt.OneTimeSaveLocationSelectionDialog has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, boolean chains 3. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
EnhancedAlertDialogKt.BasicEnhancedAlertDialog (cognitive 16) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedAlertDialog.kt:226— EnhancedAlertDialogKt.BasicEnhancedAlertDialog has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 4 (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.
EnhancedModalBottomSheetKt.EnhancedModalSheetImpl (cognitive 16) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedModalBottomSheet.kt:341— EnhancedModalBottomSheetKt.EnhancedModalSheetImpl 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.
CustomRangeSliderKt.rangeSliderStartThumbSemantics (cognitive 16) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/sliders/custom_slider/CustomRangeSlider.kt:443— CustomRangeSliderKt.rangeSliderStartThumbSemantics has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 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. This shape REPEATS in the file: one other method here (CustomRangeSliderKt.rangeSliderEndThumbSemantics) 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.
CustomRangeSliderKt.rangeSliderEndThumbSemantics (cognitive 16) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/sliders/custom_slider/CustomRangeSlider.kt:505— CustomRangeSliderKt.rangeSliderEndThumbSemantics has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 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. This shape REPEATS in the file: one other method here (CustomRangeSliderKt.rangeSliderStartThumbSemantics) 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.
CustomSliderKt.sliderSemantics (cognitive 16) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/sliders/custom_slider/CustomSlider.kt:389— CustomSliderKt.sliderSemantics has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 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.
RoundedTextFieldKt.RoundedTextFieldColors (cognitive 16) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/text/RoundedTextField.kt:260— RoundedTextFieldKt.RoundedTextFieldColors 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.
LiteRtLmRuntime.generate (cognitive 16) feature/ai/src/litertlm/java/com/shifenmiao/ai/request/LiteRtLmRuntime.kt:124— LiteRtLmRuntime.generate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), error handling 2 (4 pts), boolean chains 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.
AppNavigationCatalogRepository.scoreSingle (cognitive 16) feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/AppNavigationCatalogRepository.kt:184— AppNavigationCatalogRepository.scoreSingle 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.
CreateNoteTool.saveNoteAndMaybeOpen (cognitive 16) feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/CreateNoteTool.kt:122— CreateNoteTool.saveNoteAndMaybeOpen has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), match/switch 2 (3 pts), error handling 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.
DiscoverToolsTool.scoreTool (cognitive 16) feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/DiscoverToolsTool.kt:164— DiscoverToolsTool.scoreTool has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 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.
EditFileTool.validate (cognitive 16) feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/EditFileTool.kt:236— EditFileTool.validate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (7 pts), match/switch 4 (7 pts), boolean chains 2 (nesting depth added 4). 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.
AiExecutionTimelineCardKt.ToolCallDetailPanel (cognitive 16) feature/ai/src/main/java/com/shifenmiao/ai/execution/component/AiExecutionTimelineCard.kt:474— AiExecutionTimelineCardKt.ToolCallDetailPanel has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (15 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.
AIChatScreenKt.AIChatScreen (cognitive 16) feature/ai/src/main/java/com/shifenmiao/ai/screen/AIChatScreen.kt:114— AIChatScreenKt.AIChatScreen has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 4, match/switch 2 (3 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CalendarShareCardRenderer.drawVectorPath (cognitive 16) feature/calendar/src/main/java/com/wanbaohe/calendar/share/CalendarShareCardRenderer.kt:1959— CalendarShareCardRenderer.drawVectorPath has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 6 (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.
CalendarShareWeather.summary (cognitive 16) feature/calendar/src/main/java/com/wanbaohe/calendar/share/CalendarShareModels.kt:265— CalendarShareWeather.summary has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 2, 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.
CalendarTabKt.CalendarDayCell (cognitive 16) feature/calendar/src/main/java/com/wanbaohe/calendar/ui/CalendarTab.kt:1499— CalendarTabKt.CalendarDayCell has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (13 pts), match/switch 2, 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.
ChessGameComponent.start (cognitive 16) feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:506— ChessGameComponent.start has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, 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.
ChessGameComponent.requestAiMove (cognitive 16) feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:916— ChessGameComponent.requestAiMove has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 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.
FeaturedComponentsKt.FeaturedCard (cognitive 16) feature/common/src/main/java/com/shifenmiao/common/components/FeaturedComponents.kt:96— FeaturedComponentsKt.FeaturedCard has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (14 pts), 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.
AIEngineManager.applyRemoteConfigDefaults (cognitive 16) feature/common/src/main/java/com/shifenmiao/common/manager/AIEngineManager.kt:187— AIEngineManager.applyRemoteConfigDefaults has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AiEngineTestDialogKt.AiEngineTestDialog (cognitive 16) feature/common/src/main/java/com/shifenmiao/common/ui/ai/AiEngineTestDialog.kt:64— AiEngineTestDialogKt.AiEngineTestDialog has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15 (16 pts) (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.
PathHelper.drawPolygon (cognitive 16) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/utils/PathHelper.kt:198— PathHelper.drawPolygon has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 2 (6 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.
PairingScreenKt.OfferCard (cognitive 16) feature/dsh-client/src/main/java/com/wanbaohe/dsh/screen/PairingScreen.kt:434— PairingScreenKt.OfferCard has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, 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.
SettingsSheetKt.ProviderEditor (cognitive 16) feature/dsh-client/src/main/java/com/wanbaohe/dsh/screen/SettingsSheet.kt:230— SettingsSheetKt.ProviderEditor has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 pts), error handling 2, loops 1 (2 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
InteractorStore.validateQuestionAnswers (cognitive 16) feature/dsh-client/src/main/java/com/wanbaohe/dsh/session/InteractorStore.kt:232— InteractorStore.validateQuestionAnswers has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 3, loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PathPaintPreviewKt.PathPaintPreview (cognitive 16) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/PathPaintPreview.kt:62— PathPaintPreviewKt.PathPaintPreview has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (16 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.
GameBoardKt.GameBoard (cognitive 16) feature/game2048/src/main/java/com/wanbaohe/game2048/ui/GameBoard.kt:60— GameBoardKt.GameBoard has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 2 (3 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.
GomokuAnalysisComponent.practiceFromHere (cognitive 16) feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuAnalysisComponent.kt:285— GomokuAnalysisComponent.practiceFromHere 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.
GomokuGameComponent.start (cognitive 16) feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuGameComponent.kt:597— GomokuGameComponent.start has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 6 (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.
AndroidImageCombiner.calculateCombinedImageDimensionsAndBitmaps (cognitive 16) feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/data/AndroidImageCombiner.kt:272— AndroidImageCombiner.calculateCombinedImageDimensionsAndBitmaps has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
LoginOtherKt.LoginOther (cognitive 16) feature/login/src/main/java/com/shifenmiao/login/ui/LoginOther.kt:76— LoginOtherKt.LoginOther has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 4 (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.
LoginComponent.detectBindPhone (cognitive 16) feature/login/src/main/java/com/shifenmiao/login/viewModel/LoginComponent.kt:1707— LoginComponent.detectBindPhone has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (16 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.
ShantenCalculator.standardShanten (cognitive 16) feature/mahjong/src/main/java/com/wanbaohe/mahjong/domain/rules/ShantenCalculator.kt:41— ShantenCalculator.standardShanten has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
QuickAddTodoSheetKt.QuickAddTodoSheet (cognitive 16) feature/marktodo/src/main/java/com/shifenmiao/marktodo/components/QuickAddTodoSheet.kt:78— QuickAddTodoSheetKt.QuickAddTodoSheet has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
AngleMeasureKt.AngleMeasureBackground (cognitive 16) feature/measurement/src/main/java/com/wanbaohe/measurement/screen/AngleMeasure.kt:103— AngleMeasureKt.AngleMeasureBackground has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (13 pts), match/switch 2, boolean chains 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
MediaQueryKt.getAlbums (cognitive 16) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/data/utils/MediaQuery.kt:211— MediaQueryKt.getAlbums has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), error handling 1 (2 pts), 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.
MediaPickerRootContentEmbeddableKt.MediaPickerRootContentEmbeddable (cognitive 16) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaPickerRootContentEmbeddable.kt:80— MediaPickerRootContentEmbeddableKt.MediaPickerRootContentEmbeddable has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (14 pts), match/switch 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.
RecognizedImageKt.SelectableRecognizedLine (cognitive 16) feature/on-device-ocr/src/main/java/com/wanbaohe/ocr/screen/RecognizedImage.kt:236— RecognizedImageKt.SelectableRecognizedLine has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 2 (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.
ResizeAndConvertContentKt.ResizeAndConvertContent (cognitive 16) feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt:99— ResizeAndConvertContentKt.ResizeAndConvertContent 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.
AIAddEngineScreenKt.CloudUrlPathFields (cognitive 16) feature/settings/src/main/java/com/wanbaohe/setting/ai/screen/AIAddEngineScreen.kt:507— AIAddEngineScreenKt.CloudUrlPathFields has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (15 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.
SystemPromptDetailScreenKt.SystemPromptDetailScreen (cognitive 16) feature/settings/src/main/java/com/wanbaohe/setting/prompt/screen/SystemPromptDetailScreen.kt:87— SystemPromptDetailScreenKt.SystemPromptDetailScreen 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.
Survive30sScreenKt.rememberPlayerPalette (cognitive 16) feature/survive30s/src/main/java/com/wanbaohe/survive30s/screen/Survive30sScreen.kt:579— Survive30sScreenKt.rememberPlayerPalette 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.
BitmapWatermarkRenderer.render (cognitive 16) feature/watermarking/src/main/java/com/shifenmiao/app/watermarking/data/render/BitmapWatermarkRenderer.kt:34— BitmapWatermarkRenderer.render has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9, error handling 4, boolean chains 2, 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.
ContentPanelKt.DynamicContentControls (cognitive 16) feature/watermarking/src/main/java/com/shifenmiao/app/watermarking/presentation/panels/ContentPanel.kt:169— ContentPanelKt.DynamicContentControls has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 5, match/switch 3 (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.
HtmlMarkdownConverter.convertHtmlBlocks (cognitive 16) feature/webview/src/main/java/com/shifenmiao/webview/HtmlMarkdownConverter.kt:87— HtmlMarkdownConverter.convertHtmlBlocks has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 4, loops 2 (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.
XiangqiAttacks.byKnight (cognitive 16) feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/search/XiangqiAttacks.kt:108— XiangqiAttacks.byKnight has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XiangqiSearch.negamax (cognitive 16) feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/search/XiangqiSearch.kt:149— XiangqiSearch.negamax has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 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.
XiangqiGameScreenKt.XiangqiGameContent (cognitive 16) feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiGameScreen.kt:350— XiangqiGameScreenKt.XiangqiGameContent has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 5 (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.
XiangqiBoardKt.PieceDisc (cognitive 16) feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/ui/board/XiangqiBoard.kt:412— XiangqiBoardKt.PieceDisc 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.
FamilyOneShotRenderersKt.buildGanttFrame (cognitive 16) libs/diagram/src/upstream/java/com/hrm/diagram/render/export/FamilyOneShotRenderers.kt:301— FamilyOneShotRenderersKt.buildGanttFrame has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 2 (3 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MermaidErSubPipeline.prepareErLayout (cognitive 16) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidErSubPipeline.kt:98— MermaidErSubPipeline.prepareErLayout has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 2, loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PlantUmlNetworkSubPipeline.layoutNetwork (cognitive 16) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlNetworkSubPipeline.kt:99— PlantUmlNetworkSubPipeline.layoutNetwork has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 5 (7 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.
PlantUmlStyleBlockRouter.route (cognitive 16) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlStyleBlockRouter.kt:10— PlantUmlStyleBlockRouter.route has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 2 (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.
PlantUmlTreeRenderSupport.appendBodyLine (cognitive 16) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlTreeRenderSupport.kt:272— PlantUmlTreeRenderSupport.appendBodyLine has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (15 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.
BlockRendererKt.BlockRenderer (cognitive 16) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/block/BlockRenderer.kt:32— BlockRendererKt.BlockRenderer has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 1 (3 pts), 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.
InlineModelAdapterKt.renderTextAtom (cognitive 16) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/inline/InlineModelAdapter.kt:183— InlineModelAdapterKt.renderTextAtom has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 1, match/switch 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
HtmlBlockModelCompiler.compileListElement (cognitive 16) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/internal/core/compile/HtmlBlockModelCompiler.kt:251— HtmlBlockModelCompiler.compileListElement has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 2 (3 pts), loops 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.
MarkdownSelectionController.selectionInfo (cognitive 16) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/internal/selection/MarkdownSelectionController.kt:538— MarkdownSelectionController.selectionInfo has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ModalSheetLayoutKt.ConsumeSwipeWithinBottomSheetBoundsNestedScrollConnection (cognitive 16) libs/modalsheet/src/main/java/com/t8rin/modalsheet/ModalSheetLayout.kt:492— ModalSheetLayoutKt.ConsumeSwipeWithinBottomSheetBoundsNestedScrollConnection has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, 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.
FreeCornersCropperKt.FreeCornersCropper (cognitive 16) libs/opencv-tools/src/main/java/com/t8rin/opencv_tools/free_corners_crop/compose/FreeCornersCropper.kt:140— FreeCornersCropperKt.FreeCornersCropper has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 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.
Moire.detectNoiseType (cognitive 16) libs/opencv-tools/src/main/java/com/t8rin/opencv_tools/moire/Moire.kt:99— Moire.detectNoiseType has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 3 (4 pts), boolean chains 2, 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.
editor.src.initEditor (cognitive 16) web/code-editor/editor.src.js:654— editor.src.initEditor has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 6, error handling 1, ternaries 1 (nesting depth added 3). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 709). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
token (cognitive 16) web/code-editor/editor.src.js:75— token has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15 (16 pts) (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.
startUpload (cognitive 16) web/file_transfer/js/features/upload/upload.js:205— startUpload has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 5, if/else 4 (5 pts), ternaries 3 (5 pts), error handling 1 (nesting depth added 3). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 4 function items inside it that branch (a function literal at line 230, onProgress, a function literal at line 252, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
FunctionTooLong: dom.getElements web/file_transfer/js/core/dom.js:10— FunctionTooLong — getElements runs 121 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 21 over it, 1.21× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
Change coupling: AIAddEngineScreen.kt ↔ AIEngineSettingsDetailScreen.kt feature/settings/src/main/java/com/wanbaohe/setting/ai/screen/AIAddEngineScreen.kt:1— `feature/settings/src/main/java/com/wanbaohe/setting/ai/screen/AIAddEngineScreen.kt` and `feature/settings/src/main/java/com/wanbaohe/setting/ai/screen/AIEngineSettingsDetailScreen.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). 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 7 shared commits counted here, the most recent 3 are `ef369bfa` feat(marktodo): use shared selector for task groups; `afb796d2` feat(settings): hide provider model fetch on proxy-routed engines; `10404038` feat(settings): simplify AI service editing and pick protocol from a … — run `git show` on any of them.
D4 · Code Duplication· Near-duplicate member family (34 members, 16 shared lines) · ×1
Near-duplicate member family (34 members, 16 shared lines) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:145— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:145-193 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:195-243 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:294-343 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:345-395 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:397-445 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:447-495 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:497-547 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:549-599 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:601-651 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:803-852 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:854-903 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:905-955 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1625-1658 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:495-553 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:555-613 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:670-726 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:728-785 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:846-901 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:903-956 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:958-1011 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:152-196 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:198-241 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:243-288 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:290-334 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:336-379 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:621-659 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:30-90 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:92-151 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:153-213 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:215-275 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:277-336 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:338-398 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:400-459 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:461-520 — These 34 members are variants of one another: a block of 16 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 34 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 34 times.
D4 · Code Duplication· Near-duplicate member family (33 members, 17 shared lines) · ×1
Near-duplicate member family (33 members, 17 shared lines) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:145— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:145-193 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:195-243 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:294-343 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:345-395 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:397-445 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:447-495 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:497-547 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:549-599 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:601-651 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:803-852 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:854-903 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:905-955 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1154-1187 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1625-1658 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:495-553 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:555-613 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:670-726 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:846-901 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:903-956 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:958-1011 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:152-196 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:198-241 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:243-288 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:290-334 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:336-379 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:356-394 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:30-90 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:92-151 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:153-213 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:215-275 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:338-398 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:400-459 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:461-520 — These 33 members are variants of one another: a block of 17 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 33 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 33 times.
D4 · Code Duplication· Near-duplicate member family (33 members, 15 shared lines) · ×1
Near-duplicate member family (33 members, 15 shared lines) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:145— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:145-193 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:195-243 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:294-343 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:345-395 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:397-445 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:447-495 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:497-547 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:549-599 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:601-651 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:754-801 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:803-852 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:854-903 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1154-1187 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1625-1658 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:495-553 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:555-613 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:670-726 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:846-901 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:903-956 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:958-1011 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:152-196 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:198-241 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:243-288 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:290-334 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:336-379 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:356-394 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:30-90 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:92-151 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:153-213 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:215-275 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:338-398 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:400-459 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:461-520 — These 33 members are variants of one another: a block of 15 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 33 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 33 times.
D4 · Code Duplication· Near-duplicate member family (29 members, 14 shared lines) · ×1
Near-duplicate member family (29 members, 14 shared lines) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:145— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:145-193 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:195-243 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:294-343 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:345-395 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:397-445 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:447-495 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:854-903 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:953-985 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:987-1018 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:495-553 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:555-613 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:670-726 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:728-785 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:846-901 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:903-956 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:958-1011 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:198-241 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:290-334 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:336-379 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:530-567 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:580-619 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:30-90 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:92-151 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:153-213 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:215-275 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:277-336 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:338-398 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:400-459 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:461-520 — These 29 members are variants of one another: a block of 14 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 29 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 29 times.
D4 · Code Duplication· Near-duplicate member family (26 members, 17 shared lines) · ×1
Near-duplicate member family (26 members, 17 shared lines) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:145— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:145-193 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:195-243 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:245-292 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:653-701 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:703-752 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:754-801 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:803-852 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:854-903 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:905-955 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:555-613 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:728-785 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:787-844 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:846-901 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:903-956 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:958-1011 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:152-196 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:381-423 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:513-557 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:396-433 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:476-515 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:621-659 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:277-336 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:338-398 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:400-459 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:461-520 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:522-581 — These 26 members are variants of one another: a block of 17 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 26 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 26 times.
D4 · Code Duplication· Near-duplicate member family (25 members, 18 shared lines) · ×1
Near-duplicate member family (25 members, 18 shared lines) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:145— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:145-193 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:195-243 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:245-292 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:294-343 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:345-395 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:397-445 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:447-495 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:754-801 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:854-903 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:495-553 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:555-613 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:670-726 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:846-901 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:903-956 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:958-1011 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:198-241 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:290-334 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:336-379 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:381-423 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:30-90 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:92-151 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:153-213 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:215-275 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:400-459 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:461-520 — These 25 members are variants of one another: a block of 18 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 25 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 25 times.
D4 · Code Duplication· Near-duplicate member family (22 members, 20 shared lines) · ×1
Near-duplicate member family (22 members, 20 shared lines) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:145— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:145-193 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:195-243 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:245-292 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:601-651 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:653-701 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:754-801 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:854-903 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:905-955 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:555-613 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:728-785 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:787-844 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:846-901 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:903-956 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:958-1011 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:152-196 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:381-423 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:396-433 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:476-515 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:338-398 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:400-459 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:461-520 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:522-581 — These 22 members are variants of one another: a block of 20 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 22 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 22 times.
D4 · Code Duplication· Near-duplicate member family (22 members, 18 shared lines) · ×1
Near-duplicate member family (22 members, 18 shared lines) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:145— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:145-193 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:195-243 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:245-292 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:653-701 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:754-801 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:854-903 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:905-955 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1121-1152 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:555-613 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:615-668 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:787-844 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:903-956 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:958-1011 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:152-196 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:381-423 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:469-511 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:513-557 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:396-433 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:476-515 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:277-336 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:461-520 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:522-581 — These 22 members are variants of one another: a block of 18 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 22 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 22 times.
D4 · Code Duplication· Near-duplicate member family (20 members, 13 shared lines) · ×1
Near-duplicate member family (20 members, 13 shared lines) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:145— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:145-193 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:195-243 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:601-651 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:653-701 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:854-903 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:905-955 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:555-613 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:615-668 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:728-785 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:787-844 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:846-901 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:903-956 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:958-1011 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:469-511 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:396-433 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:476-515 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:338-398 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:400-459 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:461-520 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:522-581 — These 20 members are variants of one another: a block of 13 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 20 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 20 times.
D4 · Code Duplication· Near-duplicate member family (19 members, 24 shared lines) · ×1
Near-duplicate member family (19 members, 24 shared lines) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:145— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:145-193 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:195-243 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:601-651 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:653-701 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:854-903 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:905-955 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:555-613 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:787-844 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:846-901 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:903-956 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:958-1011 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:513-557 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:396-433 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:476-515 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:277-336 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:338-398 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:400-459 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:461-520 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:522-581 — These 19 members are variants of one another: a block of 24 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 19 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 19 times.
D4 · Code Duplication· Near-duplicate member family (19 members, 18 shared lines) · ×1
Near-duplicate member family (19 members, 18 shared lines) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:447— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:447-495 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:549-599 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:601-651 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1752-1794 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:495-553 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:670-726 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:728-785 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:903-956 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:958-1011 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:198-241 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:30-90 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:92-151 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:153-213 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:215-275 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:277-336 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:338-398 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:400-459 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:461-520 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:522-581 — These 19 members are variants of one another: a block of 18 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 19 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 19 times.
D4 · Code Duplication· Near-duplicate member family (18 members, 15 shared lines) · ×1
Near-duplicate member family (18 members, 15 shared lines) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:294— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:294-343 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:345-395 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:397-445 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:601-651 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1625-1658 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:728-785 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:846-901 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:198-241 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:530-567 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:580-619 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:621-659 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:30-90 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:92-151 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:153-213 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:215-275 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:277-336 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:338-398 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:400-459 — These 18 members are variants of one another: a block of 15 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 18 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 18 times.
D4 · Code Duplication· Near-duplicate member family (16 members, 17 shared lines) · ×1
Near-duplicate member family (16 members, 17 shared lines) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:294— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:294-343 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:345-395 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:397-445 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:601-651 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1154-1187 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1625-1658 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:846-901 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:198-241 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:530-567 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:580-619 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:30-90 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:92-151 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:153-213 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:215-275 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:338-398 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:400-459 — These 16 members are variants of one another: a block of 17 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 16 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 16 times.
D4 · Code Duplication· Near-duplicate member family (15 members, 25 shared lines) · ×1
Near-duplicate member family (15 members, 25 shared lines) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:145— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:145-193 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:195-243 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:601-651 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:803-852 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:854-903 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:905-955 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:555-613 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:846-901 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:903-956 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:958-1011 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:152-196 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:338-398 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:400-459 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:461-520 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:522-581 — These 15 members are variants of one another: a block of 25 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 15 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 15 times.
D4 · Code Duplication· Near-duplicate member family (14 members, 18 shared lines) · ×1
Near-duplicate member family (14 members, 18 shared lines) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:294— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:294-343 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:345-395 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:397-445 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:919-951 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1244-1276 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:846-901 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:198-241 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:530-567 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:580-619 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:30-90 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:92-151 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:153-213 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:215-275 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:400-459 — These 14 members are variants of one another: a block of 18 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 14 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 14 times.
D4 · Code Duplication· Near-duplicate member family (11 members, 24 shared lines) · ×1
Near-duplicate member family (11 members, 24 shared lines) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:447— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:447-495 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:497-547 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:549-599 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1087-1119 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1495-1528 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:495-553 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:670-726 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:290-334 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:336-379 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:356-394 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:435-474 — These 11 members are variants of one another: a block of 24 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 11 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 11 times.
D4 · Code Duplication· Near-duplicate member family (10 members, 18 shared lines) · ×1
Near-duplicate member family (10 members, 18 shared lines) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:294— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:294-343 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:345-395 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:397-445 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1020-1051 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:290-334 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:336-379 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:316-354 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:530-567 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:580-619 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:30-90 — These 10 members are variants of one another: a block of 18 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 10 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 10 times.
D4 · Code Duplication· Near-duplicate member family (9 members, 20 shared lines) · ×1
Near-duplicate member family (9 members, 20 shared lines) libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:728— libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:728-785 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:903-956 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:958-1011 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:425-467 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:277-336 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:338-398 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:400-459 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:461-520 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:522-581 — These 9 members are variants of one another: a block of 20 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 9 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 9 times.
D4 · Code Duplication· Near-duplicate member family (8 members, 16 shared lines) · ×1
Near-duplicate member family (8 members, 16 shared lines) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:703— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:703-752 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1199-1232 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:728-785 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:846-901 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:621-659 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:277-336 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:338-398 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:400-459 — These 8 members are variants of one another: a block of 16 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
D4 · Code Duplication· Near-duplicate member family (7 members, 32 shared lines) · ×1
Near-duplicate member family (7 members, 32 shared lines) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/EnhancedZoomBlurParamsItem.kt:51— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/EnhancedZoomBlurParamsItem.kt:51-121 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/GlitchParamsItem.kt:51-121 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/KaleidoscopeParamsItem.kt:53-123 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/LinearTiltShiftParamsItem.kt:51-121 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/PinchParamsItem.kt:51-116 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RadialTiltShiftParamsItem.kt:51-116 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/WaterParamsItem.kt:51-116 — These 7 members are variants of one another: a block of 32 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 7 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 7 times.
D4 · Code Duplication· Near-duplicate member family (7 members, 20 shared lines) · ×1
Near-duplicate member family (7 members, 20 shared lines) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:497— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:497-547 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:549-599 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:601-651 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:905-955 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:787-844 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:243-288 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:338-398 — These 7 members are variants of one another: a block of 20 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 7 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 7 times.
D4 · Code Duplication· Near-duplicate member family (6 members, 29 shared lines) · ×1
Near-duplicate member family (6 members, 29 shared lines) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ChannelMixParamsItem.kt:52— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ChannelMixParamsItem.kt:52-122 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/EnhancedZoomBlurParamsItem.kt:51-121 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/GlitchParamsItem.kt:51-121 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/KaleidoscopeParamsItem.kt:53-123 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/LinearTiltShiftParamsItem.kt:51-121 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SparkleParamsItem.kt:57-145 — These 6 members are variants of one another: a block of 29 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication· Near-duplicate member family (6 members, 16 shared lines) · ×1
Near-duplicate member family (6 members, 16 shared lines) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:703— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:703-752 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:803-852 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1199-1232 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:513-557 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:621-659 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:277-336 — These 6 members are variants of one another: a block of 16 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication· Near-duplicate member family (5 members, 28 shared lines) · ×1
Near-duplicate member family (5 members, 28 shared lines) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:497— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:497-547 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:549-599 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:905-955 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:152-196 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:522-581 — These 5 members are variants of one another: a block of 28 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication· Near-duplicate member family (5 members, 19 shared lines) · ×1
Near-duplicate member family (5 members, 19 shared lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlActivitySubPipeline.kt:641— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlActivitySubPipeline.kt:641-665 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:940-964 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlDeploymentSubPipeline.kt:600-624 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlObjectSubPipeline.kt:324-348 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlUsecaseSubPipeline.kt:450-474 — These 5 members are variants of one another: a block of 19 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication· Near-duplicate member family (5 members, 15 shared lines) · ×1
Near-duplicate member family (5 members, 15 shared lines) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:245— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:245-292 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:754-801 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:919-951 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1244-1276 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:381-423 — These 5 members are variants of one another: a block of 15 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication· Near-duplicate member family (4 members, 36 shared lines) · ×1
Near-duplicate member family (4 members, 36 shared lines) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/BilaterialBlurParamsItem.kt:52— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/BilaterialBlurParamsItem.kt:52-119 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ClaheParamsItem.kt:51-111 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/LinearGaussianParamsItem.kt:53-127 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/quad_components/NumberQuadItem.kt:51-111 — These 4 members are variants of one another: a block of 36 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication· Near-duplicate member family (3 members, 62 shared lines) · ×1
Near-duplicate member family (3 members, 62 shared lines) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt:174— feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt:174-269 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuAnalysisScreen.kt:183-274 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiAnalysisScreen.kt:175-269 — These 3 members are variants of one another: a block of 62 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 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 3 times.
D4 · Code Duplication· Near-duplicate member family (3 members, 61 shared lines) · ×1
Near-duplicate member family (3 members, 61 shared lines) feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeAddCountdownScreen.kt:103— feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeAddCountdownScreen.kt:103-368 | feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeAddEventScreen.kt:109-336 | feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeAddMilestoneScreen.kt:100-306 — These 3 members are variants of one another: a block of 61 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 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 3 times.
D4 · Code Duplication· Near-duplicate member family (3 members, 57 shared lines) · ×1
Near-duplicate member family (3 members, 57 shared lines) feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt:532— feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt:532-617 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/OnlineMatchScreen.kt:532-617 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/OnlineMatchScreen.kt:532-617 — These 3 members are variants of one another: a block of 57 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 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 3 times.
D4 · Code Duplication· Near-duplicate member family (3 members, 49 shared lines) · ×1
Near-duplicate member family (3 members, 49 shared lines) feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/DeleteExifContent.kt:82— feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/DeleteExifContent.kt:82-304 | feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:86-332 | feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt:101-445 — These 3 members are variants of one another: a block of 49 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 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 3 times.
D4 · Code Duplication· Near-duplicate member family (3 members, 37 shared lines) · ×1
Near-duplicate member family (3 members, 37 shared lines) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt:287— feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt:287-344 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuAnalysisScreen.kt:294-354 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiAnalysisScreen.kt:287-344 — These 3 members are variants of one another: a block of 37 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 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 3 times.
D4 · Code Duplication· Near-duplicate member family (3 members, 25 shared lines) · ×1
Near-duplicate member family (3 members, 25 shared lines) feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:916— feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:916-969 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuGameComponent.kt:1043-1091 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiGameComponent.kt:843-898 — These 3 members are variants of one another: a block of 25 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 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 3 times.
D4 · Code Duplication· Near-duplicate member family (3 members, 21 shared lines) · ×1
Near-duplicate member family (3 members, 21 shared lines) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessPlayHomeScreen.kt:67— feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessPlayHomeScreen.kt:67-221 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuPlayHomeScreen.kt:67-211 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiPlayHomeScreen.kt:68-243 — These 3 members are variants of one another: a block of 21 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 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 3 times.
Near-duplicate member pair (208 shared lines) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/image/ImagePager.kt:133— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/image/ImagePager.kt:133-488 | feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaImagePager.kt:132-464 — These two members are variants of one another: 208 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 (197 shared lines) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:121— feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:121-418 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt:118-414 — These two members are variants of one another: 197 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 (174 shared lines) feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:146— feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:146-487 | feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt:137-475 — These two members are variants of one another: 174 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 (165 shared lines) feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:844— feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:844-1087 | feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt:803-1083 — These two members are variants of one another: 165 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 (136 shared lines) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedRangeSliderItem.kt:114— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedRangeSliderItem.kt:114-430 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedSliderItem.kt:114-369 — These two members are variants of one another: 136 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 (129 shared lines) feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt:79— feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt:79-304 | feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/WeightResizeContent.kt:127-402 — These two members are variants of one another: 129 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 (109 shared lines) feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:637— feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:637-824 | feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt:618-785 — These two members are variants of one another: 109 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 (77 shared lines) feature/code-editor/src/main/java/com/wanbaohe/code/editor/screen/CodeEditorScreen.kt:92— feature/code-editor/src/main/java/com/wanbaohe/code/editor/screen/CodeEditorScreen.kt:92-433 | feature/markdown-edit/src/main/java/com/wanbaohe/markdown/edit/screen/MarkdownEditorScreen.kt:93-497 — These two members are variants of one another: 77 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 (62 shared lines) feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:1098— feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:1098-1188 | feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt:1092-1185 — These two members are variants of one another: 62 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 (61 shared lines) feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:550— feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:550-628 | feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt:533-611 — These two members are variants of one another: 61 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 (57 shared lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlMindmapSubPipeline.kt:62— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlMindmapSubPipeline.kt:62-159 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlWbsSubPipeline.kt:64-153 — These two members are variants of one another: 57 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 (52 shared lines) feature/ocr-document/src/main/java/com/shifenmiao/feature/document/screen/DocConvertTaskListScreen.kt:122— feature/ocr-document/src/main/java/com/shifenmiao/feature/document/screen/DocConvertTaskListScreen.kt:122-356 | feature/ocr-document/src/main/java/com/shifenmiao/feature/document/screen/OcrTaskListScreen.kt:127-413 — These two members are variants of one another: 52 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 (49 shared lines) feature/ai/src/main/java/com/shifenmiao/ai/service/AgentCreationService.kt:206— feature/ai/src/main/java/com/shifenmiao/ai/service/AgentCreationService.kt:206-306 | feature/ai/src/main/java/com/shifenmiao/ai/service/PromptCreationService.kt:200-301 — These two members are variants of one another: 49 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 (46 shared lines) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/PolygonParamsSelector.kt:59— feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/PolygonParamsSelector.kt:59-125 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/StarParamsSelector.kt:61-146 — 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 (43 shared lines) feature/calendar/src/main/java/com/wanbaohe/calendar/ui/CalendarTab.kt:523— feature/calendar/src/main/java/com/wanbaohe/calendar/ui/CalendarTab.kt:523-693 | feature/calendar/src/main/java/com/wanbaohe/calendar/ui/CalendarTab.kt:697-826 — These two members are variants of one another: 43 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 (42 shared lines) feature/calendar/src/main/java/com/wanbaohe/calendar/ui/ConversionTab.kt:525— feature/calendar/src/main/java/com/wanbaohe/calendar/ui/ConversionTab.kt:525-671 | feature/calendar/src/main/java/com/wanbaohe/calendar/ui/ConversionTab.kt:679-798 — These two members are variants of one another: 42 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.
D4 · Code Duplication· Members sharing a duplicated core (73 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (73 members, 50+ identical tokens) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:29— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:29-143 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:33-110 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:152-228 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:230-313 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:315-398 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:400-482 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:484-566 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:568-650 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:652-729 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:731-823 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:825-901 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1278-1362 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1364-1430 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1432-1493 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1530-1623 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1660-1750 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:32-100 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:102-170 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:172-240 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:242-310 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:312-376 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:378-450 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:452-516 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:518-578 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:908-966 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:968-1026 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1028-1096 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1098-1166 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:33-182 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:184-349 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:351-493 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:32-146 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:32-139 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:141-236 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:34-88 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:90-143 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:145-197 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:199-251 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:253-305 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:307-361 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:363-415 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:417-469 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:471-517 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:519-565 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:567-615 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:617-665 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:667-715 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:717-765 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:767-812 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:814-859 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:861-906 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:908-953 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:955-1001 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1003-1049 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1051-1097 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1099-1145 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1147-1197 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1199-1249 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1251-1301 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1303-1353 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1462-1508 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1545-1606 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1612-1652 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1658-1703 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1736-1773 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1775-1814 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1816-1856 | libs/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:72-94 | libs/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:96-129 | libs/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:135-157 | libs/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:159-188 | libs/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:194-216 | libs/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:222-244 — These 73 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 73 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 73 times.
D4 · Code Duplication· Members sharing a duplicated core (11 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (11 members, 50+ identical tokens) libs/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:364— libs/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:364-374 | libs/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:536-547 | libs/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:585-598 | libs/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:618-631 | libs/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:665-676 | libs/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:696-709 | libs/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:771-784 | libs/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:848-861 | libs/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:923-934 | libs/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:1000-1013 | libs/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:1079-1092 — These 11 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 11 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 11 times.
D4 · Code Duplication· Edited copy of a member (171 corresponding lines) · ×1
Edited copy of a member (171 corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessSettingsScreen.kt:80— feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessSettingsScreen.kt:80-250 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuSettingsScreen.kt:79-249 — These two members are one piece of code written twice and then edited apart: 171 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (147 corresponding lines) · ×1
Edited copy of a member (147 corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessSetupScreen.kt:95— feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessSetupScreen.kt:95-241 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiSetupScreen.kt:95-253 — These two members are one piece of code written twice and then edited apart: 147 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 154+ corresponding lines) · ×1
Edited copies of one member (3 members, 154+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/router/ChessRouterScreen.kt:60— feature/chess/src/main/java/com/wanbaohe/chess/router/ChessRouterScreen.kt:60-215 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/router/GomokuRouterScreen.kt:60-213 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/router/XiangqiRouterScreen.kt:75-233 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 154 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (111 corresponding lines) · ×1
Edited copy of a member (111 corresponding lines) core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:1242— core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:1242-1356 | core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:1364-1474 — These two members are one piece of code written twice and then edited apart: 111 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (95 corresponding lines) · ×1
Edited copy of a member (95 corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessGameScreen.kt:99— feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessGameScreen.kt:99-229 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuGameScreen.kt:97-191 — These two members are one piece of code written twice and then edited apart: 95 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (125 corresponding lines) · ×1
Edited copy of a member (125 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:459— feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:459-585 | feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIPromptComponent.kt:496-620 — These two members are one piece of code written twice and then edited apart: 125 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 123+ corresponding lines) · ×1
Edited copies of one member (3 members, 123+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt:400— feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt:400-522 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/OnlineMatchScreen.kt:400-522 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/OnlineMatchScreen.kt:400-522 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 123 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (124 corresponding lines) · ×1
Edited copy of a member (124 corresponding lines) feature/common/src/main/java/com/shifenmiao/common/components/category/CategoryManagementDialog.kt:297— feature/common/src/main/java/com/shifenmiao/common/components/category/CategoryManagementDialog.kt:297-421 | feature/common/src/main/java/com/shifenmiao/common/components/category/CategoryManagementDialog.kt:440-563 — These two members are one piece of code written twice and then edited apart: 124 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (80 corresponding lines) · ×1
Edited copy of a member (80 corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:835— feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:835-914 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuGameComponent.kt:959-1041 — These two members are one piece of code written twice and then edited apart: 80 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (91 corresponding lines) · ×1
Edited copy of a member (91 corresponding lines) feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/presentation/components/StyleCustomizer.kt:437— feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/presentation/components/StyleCustomizer.kt:437-527 | feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/presentation/components/StyleSelector.kt:249-360 — These two members are one piece of code written twice and then edited apart: 91 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (88 corresponding lines) · ×1
Edited copy of a member (88 corresponding lines) libs/collages/src/main/java/com/t8rin/collages/view/FrameImageView.kt:656— libs/collages/src/main/java/com/t8rin/collages/view/FrameImageView.kt:656-743 | libs/collages/src/main/java/com/t8rin/collages/view/FrameImageView.kt:751-840 — These two members are one piece of code written twice and then edited apart: 88 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 83+ corresponding lines) · ×1
Edited copies of one member (3 members, 83+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/screen/ExportDialog.kt:62— feature/chess/src/main/java/com/wanbaohe/chess/screen/ExportDialog.kt:62-144 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/ExportDialog.kt:62-144 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/ExportDialog.kt:62-144 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 83 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (79 corresponding lines) · ×1
Edited copy of a member (79 corresponding lines) core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/DateInputRenderer.kt:59— core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/DateInputRenderer.kt:59-168 | core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/TimeInputRenderer.kt:56-134 — These two members are one piece of code written twice and then edited apart: 79 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (96 corresponding lines) · ×1
Edited copy of a member (96 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/CompressImageTool.kt:89— feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/CompressImageTool.kt:89-184 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/LimitResizeTool.kt:107-220 — These two members are one piece of code written twice and then edited apart: 96 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (92 corresponding lines) · ×1
Edited copy of a member (92 corresponding lines) feature/marktodo/src/main/java/com/shifenmiao/marktodo/components/ThemeGroupCard.kt:98— feature/marktodo/src/main/java/com/shifenmiao/marktodo/components/ThemeGroupCard.kt:98-189 | feature/marktodo/src/main/java/com/shifenmiao/marktodo/components/ThemeGroupCard.kt:214-322 — These two members are one piece of code written twice and then edited apart: 92 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (59 corresponding lines) · ×1
Edited copy of a member (59 corresponding lines) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/Pixelate.kt:116— feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/Pixelate.kt:116-174 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/PixelationTool.kt:76-134 — These two members are one piece of code written twice and then edited apart: 59 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (82 corresponding lines) · ×1
Edited copy of a member (82 corresponding lines) feature/ocr-document/src/main/java/com/shifenmiao/feature/document/component/DocConvertTaskListComponent.kt:185— feature/ocr-document/src/main/java/com/shifenmiao/feature/document/component/DocConvertTaskListComponent.kt:185-275 | feature/ocr-document/src/main/java/com/shifenmiao/feature/document/component/OcrTaskListComponent.kt:174-255 — These two members are one piece of code written twice and then edited apart: 82 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (85 corresponding lines) · ×1
Edited copy of a member (85 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/AddLocalAiEngineTool.kt:111— feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/AddLocalAiEngineTool.kt:111-211 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/AddLocalAiModelTool.kt:101-185 — These two members are one piece of code written twice and then edited apart: 85 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (73 corresponding lines) · ×1
Edited copy of a member (73 corresponding lines) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:208— feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:208-290 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/screenLogic/WebpToolsComponent.kt:210-282 — These two members are one piece of code written twice and then edited apart: 73 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (78 corresponding lines) · ×1
Edited copy of a member (78 corresponding lines) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterReorderSheet.kt:64— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterReorderSheet.kt:64-141 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/MaskReorderSheet.kt:64-144 — These two members are one piece of code written twice and then edited apart: 78 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (76 corresponding lines) · ×1
Edited copy of a member (76 corresponding lines) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/switches/CupertinoSwitch.kt:101— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/switches/CupertinoSwitch.kt:101-176 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/switches/CupertinoSwitch.kt:234-310 — These two members are one piece of code written twice and then edited apart: 76 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (84 corresponding lines) · ×1
Edited copy of a member (84 corresponding lines) feature/common/src/main/java/com/shifenmiao/common/ui/ai/AIModelPickerSheet.kt:415— feature/common/src/main/java/com/shifenmiao/common/ui/ai/AIModelPickerSheet.kt:415-498 | feature/common/src/main/java/com/shifenmiao/common/ui/ai/AIModelPickerSheet.kt:658-743 — These two members are one piece of code written twice and then edited apart: 84 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 56+ corresponding lines) · ×1
Edited copies of one member (3 members, 56+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt:427— feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt:427-482 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuAnalysisScreen.kt:437-492 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiAnalysisScreen.kt:429-484 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 56 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (75 corresponding lines) · ×1
Edited copy of a member (75 corresponding lines) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/PairItem.kt:45— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/PairItem.kt:45-128 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/TripleItem.kt:44-118 — These two members are one piece of code written twice and then edited apart: 75 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (50 corresponding lines) · ×1
Edited copy of a member (50 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:702— feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:702-751 | feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIPromptComponent.kt:730-780 — These two members are one piece of code written twice and then edited apart: 50 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (70 corresponding lines) · ×1
Edited copy of a member (70 corresponding lines) feature/compare/src/main/java/com/t8rin/imagetoolbox/feature/compare/presentation/components/CompareSheet.kt:76— feature/compare/src/main/java/com/t8rin/imagetoolbox/feature/compare/presentation/components/CompareSheet.kt:76-153 | feature/compare/src/main/java/com/t8rin/imagetoolbox/feature/compare/presentation/components/CompareSheet.kt:162-231 — These two members are one piece of code written twice and then edited apart: 70 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (63 corresponding lines) · ×1
Edited copy of a member (63 corresponding lines) core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDatePickerDialog.kt:426— core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDatePickerDialog.kt:426-494 | core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDateRangePickerDialog.kt:337-399 — These two members are one piece of code written twice and then edited apart: 63 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (77 corresponding lines) · ×1
Edited copy of a member (77 corresponding lines) feature/login/src/main/java/com/shifenmiao/login/ForgotPasswordBottomSheet.kt:53— feature/login/src/main/java/com/shifenmiao/login/ForgotPasswordBottomSheet.kt:53-129 | feature/login/src/main/java/com/shifenmiao/login/RegistrationBottomSheet.kt:53-139 — These two members are one piece of code written twice and then edited apart: 77 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (72 corresponding lines) · ×1
Edited copy of a member (72 corresponding lines) feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/data/AndroidImageCutter.kt:129— feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/data/AndroidImageCutter.kt:129-201 | feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/data/AndroidImageCutter.kt:207-278 — These two members are one piece of code written twice and then edited apart: 72 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 62+ corresponding lines) · ×1
Edited copies of one member (3 members, 62+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessSettingsScreen.kt:384— feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessSettingsScreen.kt:384-445 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuSettingsScreen.kt:388-449 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiSettingsScreen.kt:519-581 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 62 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (74 corresponding lines) · ×1
Edited copy of a member (74 corresponding lines) feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/presentation/components/StyleSelector.kt:154— feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/presentation/components/StyleSelector.kt:154-237 | feature/id-photo/src/main/java/com/wanbaohe/idphoto/presentation/components/SizeSelector.kt:148-221 — These two members are one piece of code written twice and then edited apart: 74 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 57+ corresponding lines) · ×1
Edited copies of one member (3 members, 57+ corresponding lines) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/quad_components/NumberColorModelQuadItem.kt:59— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/quad_components/NumberColorModelQuadItem.kt:59-133 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberNumberBlurEdgeModeTripleItem.kt:54-110 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberNumberColorModelTripleItem.kt:57-122 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 57 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 42+ corresponding lines) · ×1
Edited copies of one member (3 members, 42+ corresponding lines) feature/webview/src/main/java/com/shifenmiao/webview/browser/BrowserBookmarksPage.kt:258— feature/webview/src/main/java/com/shifenmiao/webview/browser/BrowserBookmarksPage.kt:258-313 | feature/webview/src/main/java/com/shifenmiao/webview/browser/BrowserBookmarksPage.kt:320-361 | feature/webview/src/main/java/com/shifenmiao/webview/browser/BrowserTabsPage.kt:133-184 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 42 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (58 corresponding lines) · ×1
Edited copy of a member (58 corresponding lines) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassButton.kt:81— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassButton.kt:81-138 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassTonalButton.kt:62-124 — These two members are one piece of code written twice and then edited apart: 58 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 41+ corresponding lines) · ×1
Edited copies of one member (3 members, 41+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt:354— feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt:354-394 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuAnalysisScreen.kt:364-404 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiAnalysisScreen.kt:356-396 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 41 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (248 corresponding lines) · ×1
Edited copy of a member (248 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/export/DuelHtmlExporter.kt:309— feature/ai/src/main/java/com/shifenmiao/ai/export/DuelHtmlExporter.kt:309-666 | feature/ai/src/main/java/com/shifenmiao/ai/export/HtmlExporter.kt:417-664 — These two members are one piece of code written twice and then edited apart: 248 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 35+ corresponding lines) · ×1
Edited copies of one member (3 members, 35+ corresponding lines) libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1752— libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1752-1794 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:836-870 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:872-906 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 35 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 38+ corresponding lines) · ×1
Edited copies of one member (3 members, 38+ corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageChessTool.kt:189— feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageChessTool.kt:189-226 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageGomokuTool.kt:189-226 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageXiangqiTool.kt:189-226 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 38 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 49+ corresponding lines) · ×1
Edited copies of one member (5 members, 49+ corresponding lines) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassIconButton.kt:55— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassIconButton.kt:55-103 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassIconButton.kt:122-172 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassIconButton.kt:190-242 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassOutlinedButton.kt:74-130 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassTextButton.kt:72-124 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 49 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 34+ corresponding lines) · ×1
Edited copies of one member (3 members, 34+ corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageChessTool.kt:119— feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageChessTool.kt:119-152 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageGomokuTool.kt:119-152 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageXiangqiTool.kt:119-152 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 34 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (7 members, 37+ corresponding lines) · ×1
Edited copies of one member (7 members, 37+ corresponding lines) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/setting/GlassmorphismSettingItem.kt:88— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/setting/GlassmorphismSettingItem.kt:88-133 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/setting/GlassmorphismSettingItem.kt:142-187 | feature/settings/src/main/java/com/wanbaohe/setting/display/screen/DisplaySettingsScreen.kt:407-443 | feature/settings/src/main/java/com/wanbaohe/setting/display/screen/DisplaySettingsScreen.kt:446-488 | feature/settings/src/main/java/com/wanbaohe/setting/display/screen/DisplaySettingsScreen.kt:491-534 | feature/settings/src/main/java/com/wanbaohe/setting/display/screen/DisplaySettingsScreen.kt:537-578 | feature/settings/src/main/java/com/wanbaohe/setting/display/screen/DisplaySettingsScreen.kt:641-677 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 37 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 32+ corresponding lines) · ×1
Edited copies of one member (4 members, 32+ corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageBookmarkTool.kt:232— feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageBookmarkTool.kt:232-264 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageChessTool.kt:156-187 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageGomokuTool.kt:156-187 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageXiangqiTool.kt:156-187 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 32 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 42+ corresponding lines) · ×1
Edited copies of one member (4 members, 42+ corresponding lines) feature/document-scanner/src/main/java/com/t8rin/imagetoolbox/feature/document_scanner/presentation/screenLogic/DocumentScannerComponent.kt:117— feature/document-scanner/src/main/java/com/t8rin/imagetoolbox/feature/document_scanner/presentation/screenLogic/DocumentScannerComponent.kt:117-158 | feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/screenLogic/FormatConversionComponent.kt:259-304 | feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/screenLogic/ImageCutterComponent.kt:162-208 | feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/screenLogic/LimitsResizeComponent.kt:203-250 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 42 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 33+ corresponding lines) · ×1
Edited copies of one member (4 members, 33+ corresponding lines) feature/scan-qr-code/src/main/java/com/t8rin/imagetoolbox/feature/scan_qr_code/presentation/components/editor/QrContactEditField.kt:203— feature/scan-qr-code/src/main/java/com/t8rin/imagetoolbox/feature/scan_qr_code/presentation/components/editor/QrContactEditField.kt:203-235 | feature/scan-qr-code/src/main/java/com/t8rin/imagetoolbox/feature/scan_qr_code/presentation/components/editor/QrContactEditField.kt:241-278 | feature/scan-qr-code/src/main/java/com/t8rin/imagetoolbox/feature/scan_qr_code/presentation/components/editor/QrContactEditField.kt:284-316 | feature/scan-qr-code/src/main/java/com/t8rin/imagetoolbox/feature/scan_qr_code/presentation/components/editor/QrContactEditField.kt:322-354 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 33 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 33+ corresponding lines) · ×1
Edited copies of one member (3 members, 33+ corresponding lines) feature/online/src/main/java/com/shifenmiao/online/screen/NoteItemScreen.kt:175— feature/online/src/main/java/com/shifenmiao/online/screen/NoteItemScreen.kt:175-210 | feature/password-vault/src/main/java/com/wanbaohe/passwordvault/detail/PasswordVaultDetailScreen.kt:227-262 | feature/password-vault/src/main/java/com/wanbaohe/passwordvault/edit/PasswordVaultEditScreen.kt:127-159 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 33 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (6 members, 14+ corresponding lines) · ×1
Edited copies of one member (6 members, 14+ corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidBlockSubPipeline.kt:253— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidBlockSubPipeline.kt:253-266 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidC4SubPipeline.kt:362-377 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidC4SubPipeline.kt:379-397 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlC4SubPipeline.kt:359-374 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlC4SubPipeline.kt:376-393 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlNetworkSubPipeline.kt:335-350 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 11+ corresponding lines) · ×1
Edited copies of one member (4 members, 11+ corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/export/FamilyOneShotRenderers.kt:506— libs/diagram/src/upstream/java/com/hrm/diagram/render/export/FamilyOneShotRenderers.kt:506-516 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidGaugeSubPipeline.kt:177-189 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidPieSubPipeline.kt:163-175 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlPieSubPipeline.kt:168-178 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 31+ corresponding lines) · ×1
Edited copies of one member (5 members, 31+ corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/FontScaleSettingTool.kt:102— feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/FontScaleSettingTool.kt:102-132 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ImportFontTool.kt:112-143 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/NightModeSettingTool.kt:103-133 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/StartEntrySettingTool.kt:106-137 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ThemeSettingTool.kt:192-223 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 31 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 31+ corresponding lines) · ×1
Edited copies of one member (3 members, 31+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/data/LlmMoveChooser.kt:60— feature/chess/src/main/java/com/wanbaohe/chess/data/LlmMoveChooser.kt:60-90 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/LlmMoveChooser.kt:60-90 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/LlmMoveChooser.kt:60-90 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 31 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 30+ corresponding lines) · ×1
Edited copies of one member (4 members, 30+ corresponding lines) feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/screenLogic/FormatConversionComponent.kt:404— feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/screenLogic/FormatConversionComponent.kt:404-433 | feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/screenLogic/ImageCutterComponent.kt:277-307 | feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/screenLogic/LimitsResizeComponent.kt:382-416 | feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:598-627 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 30 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 14+ corresponding lines) · ×1
Edited copies of one member (5 members, 14+ corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlActivitySubPipeline.kt:601— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlActivitySubPipeline.kt:601-615 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlArchimateSubPipeline.kt:134-147 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlC4SubPipeline.kt:130-144 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlObjectSubPipeline.kt:142-156 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlUsecaseSubPipeline.kt:150-168 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (52 corresponding lines) · ×1
Edited copy of a member (52 corresponding lines) libs/gesture/src/main/java/com/t8rin/gesture/AwaitPointerMotionEvent.kt:83— libs/gesture/src/main/java/com/t8rin/gesture/AwaitPointerMotionEvent.kt:83-134 | libs/gesture/src/main/java/com/t8rin/gesture/AwaitPointerMotionEvent.kt:187-239 — These two members are one piece of code written twice and then edited apart: 52 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 26+ corresponding lines) · ×1
Edited copies of one member (4 members, 26+ corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/Base64Tool.kt:87— feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/Base64Tool.kt:87-112 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/BrowseFilesTool.kt:94-119 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageFilesTool.kt:108-139 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/WebpTool.kt:109-134 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 26 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 29+ corresponding lines) · ×1
Edited copies of one member (4 members, 29+ corresponding lines) feature/dsh-client/src/main/java/com/wanbaohe/dsh/screen/ChatScreen.kt:846— feature/dsh-client/src/main/java/com/wanbaohe/dsh/screen/ChatScreen.kt:846-877 | feature/dsh-client/src/main/java/com/wanbaohe/dsh/screen/ChatScreen.kt:1458-1487 | feature/dsh-client/src/main/java/com/wanbaohe/dsh/screen/ChatScreen.kt:1495-1524 | feature/dsh-client/src/main/java/com/wanbaohe/dsh/screen/PairingScreen.kt:604-632 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 29 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 7+ corresponding lines) · ×1
Edited copies of one member (4 members, 7+ corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidBlockSubPipeline.kt:245— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidBlockSubPipeline.kt:245-251 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidBlockSubPipeline.kt:268-279 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidBlockSubPipeline.kt:349-360 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidBlockSubPipeline.kt:362-373 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 27+ corresponding lines) · ×1
Edited copies of one member (4 members, 27+ corresponding lines) feature/boardgame/src/main/java/com/wanbaohe/boardgame/ui/GameCard.kt:315— feature/boardgame/src/main/java/com/wanbaohe/boardgame/ui/GameCard.kt:315-345 | feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessImportDialog.kt:42-68 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuImportDialog.kt:42-68 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiImportDialog.kt:42-68 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 27 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 24+ corresponding lines) · ×1
Edited copies of one member (3 members, 24+ corresponding lines) feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/screenLogic/FormatConversionComponent.kt:377— feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/screenLogic/FormatConversionComponent.kt:377-400 | feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/screenLogic/LimitsResizeComponent.kt:350-378 | feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:571-594 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 24 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 16+ corresponding lines) · ×1
Edited copies of one member (4 members, 16+ corresponding lines) feature/marktodo/src/main/java/com/shifenmiao/marktodo/screenLogic/AddTodoComponent.kt:272— feature/marktodo/src/main/java/com/shifenmiao/marktodo/screenLogic/AddTodoComponent.kt:272-287 | feature/marktodo/src/main/java/com/shifenmiao/marktodo/screenLogic/AddTodoComponent.kt:289-304 | feature/marktodo/src/main/java/com/shifenmiao/marktodo/screenLogic/TodoDetailComponent.kt:185-200 | feature/marktodo/src/main/java/com/shifenmiao/marktodo/screenLogic/TodoDetailComponent.kt:202-217 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 25+ corresponding lines) · ×1
Edited copies of one member (3 members, 25+ corresponding lines) core/database/src/main/java/com/shifenmiao/database/activity/ActivityLogRecorder.kt:248— core/database/src/main/java/com/shifenmiao/database/activity/ActivityLogRecorder.kt:248-275 | core/database/src/main/java/com/shifenmiao/database/activity/ActivityLogRecorder.kt:287-311 | core/database/src/main/java/com/shifenmiao/database/activity/ActivityLogRecorder.kt:322-348 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 25 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 5+ corresponding lines) · ×1
Edited copies of one member (3 members, 5+ corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlC4SubPipeline.kt:395— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlC4SubPipeline.kt:395-399 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlDitaaSubPipeline.kt:177-181 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlNetworkSubPipeline.kt:329-333 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 16+ corresponding lines) · ×1
Edited copies of one member (5 members, 16+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/component/ChessLibraryComponent.kt:122— feature/chess/src/main/java/com/wanbaohe/chess/component/ChessLibraryComponent.kt:122-137 | feature/chess/src/main/java/com/wanbaohe/chess/component/ChessLibraryComponent.kt:140-155 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuLibraryComponent.kt:137-152 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiLibraryComponent.kt:123-138 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiLibraryComponent.kt:141-156 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (8 members, 14+ corresponding lines) · ×1
Edited copies of one member (8 members, 14+ corresponding lines) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/model/BlackHatFilter.kt:44— feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/model/BlackHatFilter.kt:44-58 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/model/BokehFilter.kt:44-57 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/model/ClosingFilter.kt:44-58 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/model/DilationFilter.kt:44-58 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/model/ErodeFilter.kt:44-58 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/model/MorphologicalGradientFilter.kt:44-58 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/model/OpeningFilter.kt:44-58 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/model/TopHatFilter.kt:44-58 — These 8 members are one piece of code written 8 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 8 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 6+ corresponding lines) · ×1
Edited copies of one member (4 members, 6+ corresponding lines) core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/UriUtils.kt:100— core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/UriUtils.kt:100-105 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/UriUtils.kt:108-113 | core/utils/src/main/java/com/t8rin/imagetoolbox/core/utils/UriUtils.kt:386-391 | core/utils/src/main/java/com/t8rin/imagetoolbox/core/utils/UriUtils.kt:394-399 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 14+ corresponding lines) · ×1
Edited copies of one member (4 members, 14+ corresponding lines) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/tool/PixelationCommands.kt:54— feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/tool/PixelationCommands.kt:54-67 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/tool/PixelationCommands.kt:94-107 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/tool/PixelationCommands.kt:139-155 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/tool/PixelationCommands.kt:172-185 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 14+ corresponding lines) · ×1
Edited copies of one member (3 members, 14+ corresponding lines) feature/household-items/src/main/java/com/wanbaohe/householditems/service/HouseholdService.kt:162— feature/household-items/src/main/java/com/wanbaohe/householditems/service/HouseholdService.kt:162-181 | feature/household-items/src/main/java/com/wanbaohe/householditems/service/HouseholdService.kt:282-298 | feature/period/src/main/java/com/wanbaohe/period/service/PeriodService.kt:173-186 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 5+ corresponding lines) · ×1
Edited copies of one member (5 members, 5+ corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidRequirementSubPipeline.kt:221— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidRequirementSubPipeline.kt:221-225 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:993-997 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlDeploymentSubPipeline.kt:627-631 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlErdSubPipeline.kt:647-653 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlUsecaseSubPipeline.kt:477-481 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 24+ corresponding lines) · ×1
Edited copies of one member (4 members, 24+ corresponding lines) feature/login/src/main/java/com/shifenmiao/login/viewModel/LoginComponent.kt:1527— feature/login/src/main/java/com/shifenmiao/login/viewModel/LoginComponent.kt:1527-1550 | feature/login/src/main/java/com/shifenmiao/login/viewModel/LoginComponent.kt:1589-1612 | feature/login/src/main/java/com/shifenmiao/login/viewModel/LoginComponent.kt:1622-1649 | feature/login/src/main/java/com/shifenmiao/login/viewModel/LoginComponent.kt:1657-1680 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 24 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 5+ corresponding lines) · ×1
Edited copies of one member (4 members, 5+ corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:999— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:999-1003 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlDeploymentSubPipeline.kt:633-637 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlObjectSubPipeline.kt:364-368 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlUsecaseSubPipeline.kt:483-487 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (7 members, 6+ corresponding lines) · ×1
Edited copies of one member (7 members, 6+ corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlActivitySubPipeline.kt:708— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlActivitySubPipeline.kt:708-713 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlActivitySubPipeline.kt:715-723 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlActivitySubPipeline.kt:725-730 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlActivitySubPipeline.kt:732-737 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlActivitySubPipeline.kt:739-744 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlActivitySubPipeline.kt:746-751 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlActivitySubPipeline.kt:753-758 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 11+ corresponding lines) · ×1
Edited copies of one member (5 members, 11+ corresponding lines) feature/dsh-client/src/main/java/com/wanbaohe/dsh/component/DshRootComponent.kt:742— feature/dsh-client/src/main/java/com/wanbaohe/dsh/component/DshRootComponent.kt:742-752 | feature/dsh-client/src/main/java/com/wanbaohe/dsh/component/DshRootComponent.kt:761-771 | feature/dsh-client/src/main/java/com/wanbaohe/dsh/component/DshRootComponent.kt:894-904 | feature/dsh-client/src/main/java/com/wanbaohe/dsh/component/DshRootComponent.kt:947-957 | feature/dsh-client/src/main/java/com/wanbaohe/dsh/component/DshRootComponent.kt:960-970 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (3 corresponding lines) · ×1
Edited copy of a member (3 corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageTodoTool.kt:807— feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageTodoTool.kt:807-809 | feature/marktodo/src/main/java/com/shifenmiao/marktodo/domain/TodoTaskQuery.kt:97-102 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 10+ corresponding lines) · ×1
Edited copies of one member (4 members, 10+ corresponding lines) feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageChessTool.kt:400— feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageChessTool.kt:400-409 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageGomokuTool.kt:400-409 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageXiangqiTool.kt:397-406 | feature/teleprompter/src/main/java/com/wanbaohe/teleprompter/ai/tool/ManageTeleprompterTool.kt:291-300 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 2+ corresponding lines) · ×1
Edited copies of one member (3 members, 2+ corresponding lines) feature/chess/src/main/java/com/wanbaohe/chess/domain/model/OnlineMessage.kt:81— feature/chess/src/main/java/com/wanbaohe/chess/domain/model/OnlineMessage.kt:81-82 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/domain/model/OnlineMessage.kt:81-82 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/domain/model/OnlineMessage.kt:80-81 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 2 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 1+ corresponding lines) · ×1
Edited copies of one member (4 members, 1+ corresponding lines) libs/diagram/src/upstream/java/com/hrm/diagram/render/export/FamilyOneShotRenderers.kt:491— libs/diagram/src/upstream/java/com/hrm/diagram/render/export/FamilyOneShotRenderers.kt:491-491 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidGaugeSubPipeline.kt:159-162 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidPieSubPipeline.kt:145-148 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlPieSubPipeline.kt:150-153 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 1 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Duplicated block (159 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt:172— feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt:172-330 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/OnlineMatchScreen.kt:172-330 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/OnlineMatchScreen.kt:172-330 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/OnlineMatchScreen.kt` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 428 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 `feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt:172` 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: `ConnectionState` names `com.wanbaohe.chess.domain.model.ConnectionState` in one and `com.wanbaohe.gomoku.domain.model.ConnectionState` 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 (83–85 lines × 2) feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/pdf_to_images/PdfToImagesScreen.kt:112— feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/pdf_to_images/PdfToImagesScreen.kt:112-196 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/split/SplitPdfToolContent.kt:94-176 — before extracting anything, compare `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/pdf_to_images/PdfToImagesScreen.kt` and `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/split/SplitPdfToolContent.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 117 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `component` to `ExtractPagesPdfToolComponent` in one and `SplitPdfToolComponent` 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 (73 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/image/ImagePager.kt:239— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/image/ImagePager.kt:239-311 | feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaImagePager.kt:238-310 — before extracting anything, compare `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/image/ImagePager.kt` and `feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaImagePager.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 208 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/image/ImagePager.kt:239` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/image/ImagePager.kt:312` calls `rememberFilename`, `rememberFileSize` and `feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaImagePager.kt:311` 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 (70–71 lines × 2) feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:509— feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:509-579 | feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIPromptComponent.kt:545-614 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIPromptComponent.kt` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 360 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 `feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:509` 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 (59 lines × 2) libs/gesture/src/main/java/com/t8rin/gesture/TransformGesture.kt:112— libs/gesture/src/main/java/com/t8rin/gesture/TransformGesture.kt:112-170 | libs/gesture/src/main/java/com/t8rin/gesture/TransformGesture.kt:277-335 — 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 `libs/gesture/src/main/java/com/t8rin/gesture/TransformGesture.kt:112` 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 (56–57 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/image/ImagesPreviewWithSelection.kt:199— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/image/ImagesPreviewWithSelection.kt:199-254 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/image/ImagesPreviewWithSelection.kt:278-334 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/image/ImagesPreviewWithSelection.kt:199` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (55–56 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/switches/CupertinoSwitch.kt:104— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/switches/CupertinoSwitch.kt:104-158 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/switches/CupertinoSwitch.kt:235-290 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/switches/CupertinoSwitch.kt:104` 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 (56 lines × 2) libs/cropper/src/main/java/com/t8rin/cropper/image/ImageWithConstraints.kt:100— libs/cropper/src/main/java/com/t8rin/cropper/image/ImageWithConstraints.kt:100-155 | libs/image/src/main/java/com/t8rin/image/ImageWithConstraints.kt:100-155 — before extracting anything, compare `libs/cropper/src/main/java/com/t8rin/cropper/image/ImageWithConstraints.kt` and `libs/image/src/main/java/com/t8rin/image/ImageWithConstraints.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 124 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 (52 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedRangeSliderItem.kt:237— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedRangeSliderItem.kt:237-288 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedSliderItem.kt:234-285 — before extracting anything, compare `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedRangeSliderItem.kt` and `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedSliderItem.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 136 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/enhanced/EnhancedRangeSliderItem.kt:237` 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 (48–51 lines × 2) feature/code-editor/src/main/java/com/wanbaohe/code/editor/webview/WebViewCodeEditor.kt:101— feature/code-editor/src/main/java/com/wanbaohe/code/editor/webview/WebViewCodeEditor.kt:101-148 | feature/markdown-edit/src/main/java/com/wanbaohe/markdown/edit/webview/WebViewMarkdownEditor.kt:139-189 — before extracting anything, compare `feature/code-editor/src/main/java/com/wanbaohe/code/editor/webview/WebViewCodeEditor.kt` and `feature/markdown-edit/src/main/java/com/wanbaohe/markdown/edit/webview/WebViewMarkdownEditor.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 150 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, `feature/markdown-edit/src/main/java/com/wanbaohe/markdown/edit/webview/WebViewMarkdownEditor.kt:134` calls `LaunchedEffect` and `feature/code-editor/src/main/java/com/wanbaohe/code/editor/webview/WebViewCodeEditor.kt:99` 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 (50 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/editor/EditorLayerBox.kt:458— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/editor/EditorLayerBox.kt:458-507 | feature/text-card/src/main/java/com/wanbaohe/textcard/presentation/editor/TextBlockTransformHandles.kt:229-278 — before extracting anything, compare `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/editor/EditorLayerBox.kt` and `feature/text-card/src/main/java/com/wanbaohe/textcard/presentation/editor/TextBlockTransformHandles.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 74 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 (49 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/resize_group/ResizeTypeSelector.kt:241— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/resize_group/ResizeTypeSelector.kt:241-289 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/resize_group/ResizeTypeSelector.kt:292-340 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/resize_group/ResizeTypeSelector.kt:241` 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 (47–48 lines × 2) feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:460— feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:460-507 | feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIPromptComponent.kt:497-543 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIPromptComponent.kt` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 360 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 `feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:460` 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 (55 lines × 2) core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:1258— core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:1258-1312 | core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:1378-1432 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:1256` calls `propInt` and `core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/components/MaterialComponents.kt:1377` 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 (47 lines × 2) feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt:91— feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt:91-137 | feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/ImageStitchingContent.kt:89-135 — before extracting anything, compare `feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt` and `feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/ImageStitchingContent.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 131 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 `feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.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. Note first that the copies are not typed on the same thing: the declarations holding them bind `component` to `ImageStackingComponent` in one and `ImageStitchingComponent` 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 (80–81 lines × 2) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/data/AndroidImageDrawApplier.kt:416— feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/data/AndroidImageDrawApplier.kt:416-495 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/utils/DrawUtils.kt:382-462 — 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 `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/data/AndroidImageDrawApplier.kt:416` 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 (46 lines × 2) feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt:142— feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt:142-187 | feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/ImageStitchingContent.kt:141-186 — before extracting anything, compare `feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt` and `feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/ImageStitchingContent.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 131 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 `feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt:142` 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: the declarations holding them bind `component` to `ImageStackingComponent` in one and `ImageStitchingComponent` 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 (37–46 lines × 2) feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt:182— feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt:182-218 | feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/WeightResizeContent.kt:245-290 — before extracting anything, compare `feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt` and `feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/WeightResizeContent.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 155 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 `feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt:182` 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 (45–46 lines × 2) feature/ocr-document/src/main/java/com/shifenmiao/feature/document/screen/OcrTaskListScreen.kt:234— feature/ocr-document/src/main/java/com/shifenmiao/feature/document/screen/OcrTaskListScreen.kt:234-278 | feature/ocr-document/src/main/java/com/shifenmiao/feature/document/screen/OcrTaskListScreen.kt:284-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 `feature/ocr-document/src/main/java/com/shifenmiao/feature/document/screen/OcrTaskListScreen.kt:234` 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 (45 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/image/ImagePager.kt:134— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/image/ImagePager.kt:134-178 | feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaImagePager.kt:135-179 — before extracting anything, compare `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/image/ImagePager.kt` and `feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaImagePager.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 208 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/image/ImagePager.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.
Duplicated block (42–44 lines × 2) feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/NewGameDropMenu.kt:272— feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/NewGameDropMenu.kt:272-315 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiEmptyQuickPanel.kt:162-203 — 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 `feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/NewGameDropMenu.kt:272` 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 (42 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/data/online/SignalingClientImpl.kt:123— feature/chess/src/main/java/com/wanbaohe/chess/data/online/SignalingClientImpl.kt:123-164 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/online/SignalingClientImpl.kt:123-164 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/online/SignalingClientImpl.kt:123-164 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/data/online/SignalingClientImpl.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/online/SignalingClientImpl.kt` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 129 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: `OnlineMessage` names `com.wanbaohe.chess.domain.model.OnlineMessage` in one and `com.wanbaohe.gomoku.domain.model.OnlineMessage` 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 (42 lines × 2) core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/presentation/model/UiFontFamily.kt:206— core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/presentation/model/UiFontFamily.kt:206-247 | core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/presentation/model/UiFontFamily.kt:249-290 — 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 (41 lines × 2) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/glitch/Glitcher.kt:102— feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/glitch/Glitcher.kt:102-142 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/glitch/tools/Anaglyph.kt:37-77 — before extracting anything, compare `feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/glitch/Glitcher.kt` and `feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/glitch/tools/Anaglyph.kt` as WHOLE FILES: 94% 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 `feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/glitch/Glitcher.kt:102` 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 (38–40 lines × 2) feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/presentation/components/ImagePickerList.kt:129— feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/presentation/components/ImagePickerList.kt:129-168 | feature/common/src/main/java/com/shifenmiao/common/ui/ImagePickerList.kt:175-212 — 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 `feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/presentation/components/ImagePickerList.kt:129` 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: `Close` names `androidx.compose.material.icons.filled.Close` in one and `com.t8rin.imagetoolbox.core.resources.icons.Close` 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 (39–40 lines × 2) feature/file-browser/src/main/java/com/wanbaohe/file/browser/screen/FileBrowserScreen.kt:383— feature/file-browser/src/main/java/com/wanbaohe/file/browser/screen/FileBrowserScreen.kt:383-421 | feature/file-browser/src/main/java/com/wanbaohe/file/browser/screen/FileBrowserScreen.kt:452-491 — 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/file-browser/src/main/java/com/wanbaohe/file/browser/screen/FileBrowserScreen.kt:383` 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 (38–39 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/FileReorderVerticalList.kt:177— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/FileReorderVerticalList.kt:177-214 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/ImageReorderCarousel.kt:149-187 — before extracting anything, compare `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/FileReorderVerticalList.kt` and `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/ImageReorderCarousel.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 75 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/FileReorderVerticalList.kt:177` 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: `Add` names `androidx.compose.material.icons.rounded.Add` in one and `com.t8rin.imagetoolbox.core.resources.icons.Add` 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 (35–38 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt:199— feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt:199-236 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuAnalysisScreen.kt:205-239 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiAnalysisScreen.kt:199-236 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuAnalysisScreen.kt` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 187 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 `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt:199` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: `GameMode` names `com.wanbaohe.chess.domain.model.GameMode` in one and `com.wanbaohe.gomoku.domain.model.GameMode` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt:198` calls `padding` and `feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiAnalysisScreen.kt:198` 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 (37–38 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/text/TopAppBarTitle.kt:94— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/text/TopAppBarTitle.kt:94-130 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/text/TopAppBarTitle.kt:154-191 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/text/TopAppBarTitle.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 (34–38 lines × 2) feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:110— feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:110-147 | feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt:133-166 — before extracting anything, compare `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt` and `feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 190 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 `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:110` 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 `component` to `FormatConversionComponent` in one and `ResizeAndConvertComponent` 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 (37 lines × 4) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/components/ApngParamsSelector.kt:65— feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/components/ApngParamsSelector.kt:65-101 | feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/components/GifParamsSelector.kt:65-101 | feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/components/StackingParamsSelector.kt:53-89 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/components/WebpParamsSelector.kt:60-96 — before extracting anything, compare `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/components/ApngParamsSelector.kt` and `feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/components/StackingParamsSelector.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. 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 `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/components/ApngParamsSelector.kt:65` 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 `onValueChange` to `(ApngParams) -> Unit` in one and `(GifParams) -> Unit` 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 (36 lines × 2) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/controls/DrawContentControls.kt:210— feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/controls/DrawContentControls.kt:210-245 | feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/components/DrawEditOption.kt:329-364 — 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 `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/controls/DrawContentControls.kt:210` 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–36 lines × 2) feature/login/src/main/java/com/shifenmiao/login/ForgotPasswordBottomSheet.kt:65— feature/login/src/main/java/com/shifenmiao/login/ForgotPasswordBottomSheet.kt:65-93 | feature/login/src/main/java/com/shifenmiao/login/RegistrationBottomSheet.kt:65-100 — 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 `feature/login/src/main/java/com/shifenmiao/login/ForgotPasswordBottomSheet.kt:65` 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: `ArrowBack` names `androidx.compose.material.icons.automirrored.outlined.ArrowBack` in one and `com.t8rin.imagetoolbox.core.resources.icons.ArrowBack` 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 (34 lines × 4) feature/app/src/main/java/com/wanbaohe/app/ui/VerifyContactSheet.kt:147— feature/app/src/main/java/com/wanbaohe/app/ui/VerifyContactSheet.kt:147-180 | feature/profile/src/main/java/com/wanbaohe/profile/screen/BindEmailSheet.kt:116-149 | feature/profile/src/main/java/com/wanbaohe/profile/screen/ChangePasswordSheet.kt:106-139 | feature/profile/src/main/java/com/wanbaohe/profile/screen/VerifyEmailSheet.kt:99-132 — before extracting anything, compare `feature/app/src/main/java/com/wanbaohe/app/ui/VerifyContactSheet.kt` and `feature/profile/src/main/java/com/wanbaohe/profile/screen/BindEmailSheet.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 75 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 `feature/app/src/main/java/com/wanbaohe/app/ui/VerifyContactSheet.kt:147` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (34 lines × 3) feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rearrange/components/PdfPagesRearrangeGrid.kt:110— feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rearrange/components/PdfPagesRearrangeGrid.kt:110-143 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_pages/components/PdfPagesRemoveGrid.kt:108-141 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rotate/components/PdfPagesRotationGrid.kt:98-131 — before extracting anything, compare `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rearrange/components/PdfPagesRearrangeGrid.kt` and `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_pages/components/PdfPagesRemoveGrid.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 97 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 `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rearrange/components/PdfPagesRearrangeGrid.kt:110` 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 (26–34 lines × 2) libs/documentscanner/src/main/java/com/t8rin/documentscanner/utils/ImageUtil.kt:128— libs/documentscanner/src/main/java/com/t8rin/documentscanner/utils/ImageUtil.kt:128-161 | libs/opencv-tools/src/main/java/com/t8rin/opencv_tools/free_corners_crop/FreeCrop.kt:63-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 (31–33 lines × 3) feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeAddCountdownScreen.kt:179— feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeAddCountdownScreen.kt:179-211 | feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeAddEventScreen.kt:173-203 | feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeAddMilestoneScreen.kt:174-206 — before extracting anything, compare `feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeAddCountdownScreen.kt` and `feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeAddEventScreen.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 84 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 `feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeAddCountdownScreen.kt:179` 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 (32–33 lines × 2) core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/DynamicUi.kt:149— core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/DynamicUi.kt:149-181 | core/dynamic-ui/src/main/kotlin/com/wanbaohe/dynamicui/DynamicUi.kt:222-253 — 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 (31–33 lines × 2) core/ui/src/main/java/com/wanbaohe/base/ui/picker/CityPicker.kt:204— core/ui/src/main/java/com/wanbaohe/base/ui/picker/CityPicker.kt:204-234 | core/ui/src/main/java/com/wanbaohe/base/ui/picker/Picker.kt:79-111 — 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 `core/ui/src/main/java/com/wanbaohe/base/ui/picker/CityPicker.kt:204` 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, `core/ui/src/main/java/com/wanbaohe/base/ui/picker/CityPicker.kt:235` calls `isEmpty` and `core/ui/src/main/java/com/wanbaohe/base/ui/picker/Picker.kt:112` 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 (29–33 lines × 2) feature/profile/src/main/java/com/wanbaohe/profile/components/AnimatedPager.kt:134— feature/profile/src/main/java/com/wanbaohe/profile/components/AnimatedPager.kt:134-166 | feature/profile/src/main/java/com/wanbaohe/profile/components/PlayProductSlider.kt:147-175 — before extracting anything, compare `feature/profile/src/main/java/com/wanbaohe/profile/components/AnimatedPager.kt` and `feature/profile/src/main/java/com/wanbaohe/profile/components/PlayProductSlider.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 64 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 `feature/profile/src/main/java/com/wanbaohe/profile/components/AnimatedPager.kt:134` 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, `feature/profile/src/main/java/com/wanbaohe/profile/components/PlayProductSlider.kt:176` calls `padding` and `feature/profile/src/main/java/com/wanbaohe/profile/components/AnimatedPager.kt:167` 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 (29–31 lines × 2) libs/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:420— libs/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:420-450 | libs/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:492-520 — 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 `libs/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:420` 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, `libs/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:521` calls `checkNotNull` and `libs/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:451` 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 (27–30 lines × 2) feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:202— feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:202-231 | feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt:192-218 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 625 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 `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:202` 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: `Add` names `androidx.compose.material.icons.outlined.Add` in one and `com.t8rin.imagetoolbox.core.resources.icons.Add` 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 (26–30 lines × 2) feature/code-editor/src/main/java/com/wanbaohe/code/editor/webview/WebViewCodeEditor.kt:298— feature/code-editor/src/main/java/com/wanbaohe/code/editor/webview/WebViewCodeEditor.kt:298-323 | feature/markdown-edit/src/main/java/com/wanbaohe/markdown/edit/webview/WebViewMarkdownEditor.kt:378-407 — before extracting anything, compare `feature/code-editor/src/main/java/com/wanbaohe/code/editor/webview/WebViewCodeEditor.kt` and `feature/markdown-edit/src/main/java/com/wanbaohe/markdown/edit/webview/WebViewMarkdownEditor.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 150 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 `feature/code-editor/src/main/java/com/wanbaohe/code/editor/webview/WebViewCodeEditor.kt:298` 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 × 3) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/PinchParamsItem.kt:72— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/PinchParamsItem.kt:72-100 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RadialTiltShiftParamsItem.kt:72-100 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/WaterParamsItem.kt:72-100 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/PinchParamsItem.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RadialTiltShiftParamsItem.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 97 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 `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/PinchParamsItem.kt:72` 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 (24–28 lines × 2) feature/code-editor/src/main/java/com/wanbaohe/code/editor/screen/CodeEditorScreen.kt:281— feature/code-editor/src/main/java/com/wanbaohe/code/editor/screen/CodeEditorScreen.kt:281-304 | feature/markdown-edit/src/main/java/com/wanbaohe/markdown/edit/screen/MarkdownEditorScreen.kt:328-355 — before extracting anything, compare `feature/code-editor/src/main/java/com/wanbaohe/code/editor/screen/CodeEditorScreen.kt` and `feature/markdown-edit/src/main/java/com/wanbaohe/markdown/edit/screen/MarkdownEditorScreen.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 101 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 `feature/code-editor/src/main/java/com/wanbaohe/code/editor/screen/CodeEditorScreen.kt:281` 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 (23–28 lines × 2) feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt:282— feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt:282-304 | feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/WeightResizeContent.kt:375-402 — before extracting anything, compare `feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt` and `feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/WeightResizeContent.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 155 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 `feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt:282` 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 (25–27 lines × 2) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:232— feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:232-258 | feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/screenLogic/GifToolsComponent.kt:251-275 — 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 `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:232` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:231` calls `getFramePositions` and `feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/screenLogic/GifToolsComponent.kt:250` 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 (23–27 lines × 2) feature/code-editor/src/main/java/com/wanbaohe/code/editor/webview/WebViewCodeEditor.kt:249— feature/code-editor/src/main/java/com/wanbaohe/code/editor/webview/WebViewCodeEditor.kt:249-271 | feature/markdown-edit/src/main/java/com/wanbaohe/markdown/edit/webview/WebViewMarkdownEditor.kt:317-343 — before extracting anything, compare `feature/code-editor/src/main/java/com/wanbaohe/code/editor/webview/WebViewCodeEditor.kt` and `feature/markdown-edit/src/main/java/com/wanbaohe/markdown/edit/webview/WebViewMarkdownEditor.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 150 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 `feature/code-editor/src/main/java/com/wanbaohe/code/editor/webview/WebViewCodeEditor.kt:249` 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 (26 lines × 5) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionCubeLutBottomContent.kt:381— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionCubeLutBottomContent.kt:381-406 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheet.kt:356-381 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/sheets/AddExifSheet.kt:277-302 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/sheets/ProcessImagesPreferenceSheet.kt:264-289 | feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaPickerGridWithOverlays.kt:284-309 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionCubeLutBottomContent.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheet.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 108 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 `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionCubeLutBottomContent.kt:381` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (20–26 lines × 2) core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDatePickerDialog.kt:542— core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDatePickerDialog.kt:542-567 | core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDateRangePickerDialog.kt:448-467 — before extracting anything, compare `core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDatePickerDialog.kt` and `core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDateRangePickerDialog.kt` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 147 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 `core/ui/src/main/java/com/wanbaohe/base/ui/picker/ChineseDatePickerDialog.kt:542` 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 (25 lines × 4) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/NumberBlurEdgeModePairItem.kt:51— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/NumberBlurEdgeModePairItem.kt:51-75 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/NumberBooleanPairItem.kt:50-74 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/NumberMirrorSidePairItem.kt:51-75 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/NumberTransferFuncPairItem.kt:51-75 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once.
Duplicated block (61 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/modifier/MeshGradient.kt:201— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/modifier/MeshGradient.kt:201-261 | feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/data/AndroidGradientMaker.kt:246-306 — before extracting anything, compare `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/modifier/MeshGradient.kt` and `feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/data/AndroidGradientMaker.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 134 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 (23–25 lines × 2) feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:709— feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:709-733 | feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt:676-698 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 625 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 `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:709` 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 (18–24 lines × 2) feature/common/src/main/java/com/shifenmiao/common/ui/ImagePager.kt:170— feature/common/src/main/java/com/shifenmiao/common/ui/ImagePager.kt:170-193 | feature/common/src/main/java/com/shifenmiao/common/ui/ImagePager.kt:230-247 — 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/common/src/main/java/com/shifenmiao/common/ui/ImagePager.kt:170` 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 (22–24 lines × 2) feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt:125— feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt:125-146 | feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/WeightResizeContent.kt:184-207 — before extracting anything, compare `feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt` and `feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/WeightResizeContent.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 155 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 `feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt:125` 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–23 lines × 2) feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt:96— feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt:96-111 | feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/WeightResizeContent.kt:151-173 — before extracting anything, compare `feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt` and `feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/WeightResizeContent.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 155 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 `feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/WeightResizeContent.kt:151` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `component` to `LimitsResizeComponent` in one and `WeightResizeComponent` 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 (55 lines × 4) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionCubeLutBottomContent.kt:210— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionCubeLutBottomContent.kt:210-264 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheet.kt:443-497 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/sheets/AddExifSheet.kt:145-199 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/sheets/ProcessImagesPreferenceSheet.kt:137-191 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionCubeLutBottomContent.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheet.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 108 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 `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionCubeLutBottomContent.kt:210` 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: `ArrowBack` names `androidx.compose.material.icons.automirrored.rounded.ArrowBack` in one and `com.t8rin.imagetoolbox.core.resources.icons.ArrowBack` 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 (20–22 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessSettingsScreen.kt:390— feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessSettingsScreen.kt:390-409 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuSettingsScreen.kt:394-413 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiSettingsScreen.kt:527-548 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessSettingsScreen.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuSettingsScreen.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 138 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 `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessSettingsScreen.kt:390` 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 (22 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt:533— feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt:533-554 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/OnlineMatchScreen.kt:533-554 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/OnlineMatchScreen.kt:533-554 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/OnlineMatchScreen.kt` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 428 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 `feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt:533` 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 (20–22 lines × 2) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/data/AndroidImageDrawApplier.kt:255— feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/data/AndroidImageDrawApplier.kt:255-276 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/utils/DrawUtils.kt:304-323 — 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 `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/data/AndroidImageDrawApplier.kt:255` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (19–22 lines × 2) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/DrawModeSelector.kt:173— feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/DrawModeSelector.kt:173-194 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/DrawPathModeInfoSheet.kt:63-81 — 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 `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/DrawModeSelector.kt:173` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (20–21 lines × 3) feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/DeleteExifContent.kt:149— feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/DeleteExifContent.kt:149-169 | feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:162-181 | feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/presentation/GradientMakerContent.kt:123-142 — before extracting anything, compare `feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/DeleteExifContent.kt` and `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 71 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 `feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/DeleteExifContent.kt:149` 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `component` to `DeleteExifComponent` in one and `FormatConversionComponent` 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 (20 lines × 5) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/PinchParamsItem.kt:77— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/PinchParamsItem.kt:77-96 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RadialTiltShiftParamsItem.kt:77-96 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RubberStampParamsItem.kt:83-102 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SmearParamsItem.kt:77-96 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/WaterParamsItem.kt:77-96 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/PinchParamsItem.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RadialTiltShiftParamsItem.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 97 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 `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/PinchParamsItem.kt:77` 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) feature/collage-maker/src/main/java/com/t8rin/imagetoolbox/collage_maker/presentation/CollageMakerContent.kt:631— feature/collage-maker/src/main/java/com/t8rin/imagetoolbox/collage_maker/presentation/CollageMakerContent.kt:631-650 | feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt:299-317 | feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/ImageStitchingContent.kt:281-299 — before extracting anything, compare `feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt` and `feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/ImageStitchingContent.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 131 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 `feature/collage-maker/src/main/java/com/t8rin/imagetoolbox/collage_maker/presentation/CollageMakerContent.kt:631` 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–20 lines × 2) feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt:163— feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt:163-180 | feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/WeightResizeContent.kt:209-228 — before extracting anything, compare `feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt` and `feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/WeightResizeContent.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 155 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 `feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt:163` 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–19 lines × 15) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ChannelMixParamsItem.kt:104— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ChannelMixParamsItem.kt:104-121 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ClaheParamsItem.kt:93-110 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/EnhancedZoomBlurParamsItem.kt:103-120 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/GlitchParamsItem.kt:103-120 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/KaleidoscopeParamsItem.kt:105-122 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/LinearTiltShiftParamsItem.kt:103-120 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/PinchParamsItem.kt:98-115 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RadialTiltShiftParamsItem.kt:98-115 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/WaterParamsItem.kt:98-115 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/NumberPairItem.kt:79-96 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/quad_components/NumberColorModelQuadItem.kt:102-120 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/quad_components/NumberQuadItem.kt:93-110 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberNumberBlurEdgeModeTripleItem.kt:85-102 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberNumberColorModelTripleItem.kt:91-109 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberTripleItem.kt:87-104 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ChannelMixParamsItem.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/EnhancedZoomBlurParamsItem.kt` as WHOLE FILES: this scan already matched 4 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 `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ChannelMixParamsItem.kt:104` 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–19 lines × 4) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt:127— feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt:127-144 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuAnalysisScreen.kt:131-148 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiAnalysisScreen.kt:127-144 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiGameScreen.kt:199-217 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuAnalysisScreen.kt` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 187 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 `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessAnalysisScreen.kt:127` 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: the declarations holding them bind `component` to `ChessAnalysisComponent` in one and `GomokuAnalysisComponent` 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 (32 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt:410— feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt:410-441 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/OnlineMatchScreen.kt:410-441 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/OnlineMatchScreen.kt:410-441 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/OnlineMatchScreen.kt` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 428 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 `feature/chess/src/main/java/com/wanbaohe/chess/screen/OnlineMatchScreen.kt:410` 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 (16–19 lines × 3) libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:652— libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:652-667 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:800-818 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1400-1415 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 234 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 `libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:652` 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–19 lines × 2) feature/altitude/src/main/java/com/wanbaohe/altitude/ui/AltitudeTrendChart.kt:93— feature/altitude/src/main/java/com/wanbaohe/altitude/ui/AltitudeTrendChart.kt:93-111 | feature/habit-tracker/src/main/java/com/wanbaohe/habittracker/screen/tab/StatsTab.kt:331-345 — before extracting anything, compare `feature/altitude/src/main/java/com/wanbaohe/altitude/ui/AltitudeTrendChart.kt` and `feature/habit-tracker/src/main/java/com/wanbaohe/habittracker/screen/tab/StatsTab.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 40 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 `feature/altitude/src/main/java/com/wanbaohe/altitude/ui/AltitudeTrendChart.kt:93` 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 (16–18 lines × 5) feature/ai-image/src/main/java/com/shifenmiao/ai/image/screen/AIGCImageScreen.kt:62— feature/ai-image/src/main/java/com/shifenmiao/ai/image/screen/AIGCImageScreen.kt:62-79 | feature/base64-tools/src/main/java/com/t8rin/imagetoolbox/feature/base64_tools/presentation/Base64ToolsContent.kt:138-153 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/DrawContent.kt:252-269 | feature/edit-exif/src/main/java/com/t8rin/imagetoolbox/feature/edit_exif/presentation/EditExifContent.kt:154-169 | feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/SingleEditContent.kt:189-204 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `feature/ai-image/src/main/java/com/shifenmiao/ai/image/screen/AIGCImageScreen.kt:62` 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 `component` to `Base64ToolsComponent` in one and `EditExifComponent` 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 × 5) feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/DeleteExifContent.kt:151— feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/DeleteExifContent.kt:151-168 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/FiltersContent.kt:121-138 | feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:164-181 | feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/presentation/GradientMakerContent.kt:125-142 | feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt:183-200 — before extracting anything, compare `feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/DeleteExifContent.kt` and `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 71 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 `feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/DeleteExifContent.kt:151` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `component` to `DeleteExifComponent` in one and `FormatConversionComponent` 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 (17–18 lines × 3) feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeAddCountdownScreen.kt:136— feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeAddCountdownScreen.kt:136-153 | feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeAddEventScreen.kt:131-147 | feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeAddMilestoneScreen.kt:131-148 — before extracting anything, compare `feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeAddCountdownScreen.kt` and `feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeAddEventScreen.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 84 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 `feature/lifetime/src/main/java/com/shifenmiao/lifetime/screen/LifeTimeAddCountdownScreen.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 (13–18 lines × 2) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidErSubPipeline.kt:474— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidErSubPipeline.kt:474-491 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlErdSubPipeline.kt:598-610 — before extracting anything, compare `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidErSubPipeline.kt` and `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlErdSubPipeline.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 144 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 `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidErSubPipeline.kt:474` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (17 lines × 6) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ArcParamsItem.kt:85— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ArcParamsItem.kt:85-101 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ChannelMixParamsItem.kt:86-102 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/EnhancedZoomBlurParamsItem.kt:85-101 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/GlitchParamsItem.kt:85-101 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/KaleidoscopeParamsItem.kt:87-103 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/LinearTiltShiftParamsItem.kt:85-101 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ArcParamsItem.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/EnhancedZoomBlurParamsItem.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. 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 `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ArcParamsItem.kt:85` 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–17 lines × 6) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SideFadeRelativeItem.kt:65— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SideFadeRelativeItem.kt:65-81 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/NumberBlurEdgeModePairItem.kt:54-67 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/NumberBooleanPairItem.kt:53-66 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/NumberMirrorSidePairItem.kt:54-67 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/NumberTransferFuncPairItem.kt:54-67 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberTransferFuncBlurEdgeModeTripleItem.kt:65-81 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/NumberTransferFuncPairItem.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberTransferFuncBlurEdgeModeTripleItem.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 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 `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SideFadeRelativeItem.kt:65` 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, `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/NumberBlurEdgeModePairItem.kt:68` calls `onFilterChange` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SideFadeRelativeItem.kt:82` 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 (17 lines × 5) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/text/OutlinedText.kt:107— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/text/OutlinedText.kt:107-123 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/text/OutlinedText.kt:175-191 | feature/ai/src/main/java/com/shifenmiao/ai/screen/AIDuelChatScreen.kt:577-593 | feature/common/src/main/java/com/shifenmiao/common/ui/CreationMetaConfigSheet.kt:651-667 | feature/settings/src/main/java/com/wanbaohe/setting/ai/screen/AIEngineSettingsDetailScreen.kt:1212-1228 — there are 5 copies across 4 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/text/OutlinedText.kt:107` 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 (17 lines × 4) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/FileReorderVerticalList.kt:144— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/FileReorderVerticalList.kt:144-160 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rearrange/components/PdfPagesRearrangeGrid.kt:109-125 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_pages/components/PdfPagesRemoveGrid.kt:107-123 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rotate/components/PdfPagesRotationGrid.kt:97-113 — before extracting anything, compare `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rearrange/components/PdfPagesRearrangeGrid.kt` and `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_pages/components/PdfPagesRemoveGrid.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 97 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/FileReorderVerticalList.kt:144` 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–17 lines × 4) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:265— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:265-281 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:933-945 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1258-1270 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:400-412 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` as WHOLE FILES: this scan already matched 47 separate duplicated blocks between them, totalling at least 481 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 `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:265` 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–17 lines × 3) feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/components/GifToolsTopAppBarActions.kt:82— feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/components/GifToolsTopAppBarActions.kt:82-96 | feature/image-preview/src/main/java/com/t8rin/imagetoolbox/feature/image_preview/presentation/ImagePreviewContent.kt:273-289 | feature/load-net-image/src/main/java/com/t8rin/imagetoolbox/feature/load_net_image/presentation/components/LoadNetImageTopAppBarActions.kt:88-102 — before extracting anything, compare `feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/components/GifToolsTopAppBarActions.kt` and `feature/load-net-image/src/main/java/com/t8rin/imagetoolbox/feature/load_net_image/presentation/components/LoadNetImageTopAppBarActions.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 `feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/components/GifToolsTopAppBarActions.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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: `Icons` names `androidx.compose.material.icons.Icons` in one and `com.t8rin.imagetoolbox.core.resources.Icons` 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 (10–17 lines × 4) feature/marquee/src/main/java/com/shifenmiao/marquee/screen/MarqueeScreen.kt:408— feature/marquee/src/main/java/com/shifenmiao/marquee/screen/MarqueeScreen.kt:408-424 | feature/marquee/src/main/java/com/shifenmiao/marquee/screen/MarqueeScreen.kt:444-460 | feature/marquee/src/main/java/com/shifenmiao/marquee/screen/MarqueeScreen.kt:473-489 | feature/marquee/src/main/java/com/shifenmiao/marquee/screen/MarqueeScreen.kt:501-510 — 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 `feature/marquee/src/main/java/com/shifenmiao/marquee/screen/MarqueeScreen.kt:408` 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. Note first that the copies are not typed on the same thing: `Check` names `androidx.compose.material.icons.filled.Check` in one and `com.t8rin.imagetoolbox.core.resources.icons.Check` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `feature/marquee/src/main/java/com/shifenmiao/marquee/screen/MarqueeScreen.kt:408` calls `Icon` and `feature/marquee/src/main/java/com/shifenmiao/marquee/screen/MarqueeScreen.kt:501` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (13–17 lines × 3) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:740— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:740-752 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:342-354 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1523-1539 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt` as WHOLE FILES: this scan already matched 49 separate duplicated blocks between them, totalling at least 520 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 `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:740` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16–17 lines × 3) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/ColorModelTripleItem.kt:70— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/ColorModelTripleItem.kt:70-86 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/ColorModelTripleItem.kt:88-104 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/ColorModelTripleItem.kt:105-120 — 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 `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/ColorModelTripleItem.kt:70` 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 (14–17 lines × 2) feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:748— feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:748-764 | feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt:713-726 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIPromptScreen.kt` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 625 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 `feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt:748` 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–17 lines × 2) feature/altitude/src/main/java/com/wanbaohe/altitude/data/sensor/GpsAltitudeSource.kt:105— feature/altitude/src/main/java/com/wanbaohe/altitude/data/sensor/GpsAltitudeSource.kt:105-121 | feature/altitude/src/main/java/com/wanbaohe/altitude/data/sensor/GpsAltitudeSource.kt:132-146 — 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/altitude/src/main/java/com/wanbaohe/altitude/data/sensor/GpsAltitudeSource.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.
Duplicated block (13–16 lines × 6) libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:116— libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:116-128 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1023-1035 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:583-598 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:429-441 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:243-255 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:282-294 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 544 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 `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:116` 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–16 lines × 5) libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:135— libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:135-150 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:974-985 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1007-1018 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:597-612 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:303-314 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 544 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 `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:135` 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–16 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/ClipboardUtils.kt:48— core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/ClipboardUtils.kt:48-63 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/ClipboardUtils.kt:89-101 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/utils/helper/ClipboardUtils.kt:48` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8–16 lines × 2) feature/code-editor/src/main/java/com/wanbaohe/code/editor/screen/CodeEditorScreen.kt:255— feature/code-editor/src/main/java/com/wanbaohe/code/editor/screen/CodeEditorScreen.kt:255-262 | feature/markdown-edit/src/main/java/com/wanbaohe/markdown/edit/screen/MarkdownEditorScreen.kt:248-263 — before extracting anything, compare `feature/code-editor/src/main/java/com/wanbaohe/code/editor/screen/CodeEditorScreen.kt` and `feature/markdown-edit/src/main/java/com/wanbaohe/markdown/edit/screen/MarkdownEditorScreen.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 101 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 `feature/code-editor/src/main/java/com/wanbaohe/code/editor/screen/CodeEditorScreen.kt:255` 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 (15 lines × 18) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/BilaterialBlurParamsItem.kt:96— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/BilaterialBlurParamsItem.kt:96-110 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ChannelMixParamsItem.kt:106-120 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ClaheParamsItem.kt:95-109 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/EnhancedZoomBlurParamsItem.kt:105-119 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/GlitchParamsItem.kt:105-119 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/KaleidoscopeParamsItem.kt:107-121 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/LinearGaussianParamsItem.kt:97-111 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/LinearTiltShiftParamsItem.kt:105-119 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/PinchParamsItem.kt:100-114 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RadialTiltShiftParamsItem.kt:100-114 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SparkleParamsItem.kt:116-130 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/WaterParamsItem.kt:100-114 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/NumberPairItem.kt:81-95 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/quad_components/NumberColorModelQuadItem.kt:105-119 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/quad_components/NumberQuadItem.kt:95-109 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberNumberBlurEdgeModeTripleItem.kt:87-101 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberNumberColorModelTripleItem.kt:94-108 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberTripleItem.kt:89-103 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/BilaterialBlurParamsItem.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/LinearGaussianParamsItem.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 83 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 `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/BilaterialBlurParamsItem.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 (15 lines × 13) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassOutlinedTextField.kt:319— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassOutlinedTextField.kt:319-333 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassOutlinedTextField.kt:412-426 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassSegmentedButtonRow.kt:182-196 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassSegmentedButtonRow.kt:507-521 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/text/OutlinedText.kt:107-121 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/text/OutlinedText.kt:175-189 | feature/ai/src/main/java/com/shifenmiao/ai/screen/AIDuelChatScreen.kt:471-485 | feature/ai/src/main/java/com/shifenmiao/ai/screen/AIDuelChatScreen.kt:577-591 | feature/app/src/main/java/com/wanbaohe/app/components/RoundedTextField.kt:157-171 | feature/common/src/main/java/com/shifenmiao/common/ui/CreationMetaConfigSheet.kt:651-665 | feature/settings/src/main/java/com/wanbaohe/setting/ai/screen/AIEngineSettingsDetailScreen.kt:1212-1226 | libs/markdown/src/upstream/java/com/hrm/markdown/renderer/inline/InlineLayoutBlockText.kt:111-125 | libs/markdown/src/upstream/java/com/hrm/markdown/renderer/internal/layout/inline/InlineLayoutBlockSupport.kt:178-192 — there are 13 copies across 9 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 13 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/glass/GlassOutlinedTextField.kt:319` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14–15 lines × 6) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/FloatColorModelPairItem.kt:58— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/FloatColorModelPairItem.kt:58-71 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/FloatFileModelPairItem.kt:68-81 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/FloatImageModelPairItem.kt:56-69 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/FloatPaletteImageModelTripleItem.kt:68-82 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberColorModelColorModelTripleItem.kt:62-76 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberColorModelPopArtTripleItem.kt:66-80 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberColorModelColorModelTripleItem.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberColorModelPopArtTripleItem.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 57 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 `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/FloatColorModelPairItem.kt:58` 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, `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/FloatPaletteImageModelTripleItem.kt:65` calls `mutableStateOf` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/FloatFileModelPairItem.kt:65` 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–15 lines × 3) libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1060— libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1060-1070 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:732-746 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1518-1532 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 544 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 `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1060` 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–15 lines × 2) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/other/TopAppBarEmoji.kt:235— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/other/TopAppBarEmoji.kt:235-244 | feature/settings/src/main/java/com/wanbaohe/setting/display/screen/DisplaySettingsScreen.kt:297-311 — 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 `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/other/TopAppBarEmoji.kt:235` 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–15 lines × 2) feature/code-editor/src/main/java/com/wanbaohe/code/editor/screen/CodeEditorScreen.kt:385— feature/code-editor/src/main/java/com/wanbaohe/code/editor/screen/CodeEditorScreen.kt:385-396 | feature/markdown-edit/src/main/java/com/wanbaohe/markdown/edit/screen/MarkdownEditorScreen.kt:436-450 — before extracting anything, compare `feature/code-editor/src/main/java/com/wanbaohe/code/editor/screen/CodeEditorScreen.kt` and `feature/markdown-edit/src/main/java/com/wanbaohe/markdown/edit/screen/MarkdownEditorScreen.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 101 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 `feature/code-editor/src/main/java/com/wanbaohe/code/editor/screen/CodeEditorScreen.kt:385` 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–15 lines × 2) feature/code-editor/src/main/java/com/wanbaohe/code/editor/webview/WebViewCodeEditorState.kt:66— feature/code-editor/src/main/java/com/wanbaohe/code/editor/webview/WebViewCodeEditorState.kt:66-78 | feature/markdown-edit/src/main/java/com/wanbaohe/markdown/edit/webview/WebViewMarkdownEditorState.kt:54-68 — 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 `feature/code-editor/src/main/java/com/wanbaohe/code/editor/webview/WebViewCodeEditorState.kt:66` 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–14 lines × 25) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:473— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:473-479 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:572-578 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:634-640 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:127-140 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1771-1779 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:530-536 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:698-704 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:752-763 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:929-935 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:984-990 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:219-225 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:440-446 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:254-260 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:53-59 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:114-120 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:129-135 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:176-182 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:238-244 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:253-259 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:304-310 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:314-320 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:361-367 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:422-428 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:488-494 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:569-575 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` as WHOLE FILES: this scan already matched 47 separate duplicated blocks between them, totalling at least 481 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 `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:473` 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–14 lines × 8) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:811— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:811-819 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:619-631 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:702-715 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:798-806 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:252-260 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:521-529 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:323-331 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:443-451 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt` as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 445 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 `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:811` 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 (10–14 lines × 4) libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1170— libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1170-1179 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:659-672 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:708-718 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:377-386 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 544 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 `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1170` 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 (12–14 lines × 3) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/FavoritesContent.kt:119— core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/FavoritesContent.kt:119-130 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/FileReorderVerticalList.kt:124-137 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/ImageReorderCarousel.kt:111-123 — before extracting anything, compare `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/FileReorderVerticalList.kt` and `core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/controls/ImageReorderCarousel.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 75 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 `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/FavoritesContent.kt:119` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10–14 lines × 3) libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1764— libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1764-1777 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:832-841 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:299-308 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 524 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 `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1764` 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 (8–14 lines × 2) feature/ocr-document/src/main/java/com/shifenmiao/feature/document/screen/DocConvertTaskListScreen.kt:318— feature/ocr-document/src/main/java/com/shifenmiao/feature/document/screen/DocConvertTaskListScreen.kt:318-325 | feature/ocr-document/src/main/java/com/shifenmiao/feature/document/screen/OcrTaskListScreen.kt:370-383 — before extracting anything, compare `feature/ocr-document/src/main/java/com/shifenmiao/feature/document/screen/DocConvertTaskListScreen.kt` and `feature/ocr-document/src/main/java/com/shifenmiao/feature/document/screen/OcrTaskListScreen.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 81 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 `feature/ocr-document/src/main/java/com/shifenmiao/feature/document/screen/DocConvertTaskListScreen.kt:318` 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–14 lines × 2) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/block/TableRenderer.kt:148— libs/markdown/src/upstream/java/com/hrm/markdown/renderer/block/TableRenderer.kt:148-161 | libs/markdown/src/upstream/java/com/hrm/markdown/renderer/block/TableRenderer.kt:362-372 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `libs/markdown/src/upstream/java/com/hrm/markdown/renderer/block/TableRenderer.kt:163` calls `rememberInlineModel` and `libs/markdown/src/upstream/java/com/hrm/markdown/renderer/block/TableRenderer.kt:373` 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–13 lines × 30) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:156— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:156-163 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:206-213 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:257-264 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:458-465 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:510-517 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:562-569 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:664-676 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:766-773 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:866-873 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:918-925 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1097-1104 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1506-1513 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:779-788 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:509-521 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:569-581 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:631-643 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:682-689 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:827-834 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:914-921 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:969-976 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:164-171 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:302-309 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:347-354 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:392-399 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:484-491 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:367-374 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:406-413 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:488-495 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:473-480 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:534-541 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` as WHOLE FILES: this scan already matched 47 separate duplicated blocks between them, totalling at least 481 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 `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:156` 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–13 lines × 25) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:181— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:181-188 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:231-238 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:280-287 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:684-696 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:789-796 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:891-898 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:943-950 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:816-827 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:601-608 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:651-663 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:773-780 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:812-819 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:889-896 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:944-951 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:999-1006 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:174-181 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:411-418 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:455-462 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:499-506 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:421-428 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:503-510 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:381-388 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:442-454 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:508-515 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:554-561 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt` as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 445 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 `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:181` 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–13 lines × 25) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:304— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:304-312 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:356-364 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:406-414 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:612-620 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:928-936 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:962-970 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:995-1003 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1163-1171 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1253-1261 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1760-1772 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:843-855 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:879-891 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1194-1206 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:739-748 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:857-865 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:207-215 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:538-546 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:590-598 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:41-49 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:102-110 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:164-172 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:226-234 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:349-357 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:410-418 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1377-1389 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` as WHOLE FILES: this scan already matched 47 separate duplicated blocks between them, totalling at least 481 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 `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:304` 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–13 lines × 11) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:528— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:528-536 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:585-593 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:617-625 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:838-846 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:926-934 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1066-1074 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1644-1652 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:740-752 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:182-190 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:269-277 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:640-648 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` as WHOLE FILES: this scan already matched 47 separate duplicated blocks between them, totalling at least 481 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 `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:528` 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–13 lines × 9) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:677— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:677-685 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1105-1113 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1168-1176 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1514-1522 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1201-1213 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:744-753 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:375-383 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:414-422 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:496-504 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` as WHOLE FILES: this scan already matched 47 separate duplicated blocks between them, totalling at least 481 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 `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:677` 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 (13 lines × 6) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlActivitySubPipeline.kt:647— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlActivitySubPipeline.kt:647-659 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:946-958 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlDeploymentSubPipeline.kt:606-618 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlObjectSubPipeline.kt:330-342 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlStateSubPipeline.kt:350-362 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlUsecaseSubPipeline.kt:456-468 — 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 6 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlActivitySubPipeline.kt:647` 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 `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 (12–13 lines × 3) feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/components/TextEditDialog.kt:354— feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/components/TextEditDialog.kt:354-365 | feature/text-card/src/main/java/com/wanbaohe/textcard/presentation/editor/panels/TextStylePanel.kt:592-603 | feature/watermarking/src/main/java/com/shifenmiao/app/watermarking/presentation/components/FontStyleRow.kt:75-87 — 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 `feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/components/TextEditDialog.kt:354` 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, `feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/presentation/components/TextEditDialog.kt:353` calls `stringResource` and `feature/watermarking/src/main/java/com/shifenmiao/app/watermarking/presentation/components/FontStyleRow.kt:73` 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 (4–13 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:931— feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:931-943 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuGameComponent.kt:1060-1063 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiGameComponent.kt:862-874 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuGameComponent.kt` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 106 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 `feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:931` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: `AiOrchestrationUseCase` names `com.wanbaohe.chess.application.usecase.AiOrchestrationUseCase` in one and `com.wanbaohe.gomoku.application.usecase.AiOrchestrationUseCase` 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–13 lines × 4) feature/cipher/src/main/java/com/t8rin/imagetoolbox/feature/cipher/presentation/components/CipherTipSheet.kt:85— feature/cipher/src/main/java/com/t8rin/imagetoolbox/feature/cipher/presentation/components/CipherTipSheet.kt:85-97 | feature/cipher/src/main/java/com/t8rin/imagetoolbox/feature/cipher/presentation/components/CipherTipSheet.kt:103-115 | feature/cipher/src/main/java/com/t8rin/imagetoolbox/feature/cipher/presentation/components/CipherTipSheet.kt:120-125 | feature/cipher/src/main/java/com/t8rin/imagetoolbox/feature/cipher/presentation/components/CipherTipSheet.kt:138-143 — 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 `feature/cipher/src/main/java/com/t8rin/imagetoolbox/feature/cipher/presentation/components/CipherTipSheet.kt:85` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `feature/cipher/src/main/java/com/t8rin/imagetoolbox/feature/cipher/presentation/components/CipherTipSheet.kt:103` calls `padding` and `feature/cipher/src/main/java/com/t8rin/imagetoolbox/feature/cipher/presentation/components/CipherTipSheet.kt:120` does not — after which the two agree again for 5 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (26–33 lines × 2) feature/code-editor/src/main/java/com/wanbaohe/code/editor/webview/WebViewCodeEditor.kt:165— feature/code-editor/src/main/java/com/wanbaohe/code/editor/webview/WebViewCodeEditor.kt:165-190 | feature/markdown-edit/src/main/java/com/wanbaohe/markdown/edit/webview/WebViewMarkdownEditor.kt:250-282 — before extracting anything, compare `feature/code-editor/src/main/java/com/wanbaohe/code/editor/webview/WebViewCodeEditor.kt` and `feature/markdown-edit/src/main/java/com/wanbaohe/markdown/edit/webview/WebViewMarkdownEditor.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 150 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 `feature/code-editor/src/main/java/com/wanbaohe/code/editor/webview/WebViewCodeEditor.kt:165` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note 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 (9–12 lines × 39) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:161— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:161-169 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:211-219 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:306-314 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:358-366 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:408-416 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:463-471 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:525-533 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:582-590 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:614-622 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:835-843 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:871-879 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:923-931 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:964-972 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:997-1005 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1063-1071 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1641-1649 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:737-748 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:519-528 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:579-588 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:687-696 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:859-867 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:919-927 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:974-982 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:179-187 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:209-217 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:266-274 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:307-315 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:352-360 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:540-548 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:592-600 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:637-645 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:43-51 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:104-112 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:166-174 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:228-236 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:351-359 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:412-420 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:478-486 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:539-547 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` as WHOLE FILES: this scan already matched 47 separate duplicated blocks between them, totalling at least 481 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 `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:161` 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 (9–12 lines × 30) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:331— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:331-339 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:383-391 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:433-441 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:483-491 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:520-528 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:577-585 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:939-947 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1039-1047 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1107-1115 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1210-1218 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1264-1272 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1516-1524 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1636-1644 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1205-1216 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:540-549 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:229-237 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:261-269 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:322-330 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:367-375 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:264-272 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:337-345 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:452-460 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:555-563 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:607-615 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:632-640 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:78-86 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:139-147 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:201-209 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:263-271 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1407-1418 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` as WHOLE FILES: this scan already matched 47 separate duplicated blocks between them, totalling at least 481 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 `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:331` 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 (9–12 lines × 14) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:674— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:674-682 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:740-748 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1102-1110 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1165-1173 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1511-1519 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:847-858 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:883-894 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1198-1209 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:741-750 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:342-350 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:372-380 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:411-419 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:493-501 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1523-1534 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` as WHOLE FILES: this scan already matched 47 separate duplicated blocks between them, totalling at least 481 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 `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:674` 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 (9–12 lines × 11) libs/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:366— libs/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:366-374 | libs/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:538-547 | libs/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:587-598 | libs/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:620-631 | libs/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:667-676 | libs/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:698-709 | libs/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:773-784 | libs/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:850-861 | libs/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:925-934 | libs/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:1002-1013 | libs/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:1081-1092 — all 11 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 `libs/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:366` 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–12 lines × 5) feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/AliyunOssAdapter.kt:119— feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/AliyunOssAdapter.kt:119-128 | feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/AwsS3Adapter.kt:119-130 | feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/BaiduBosAdapter.kt:123-134 | feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/HuaweiObsAdapter.kt:117-126 | feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/TencentCosAdapter.kt:116-125 — before extracting anything, compare `feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/AliyunOssAdapter.kt` and `feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/TencentCosAdapter.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 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 `feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/vendor/AliyunOssAdapter.kt:119` 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 (11–12 lines × 3) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:307— feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:307-318 | feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/components/GifToolsControls.kt:61-71 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt:307-318 — before extracting anything, compare `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt` and `feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 239 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 (4–12 lines × 5) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:527— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:527-538 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlDeploymentSubPipeline.kt:413-416 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlErdSubPipeline.kt:388-399 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlObjectSubPipeline.kt:451-454 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlUsecaseSubPipeline.kt:627-638 — before extracting anything, compare `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt` and `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlDeploymentSubPipeline.kt` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 163 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 `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:527` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlErdSubPipeline.kt:387` calls `anchoredNoteRect` and `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlDeploymentSubPipeline.kt:413` 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–20 lines × 2) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessGameScreen.kt:123— feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessGameScreen.kt:123-142 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuGameScreen.kt:120-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 `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessGameScreen.kt:123` 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–12 lines × 2) libs/markdown/src/upstream/java/com/hrm/markdown/renderer/RendererContext.kt:117— libs/markdown/src/upstream/java/com/hrm/markdown/renderer/RendererContext.kt:117-124 | libs/markdown/src/upstream/java/com/hrm/markdown/renderer/inline/InlineWidgets.kt:39-50 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (8–11 lines × 41) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:172— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:172-179 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:222-229 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:327-334 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:379-386 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:429-436 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:479-486 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:536-543 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:588-595 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:620-627 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:841-848 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:882-889 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1035-1042 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1074-1081 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1176-1183 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1647-1654 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:667-677 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:745-755 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:536-544 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:591-599 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:704-712 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:715-722 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:880-887 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:935-942 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:990-997 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:185-192 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:225-232 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:277-284 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:318-325 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:363-370 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:446-453 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:260-267 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:383-390 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:551-558 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:603-610 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:74-81 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:135-142 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:197-204 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:259-266 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:387-394 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:433-440 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:499-506 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` as WHOLE FILES: this scan already matched 47 separate duplicated blocks between them, totalling at least 481 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 `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:172` 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–11 lines × 32) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:157— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:157-164 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:207-214 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:258-265 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:459-466 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:670-677 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:767-774 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:867-874 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:919-926 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1098-1105 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1131-1138 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1507-1514 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:780-790 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:515-522 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:575-582 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:637-644 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:683-690 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:828-835 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:915-922 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:970-977 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:165-172 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:303-310 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:348-355 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:393-400 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:485-492 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:536-543 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:368-375 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:407-414 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:463-470 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:489-496 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:295-302 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:474-481 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:535-542 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` as WHOLE FILES: this scan already matched 47 separate duplicated blocks between them, totalling at least 481 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 `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:157` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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–11 lines × 30) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:302— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:302-309 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:354-361 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:404-411 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:610-617 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:711-718 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:926-933 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:960-967 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:993-1000 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1161-1168 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1206-1213 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1251-1258 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1632-1639 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1758-1768 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:841-851 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:877-887 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1192-1202 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:737-744 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:855-862 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:205-212 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:536-543 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:588-595 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:628-635 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:39-46 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:100-107 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:162-169 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:224-231 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:285-292 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:347-354 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:408-415 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1375-1385 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` as WHOLE FILES: this scan already matched 47 separate duplicated blocks between them, totalling at least 481 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 `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:302` 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, `libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:532` calls `param` and `libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1189` 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–11 lines × 24) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:167— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:167-174 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:217-224 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:312-319 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:322-329 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:364-371 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:374-381 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:414-421 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:424-431 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:877-884 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:970-977 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1003-1010 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1030-1037 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:591-601 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:586-593 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:865-872 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:875-882 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:313-320 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:358-365 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:289-296 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:299-306 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:328-335 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:546-553 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:598-605 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:64-71 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` as WHOLE FILES: this scan already matched 47 separate duplicated blocks between them, totalling at least 481 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 `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:167` 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–11 lines × 12) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:516— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:516-523 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:816-823 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:934-941 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:626-636 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:710-720 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:803-810 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:257-264 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:526-533 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:333-340 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:448-455 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:372-379 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:545-552 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt` as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 445 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 `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:516` 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 (10–11 lines × 8) libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:923— libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:923-932 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1203-1212 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1248-1257 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1190-1200 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:533-542 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:585-594 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1373-1383 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1711-1721 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 544 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 `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:923` 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, `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:921` calls `param` and `libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1189` 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 × 6) feature/app/src/main/java/com/wanbaohe/app/ui/VerifyContactSheet.kt:135— feature/app/src/main/java/com/wanbaohe/app/ui/VerifyContactSheet.kt:135-145 | feature/app/src/main/java/com/wanbaohe/app/ui/VerifyContactSheet.kt:169-179 | feature/profile/src/main/java/com/wanbaohe/profile/screen/BindEmailSheet.kt:105-115 | feature/profile/src/main/java/com/wanbaohe/profile/screen/BindEmailSheet.kt:138-148 | feature/profile/src/main/java/com/wanbaohe/profile/screen/ChangePasswordSheet.kt:128-138 | feature/profile/src/main/java/com/wanbaohe/profile/screen/VerifyEmailSheet.kt:121-131 — before extracting anything, compare `feature/app/src/main/java/com/wanbaohe/app/ui/VerifyContactSheet.kt` and `feature/profile/src/main/java/com/wanbaohe/profile/screen/BindEmailSheet.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 75 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 `feature/app/src/main/java/com/wanbaohe/app/ui/VerifyContactSheet.kt:135` 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, `feature/profile/src/main/java/com/wanbaohe/profile/screen/VerifyEmailSheet.kt:132` calls `Spacer`, `width`, `SendConfirmEmailCodeButton` and `feature/app/src/main/java/com/wanbaohe/app/ui/VerifyContactSheet.kt:146` 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 × 5) feature/lifetime/src/main/java/com/shifenmiao/lifetime/domain/MilestoneInsightService.kt:56— feature/lifetime/src/main/java/com/shifenmiao/lifetime/domain/MilestoneInsightService.kt:56-66 | feature/poem/src/main/java/com/wanbaohe/poem/service/PoemInsightService.kt:62-72 | feature/poem/src/main/java/com/wanbaohe/poem/service/PoemInsightService.kt:90-100 | feature/poem/src/main/java/com/wanbaohe/poem/service/PoemInsightService.kt:112-122 | feature/record-center/src/main/java/com/wanbaohe/recordcenter/service/HealthInsightService.kt:69-79 — there are 5 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `feature/lifetime/src/main/java/com/shifenmiao/lifetime/domain/MilestoneInsightService.kt:56` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `feature/lifetime/src/main/java/com/shifenmiao/lifetime/domain/MilestoneInsightService.kt:67` calls `addInsight` and `feature/record-center/src/main/java/com/wanbaohe/recordcenter/service/HealthInsightService.kt:80` 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–11 lines × 4) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlArchimateSubPipeline.kt:439— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlArchimateSubPipeline.kt:439-449 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlC4SubPipeline.kt:488-496 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlDitaaSubPipeline.kt:320-328 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlNetworkSubPipeline.kt:465-475 — 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 `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlArchimateSubPipeline.kt:439` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9–11 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessSetupScreen.kt:211— feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessSetupScreen.kt:211-219 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuSetupScreen.kt:200-210 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiSetupScreen.kt:208-217 — before extracting anything, compare `feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuSetupScreen.kt` and `feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiSetupScreen.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 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 `feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessSetupScreen.kt:211` 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 (10–11 lines × 3) feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/screenLogic/ImageStitchingComponent.kt:169— feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/screenLogic/ImageStitchingComponent.kt:169-178 | feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/screenLogic/ImageStitchingComponent.kt:206-216 | feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/screenLogic/ImageStitchingComponent.kt:309-319 — 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/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/screenLogic/ImageStitchingComponent.kt:169` 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–11 lines × 2) feature/ai/src/main/java/com/shifenmiao/ai/utils/AiUtils.kt:745— feature/ai/src/main/java/com/shifenmiao/ai/utils/AiUtils.kt:745-755 | feature/ai/src/main/java/com/shifenmiao/ai/utils/AiUtils.kt:772-779 — 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/ai/src/main/java/com/shifenmiao/ai/utils/AiUtils.kt:745` 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 × 15) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:347— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:347-356 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:499-508 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:551-560 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:603-612 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:907-916 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:498-507 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:558-567 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:730-739 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:791-800 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:848-857 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:245-254 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:32-41 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:155-164 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:217-226 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:340-349 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt` as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 518 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 `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:347` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 14) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidArchitectureSubPipeline.kt:362— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidArchitectureSubPipeline.kt:362-371 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidC4SubPipeline.kt:425-434 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidC4SubPipeline.kt:495-504 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidErSubPipeline.kt:235-244 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidRequirementSubPipeline.kt:165-174 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlActivitySubPipeline.kt:546-555 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlArchimateSubPipeline.kt:292-301 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlC4SubPipeline.kt:422-431 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:816-825 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlDeploymentSubPipeline.kt:472-481 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlErdSubPipeline.kt:189-198 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlNetworkSubPipeline.kt:408-417 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlObjectSubPipeline.kt:283-292 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlUsecaseSubPipeline.kt:410-419 — before extracting anything, compare `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidArchitectureSubPipeline.kt` and `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidC4SubPipeline.kt` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 91 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 `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidArchitectureSubPipeline.kt:362` 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, `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidC4SubPipeline.kt:505` calls `edgePresentationSnapshot`, `C4EdgePresentation`, `edgeLinkSnapshot` and `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidArchitectureSubPipeline.kt:372` 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 (8–10 lines × 13) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlClassSubPipeline.kt:140— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlClassSubPipeline.kt:140-147 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:318-325 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:968-975 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlObjectSubPipeline.kt:190-197 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlObjectSubPipeline.kt:228-235 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlSequenceSubPipeline.kt:126-133 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlSequenceSubPipeline.kt:161-168 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlSequenceSubPipeline.kt:177-186 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlStateSubPipeline.kt:116-123 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlStateSubPipeline.kt:238-245 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlStateSubPipeline.kt:268-275 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlUsecaseSubPipeline.kt:205-214 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlUsecaseSubPipeline.kt:352-359 — before extracting anything, compare `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt` and `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlObjectSubPipeline.kt` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 145 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 `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlClassSubPipeline.kt:140` 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 (10 lines × 8) libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:115— libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:115-124 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1022-1031 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:582-592 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:651-661 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:799-811 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:428-437 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:242-251 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:281-290 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 544 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 `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:115` 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 × 6) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/preferences/ScreenPreference.kt:50— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/preferences/ScreenPreference.kt:50-59 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/preferences/ScreenPreference.kt:62-71 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/preferences/ScreenPreference.kt:74-83 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/preferences/ScreenPreference.kt:86-95 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/preferences/ScreenPreference.kt:98-107 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/preferences/ScreenPreference.kt:110-119 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (9–10 lines × 6) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:684— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:684-692 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:725-733 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:646-654 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:767-776 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:494-502 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:442-450 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt` as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 518 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 `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:684` 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–10 lines × 2) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/FiltersContentControls.kt:141— feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/FiltersContentControls.kt:141-150 | feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/components/FilterEditOption.kt:174-181 — 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 `feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/FiltersContentControls.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 (9 lines × 144) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:43— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:43-51 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:57-65 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:71-79 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:85-93 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:99-107 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:113-121 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:126-134 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:49-57 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:65-73 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:81-89 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:168-176 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:209-217 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:246-254 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:262-270 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:278-286 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:294-302 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:331-339 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:347-355 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:363-371 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:379-387 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:416-424 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:432-440 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:448-456 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:500-508 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:516-524 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:532-540 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:584-592 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:600-608 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:616-624 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:668-676 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:684-692 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:700-708 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:749-757 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:767-775 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:785-793 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:803-811 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:839-847 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:853-861 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:867-875 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:881-889 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1294-1302 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1310-1318 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1326-1334 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1342-1350 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1550-1558 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1570-1578 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1590-1598 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1678-1686 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1696-1704 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1714-1722 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:48-56 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:64-72 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:80-88 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:118-126 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:134-142 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:150-158 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:188-196 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:204-212 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:220-228 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:258-266 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:274-282 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:290-298 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:326-334 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:342-350 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:356-364 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:396-404 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:412-420 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:430-438 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:468-476 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:484-492 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:498-506 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:532-540 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:546-554 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:560-568 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1044-1052 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1060-1068 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1076-1084 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1114-1122 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1130-1138 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1146-1154 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:49-57 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:65-73 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:81-89 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:97-105 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:113-121 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:129-137 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:145-153 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:161-169 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:202-210 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:218-226 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:236-244 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:252-260 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:270-278 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:286-294 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:304-312 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:320-328 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:367-375 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:383-391 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:399-407 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:415-423 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:431-439 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:447-455 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:463-471 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:48-56 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:62-70 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:78-86 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:94-102 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:107-115 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:122-130 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:50-58 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:66-74 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:82-90 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:100-108 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:117-125 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:155-163 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:169-177 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:185-193 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:201-209 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:216-224 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:66-74 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:177-185 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:231-239 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:285-293 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:339-347 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:395-403 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:451-459 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:499-507 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:547-555 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:597-605 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:647-655 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:697-705 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:747-755 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:792-800 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:839-847 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:886-894 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:933-941 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:983-991 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1031-1039 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1079-1087 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1127-1135 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1179-1187 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1231-1239 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1283-1291 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1335-1343 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` as WHOLE FILES: this scan already matched 47 separate duplicated blocks between them, totalling at least 481 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:746` calls `PointF` and `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:41` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 56) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:149— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:149-157 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:199-207 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:250-258 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:299-307 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:351-359 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:401-409 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:451-459 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:503-511 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:555-563 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:607-615 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:657-665 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:708-716 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:759-767 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:808-816 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:859-867 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:911-919 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:957-965 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:990-998 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1090-1098 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1158-1166 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1499-1507 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1629-1637 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1756-1765 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:617-626 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:839-848 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:875-884 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:502-510 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:562-570 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:675-683 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:734-742 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:795-803 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:852-860 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:907-915 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:962-970 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:157-165 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:202-210 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:249-257 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:295-303 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:340-348 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:385-393 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:518-526 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:320-328 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:360-368 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:399-407 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:440-448 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:481-489 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:625-633 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:36-44 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:97-105 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:159-167 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:221-229 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:282-290 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:344-352 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:405-413 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:466-474 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:527-535 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` as WHOLE FILES: this scan already matched 47 separate duplicated blocks between them, totalling at least 481 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 `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:149` 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, `libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:156` calls `param` and `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:148` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7–9 lines × 50) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:147— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:147-154 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:197-204 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:248-255 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:297-304 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:349-356 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:399-406 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:449-456 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:501-508 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:553-560 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:605-612 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:655-662 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:706-713 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:757-764 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:806-813 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:857-864 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:909-916 | libs/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:203-209 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:955-962 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1156-1163 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1497-1504 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1627-1634 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1754-1762 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:500-507 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:560-567 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:673-680 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:732-739 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:793-800 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:850-857 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:905-912 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:960-967 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:200-207 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:247-254 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:293-300 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:338-345 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:383-390 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:516-523 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:318-325 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:358-365 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:438-445 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:479-486 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:623-630 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:34-41 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:95-102 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:157-164 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:219-226 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:280-287 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:342-349 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:403-410 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:464-471 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:525-532 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` as WHOLE FILES: this scan already matched 47 separate duplicated blocks between them, totalling at least 481 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 `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:147` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 × 28) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:175— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:175-182 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:225-232 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:330-337 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:382-389 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:432-439 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:482-489 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:783-790 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:885-892 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1038-1045 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:539-547 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:594-602 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:707-715 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:883-890 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:938-945 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:993-1000 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:228-235 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:321-328 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:366-373 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:449-456 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:263-270 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:554-561 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:606-613 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:77-84 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:138-145 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:200-207 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:262-269 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:436-443 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:502-509 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` as WHOLE FILES: this scan already matched 47 separate duplicated blocks between them, totalling at least 481 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 `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:175` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:173` calls `listOf` and `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:781` 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 (8–9 lines × 27) libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:52— libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:52-59 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:108-116 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:125-132 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:163-170 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:217-224 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:271-278 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:325-332 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:381-388 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:433-440 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:487-494 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:535-542 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:583-590 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:633-640 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:683-690 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:733-740 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:778-785 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:825-832 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:872-879 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:919-926 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:971-978 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1019-1026 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1067-1074 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1115-1122 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1165-1172 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1217-1224 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1269-1276 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1321-1328 — all 27 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:61` calls `add`, `PointF` and `libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:497` 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 × 8) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:664— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:664-672 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:720-728 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:730-738 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:825-833 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:509-517 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:569-577 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:626-634 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:479-487 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt` as WHOLE FILES: this scan already matched 50 separate duplicated blocks between them, totalling at least 518 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 `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:664` 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–9 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/CreateGameUseCase.kt:62— feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/CreateGameUseCase.kt:62-67 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/CreateGameUseCase.kt:64-70 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/usecase/CreateGameUseCase.kt:71-79 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/CreateGameUseCase.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/CreateGameUseCase.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 71 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 `feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/CreateGameUseCase.kt:64` 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. Note first that the copies are not typed on the same thing: `EngineSlot` names `com.wanbaohe.chess.application.port.outbound.EngineSlot` in one and `com.wanbaohe.gomoku.application.port.outbound.EngineSlot` 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 (1–9 lines × 5) libs/diagram/src/upstream/java/com/hrm/diagram/render/export/FamilyOneShotRenderers.kt:558— libs/diagram/src/upstream/java/com/hrm/diagram/render/export/FamilyOneShotRenderers.kt:558-565 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidClassSubPipeline.kt:446-446 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidSequenceSubPipeline.kt:224-224 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlClassSubPipeline.kt:380-387 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlSequenceSubPipeline.kt:403-411 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `libs/diagram/src/upstream/java/com/hrm/diagram/render/export/FamilyOneShotRenderers.kt:558` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (6–9 lines × 2) feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:261— feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:261-266 | feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/screenLogic/SingleEditComponent.kt:489-497 — before extracting anything, compare `feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt` and `feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/screenLogic/SingleEditComponent.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 108 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 `feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:261` 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 lines × 50) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:171— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:171-178 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:221-228 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:316-323 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:326-333 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:368-375 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:378-385 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:418-425 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:428-435 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:478-485 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:530-537 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:587-594 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:619-626 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:840-847 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:881-888 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:928-935 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1034-1041 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1068-1075 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1175-1182 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1646-1653 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:666-675 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:744-753 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:535-543 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:590-598 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:703-711 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:714-721 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:869-876 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:879-886 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:934-941 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:989-996 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:184-191 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:224-231 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:271-278 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:317-324 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:362-369 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:445-452 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:259-266 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:293-300 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:382-389 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:550-557 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:602-609 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:68-75 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:119-126 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:134-141 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:196-203 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:243-250 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:258-265 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:366-373 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:386-393 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:432-439 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:498-505 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` as WHOLE FILES: this scan already matched 47 separate duplicated blocks between them, totalling at least 481 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 `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.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 (8 lines × 41) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:161— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:161-168 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:211-218 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:306-313 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:358-365 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:408-415 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:463-470 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:614-621 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:674-681 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:871-878 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:923-930 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:964-971 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:997-1004 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1102-1109 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1165-1172 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1511-1518 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:847-856 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:883-892 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1198-1207 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:519-527 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:579-587 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:687-695 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:741-749 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:859-866 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:919-926 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:974-981 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:209-216 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:307-314 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:352-359 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:372-379 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:411-418 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:493-500 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:540-547 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:592-599 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:43-50 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:104-111 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:166-173 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:228-235 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:351-358 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:412-419 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:478-485 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:539-546 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` as WHOLE FILES: this scan already matched 47 separate duplicated blocks between them, totalling at least 481 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 `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:161` 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 × 40) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:31— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:31-38 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:35-42 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:154-161 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:232-239 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:317-324 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:402-409 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:486-493 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:570-577 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:654-661 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:733-740 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:827-834 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1280-1287 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1532-1539 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1662-1669 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:34-41 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:104-111 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:174-181 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:244-251 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:314-321 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:380-387 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:454-461 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:520-527 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:970-977 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1030-1037 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1100-1107 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:35-42 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:186-193 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:353-360 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:34-41 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:34-41 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:143-150 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:92-99 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:957-964 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1005-1012 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1053-1060 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1101-1108 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1149-1156 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1201-1208 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1253-1260 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1305-1312 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` as WHOLE FILES: this scan already matched 47 separate duplicated blocks between them, totalling at least 481 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:44` calls `add`, `PointF` and `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:41` 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 (8 lines × 35) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:166— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:166-173 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:216-223 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:311-318 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:321-328 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:363-370 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:373-380 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:413-420 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:423-430 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:515-522 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:815-822 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:876-883 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:933-940 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:969-976 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1002-1009 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1029-1036 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:590-599 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:625-634 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:709-718 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:584-592 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:802-809 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:864-871 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:874-881 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:256-263 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:312-319 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:357-364 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:525-532 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:288-295 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:298-305 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:327-334 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:447-454 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:545-552 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:597-604 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:63-70 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:371-378 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:544-551 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` as WHOLE FILES: this scan already matched 47 separate duplicated blocks between them, totalling at least 481 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 `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:166` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7–8 lines × 34) libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:97— libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:97-103 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:184-190 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:464-470 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:548-554 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:632-638 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:716-722 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1610-1616 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:935-941 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:986-992 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1013-1019 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:479-485 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:50-56 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:106-113 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:123-129 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:161-167 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:215-221 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:269-275 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:323-329 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:379-385 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:431-437 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:485-491 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:533-539 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:581-587 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:631-637 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:681-687 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:731-737 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:969-975 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1017-1023 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1065-1071 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1113-1119 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1163-1169 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1215-1221 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1267-1273 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1319-1325 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 544 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:932` calls `PointF` and `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:94` 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 × 32) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:181— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:181-188 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:231-238 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:280-287 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:689-696 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:735-742 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:789-796 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:830-837 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:891-898 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:943-950 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1140-1147 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1220-1227 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:816-827 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:601-608 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:656-663 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:773-780 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:812-819 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:889-896 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:944-951 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:999-1006 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:174-181 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:411-418 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:455-462 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:499-506 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:545-552 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:421-428 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:503-510 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:647-654 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:324-331 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:381-388 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:447-454 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:508-515 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:554-561 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` as WHOLE FILES: this scan already matched 47 separate duplicated blocks between them, totalling at least 481 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 `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:181` 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 × 28) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:176— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:176-183 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:226-233 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:275-282 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:639-646 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:679-686 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:715-722 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:784-791 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:820-827 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:886-893 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:938-945 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:808-819 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:595-603 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:746-754 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:807-814 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:884-891 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:939-946 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:994-1001 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:169-176 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:406-413 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:450-457 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:530-537 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:416-423 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:498-505 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:289-296 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:376-383 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:437-444 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:503-510 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:549-556 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt` as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 445 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 `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:176` 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, `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:173` calls `listOf` and `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:781` 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 × 24) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:473— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:473-480 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:572-579 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:634-641 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:127-141 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1771-1780 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:530-537 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:698-705 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:757-764 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:929-936 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:984-991 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:219-226 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:440-447 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:254-261 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:58-65 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:114-121 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:129-136 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:191-198 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:238-245 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:253-260 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:304-311 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:314-321 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:361-368 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:427-434 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:493-500 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` as WHOLE FILES: this scan already matched 47 separate duplicated blocks between them, totalling at least 481 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 `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:473` 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–8 lines × 14) libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:104— libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:104-110 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:723-729 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1617-1623 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1744-1750 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1020-1026 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:486-493 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1600-1606 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1808-1814 | libs/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:88-94 | libs/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:123-129 | libs/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:151-157 | libs/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:182-188 | libs/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:210-216 | libs/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:238-244 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 544 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 `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:104` 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 × 13) libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:36— libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:36-43 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:147-154 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:201-208 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:255-262 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:309-316 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:365-372 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:419-426 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:473-480 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:521-528 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:569-576 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:619-626 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:669-676 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:719-726 — all 13 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:45` calls `add`, `PointF` and `libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:429` 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 (8 lines × 11) libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:191— libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:191-198 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:915-922 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:942-949 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:993-1000 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:774-781 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:821-828 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:868-875 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:915-922 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1786-1793 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1799-1806 | libs/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:109-116 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 544 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 (2–8 lines × 12) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidArchitectureSubPipeline.kt:476— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidArchitectureSubPipeline.kt:476-483 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidBlockSubPipeline.kt:379-386 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidC4SubPipeline.kt:664-671 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidErSubPipeline.kt:619-620 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidRequirementSubPipeline.kt:492-499 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlActivitySubPipeline.kt:650-657 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:949-956 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlDeploymentSubPipeline.kt:609-616 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlErdSubPipeline.kt:697-704 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlObjectSubPipeline.kt:333-340 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlStateSubPipeline.kt:353-360 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlUsecaseSubPipeline.kt:459-466 — before extracting anything, compare `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidArchitectureSubPipeline.kt` and `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidC4SubPipeline.kt` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 91 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidArchitectureSubPipeline.kt:483` calls `Point` and `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidErSubPipeline.kt:620` does not — after which the two agree again for 5 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 7) libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1135— libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1135-1142 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1764-1773 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:641-648 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:832-839 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:489-496 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:540-547 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:299-306 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 524 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 `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1135` 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–8 lines × 2) feature/lifetime/src/main/java/com/shifenmiao/lifetime/domain/LifeTimeCalculator.kt:71— feature/lifetime/src/main/java/com/shifenmiao/lifetime/domain/LifeTimeCalculator.kt:71-78 | feature/lifetime/src/main/java/com/shifenmiao/lifetime/domain/LifeTimeCalculator.kt:114-119 — 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 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 (4–8 lines × 3) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlArchimateSubPipeline.kt:610— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlArchimateSubPipeline.kt:610-617 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlDitaaSubPipeline.kt:337-344 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlUsecaseSubPipeline.kt:392-395 — 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 `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlArchimateSubPipeline.kt:610` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlArchimateSubPipeline.kt:617` calls `MoveTo`, `Point` and `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlUsecaseSubPipeline.kt:395` does not — after which the two agree again for 5 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 54) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:166— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:166-172 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:216-222 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:311-317 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:321-327 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:363-369 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:373-379 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:413-419 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:423-429 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:468-474 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:515-521 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:567-573 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:815-821 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:876-882 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:933-939 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:122-128 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:969-975 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1002-1008 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1029-1035 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:590-598 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:625-633 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:709-717 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:524-531 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:584-591 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:692-699 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:802-808 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:864-870 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:874-880 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:924-930 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:979-985 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:214-220 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:256-262 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:312-318 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:357-363 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:435-441 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:525-531 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:249-255 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:288-294 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:298-304 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:327-333 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:447-453 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:545-551 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:597-603 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:48-54 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:63-69 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:109-115 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:124-130 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:171-177 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:233-239 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:248-254 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:356-362 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:371-377 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:417-423 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:483-489 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:544-550 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` as WHOLE FILES: this scan already matched 47 separate duplicated blocks between them, totalling at least 481 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 `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:166` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 49) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:171— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:171-177 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:221-227 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:316-322 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:326-332 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:368-374 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:378-384 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:418-424 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:428-434 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:478-484 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:530-536 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:587-593 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:619-625 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:840-846 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:881-887 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:928-934 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1034-1040 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1068-1074 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1646-1652 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:744-752 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:535-542 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:590-597 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:703-710 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:762-769 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:869-875 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:879-885 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:934-940 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:989-995 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:184-190 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:224-230 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:271-277 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:317-323 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:362-368 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:445-451 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:259-265 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:293-299 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:550-556 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:602-608 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:642-648 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:68-74 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:119-125 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:134-140 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:196-202 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:243-249 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:258-264 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:309-315 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:319-325 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:366-372 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:432-438 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:498-504 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` as WHOLE FILES: this scan already matched 47 separate duplicated blocks between them, totalling at least 481 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 `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.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 (7 lines × 48) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:161— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:161-167 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:211-217 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:306-312 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:358-364 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:408-414 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:463-469 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:614-620 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:674-680 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:871-877 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:923-929 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:964-970 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:997-1003 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1102-1108 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1135-1141 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1165-1171 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1511-1517 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1764-1772 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:847-855 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:883-891 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1198-1206 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:519-526 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:579-586 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:641-647 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:687-694 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:741-748 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:832-838 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:859-865 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:919-925 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:974-980 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:209-215 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:307-313 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:352-358 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:489-495 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:540-546 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:372-378 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:411-417 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:493-499 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:540-546 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:592-598 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:43-49 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:104-110 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:166-172 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:228-234 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:299-305 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:351-357 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:412-418 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:478-484 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:539-545 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` as WHOLE FILES: this scan already matched 47 separate duplicated blocks between them, totalling at least 481 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 `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:161` 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 × 43) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:171— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:171-177 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:221-227 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:316-322 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:326-332 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:368-374 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:378-384 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:418-424 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:428-434 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:478-484 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:881-887 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:135-145 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:974-980 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1007-1013 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1034-1040 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:597-605 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:535-542 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:590-597 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:703-710 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:762-769 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:869-875 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:879-885 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:934-940 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:989-995 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:224-230 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:317-323 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:362-368 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:445-451 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:259-265 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:293-299 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:303-309 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:550-556 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:602-608 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:68-74 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:119-125 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:134-140 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:196-202 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:243-249 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:258-264 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:309-315 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:319-325 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:366-372 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:432-438 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:498-504 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` as WHOLE FILES: this scan already matched 47 separate duplicated blocks between them, totalling at least 481 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 `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.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 (6–7 lines × 40) libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:39— libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:39-44 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:54-60 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:111-117 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:127-133 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:150-155 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:165-171 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:204-209 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:219-225 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:258-263 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:273-279 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:312-317 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:327-333 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:368-373 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:383-389 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:422-427 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:435-441 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:476-481 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:489-495 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:524-529 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:537-543 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:572-577 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:585-591 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:622-627 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:635-641 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:672-677 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:685-691 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:722-727 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:735-741 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:780-786 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:827-833 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:874-880 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:921-927 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:973-979 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1021-1027 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1069-1075 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1117-1123 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1167-1173 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1219-1225 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1271-1277 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1323-1329 — all 40 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:45` calls `add`, `PointF` and `libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:429` 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 (7 lines × 32) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:176— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:176-182 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:226-232 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:275-281 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:331-337 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:383-389 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:433-439 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:483-489 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:784-790 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:886-892 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:939-945 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1039-1045 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1264-1270 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:540-547 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:595-602 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:708-715 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:884-890 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:939-945 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:994-1000 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:229-235 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:322-328 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:367-373 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:406-412 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:450-456 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:264-270 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:555-561 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:607-613 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:78-84 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:139-145 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:201-207 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:263-269 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:437-443 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:503-509 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` as WHOLE FILES: this scan already matched 47 separate duplicated blocks between them, totalling at least 481 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 `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:176` 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, `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:173` calls `listOf` and `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:781` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 24) libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:99— libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:99-105 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:186-192 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:466-472 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:550-556 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:634-640 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:718-724 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1379-1385 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1392-1398 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1405-1411 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1446-1452 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1458-1464 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1470-1476 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1612-1618 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:937-943 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:988-994 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1015-1021 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:481-487 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1479-1485 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1595-1601 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1627-1633 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1750-1756 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1803-1809 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1831-1837 | libs/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:113-119 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 544 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1592` calls `PointF` and `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:98` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 18) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:520— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:520-526 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:577-583 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:639-645 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:715-721 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:820-826 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:938-944 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1210-1216 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1636-1642 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:807-813 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:169-175 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:261-267 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:530-536 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:337-343 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:452-458 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:632-638 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:289-295 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:376-382 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:549-555 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` as WHOLE FILES: this scan already matched 47 separate duplicated blocks between them, totalling at least 481 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 `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:520` 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 × 12) libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1366— libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1366-1372 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1434-1440 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:910-916 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:769-775 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:816-822 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:863-869 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:910-916 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1464-1470 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1614-1620 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1738-1744 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1818-1824 | libs/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:98-105 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 544 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 × 11) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:725— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:725-731 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:735-741 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:830-836 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1140-1146 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1220-1226 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:646-652 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:767-774 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:494-500 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:545-551 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:647-653 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:324-330 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` as WHOLE FILES: this scan already matched 47 separate duplicated blocks between them, totalling at least 481 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 `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:725` 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 × 10) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:525— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:525-531 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:582-588 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:740-746 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:835-841 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1215-1221 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1641-1647 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:179-185 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:266-272 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:342-348 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:637-643 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` as WHOLE FILES: this scan already matched 47 separate duplicated blocks between them, totalling at least 481 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 `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:525` 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 × 8) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:720— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:720-726 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:730-736 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:825-831 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1130-1136 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:626-632 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:479-485 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:535-541 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:294-300 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` as WHOLE FILES: this scan already matched 47 separate duplicated blocks between them, totalling at least 481 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 `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:720` 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 × 56) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:148— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:148-155 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:198-205 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:249-256 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:298-305 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:350-357 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:400-407 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:450-457 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:502-509 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:554-561 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:606-613 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:656-663 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:707-714 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:758-765 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:807-814 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:858-865 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:910-917 | libs/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:204-209 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:956-963 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:989-996 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1089-1096 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1157-1164 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1498-1505 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1628-1635 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1755-1763 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:616-624 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:838-846 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:874-882 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:501-508 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:561-568 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:674-681 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:733-740 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:794-801 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:851-858 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:906-913 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:961-968 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:201-208 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:248-255 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:294-301 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:339-346 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:384-391 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:517-524 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:319-326 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:359-366 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:398-405 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:439-446 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:480-487 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:624-631 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:35-42 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:96-103 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:158-165 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:220-227 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:281-288 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:343-350 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:404-411 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:465-472 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:526-533 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` as WHOLE FILES: this scan already matched 47 separate duplicated blocks between them, totalling at least 481 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 `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:148` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 × 42) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:174— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:174-179 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:224-229 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:329-334 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:381-386 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:431-436 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:481-486 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:538-543 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:590-595 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:622-627 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:782-787 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:843-848 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:884-889 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1037-1042 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1076-1081 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1178-1183 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1649-1654 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:669-677 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:747-755 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:538-544 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:593-599 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:706-712 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:717-722 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:882-887 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:937-942 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:992-997 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:187-192 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:227-232 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:279-284 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:320-325 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:365-370 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:448-453 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:262-267 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:385-390 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:553-558 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:605-610 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:76-81 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:137-142 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:199-204 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:261-266 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:389-394 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:435-440 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:501-506 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` as WHOLE FILES: this scan already matched 47 separate duplicated blocks between them, totalling at least 481 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 `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:174` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:173` calls `listOf` and `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:781` 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 (6 lines × 26) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:181— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:181-186 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:231-236 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:280-285 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:644-649 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:684-689 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:789-794 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:891-896 | libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:943-948 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:816-824 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:601-606 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:651-656 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:773-778 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:812-817 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:889-894 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:944-949 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:999-1004 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:174-179 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:411-416 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:455-460 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:499-504 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:421-426 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:503-508 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:381-386 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:442-447 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:508-513 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:554-559 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt` as WHOLE FILES: this scan already matched 42 separate duplicated blocks between them, totalling at least 445 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 `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:181` 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–12 lines × 6) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidArchitectureSubPipeline.kt:377— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidArchitectureSubPipeline.kt:377-388 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidC4SubPipeline.kt:440-451 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidC4SubPipeline.kt:512-523 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidRequirementSubPipeline.kt:182-192 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlComponentSubPipeline.kt:831-841 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlDeploymentSubPipeline.kt:487-497 — before extracting anything, compare `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidArchitectureSubPipeline.kt` and `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidC4SubPipeline.kt` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 91 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidC4SubPipeline.kt:454` calls `Point` and `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidArchitectureSubPipeline.kt:391` 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 (6 lines × 5) libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1771— libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1771-1778 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:837-842 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:304-309 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:314-319 | libs/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:569-574 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 524 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 `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1771` 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–6 lines × 3) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidMindmapSubPipeline.kt:134— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidMindmapSubPipeline.kt:134-139 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidMindmapSubPipeline.kt:158-162 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlDeploymentSubPipeline.kt:398-403 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidMindmapSubPipeline.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. 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 (3–6 lines × 3) libs/diagram/src/upstream/java/com/hrm/diagram/render/export/FamilyOneShotRenderers.kt:538— libs/diagram/src/upstream/java/com/hrm/diagram/render/export/FamilyOneShotRenderers.kt:538-543 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidSequenceSubPipeline.kt:214-216 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlSequenceSubPipeline.kt:365-370 — 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 `libs/diagram/src/upstream/java/com/hrm/diagram/render/export/FamilyOneShotRenderers.kt:538` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlSequenceSubPipeline.kt:370` calls `LineTo`, `Point` and `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidSequenceSubPipeline.kt:216` 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 × 52) libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:139— libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:139-143 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:224-228 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:309-313 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:394-398 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:478-482 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:562-566 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:646-650 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:819-823 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:897-901 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1358-1362 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:96-100 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:166-170 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:236-240 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:306-310 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:372-376 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:446-450 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:512-516 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:574-578 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:962-966 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1092-1096 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1162-1166 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:177-182 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:344-349 | libs/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:141-146 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:134-139 | libs/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:231-236 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:84-88 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:139-143 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:193-197 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:247-251 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:301-305 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:357-361 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:411-415 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:465-469 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:513-517 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:561-565 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:611-615 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:661-665 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:711-715 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:761-765 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:808-812 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:855-859 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:902-906 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:949-953 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:997-1001 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1045-1049 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1093-1097 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1141-1145 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1193-1197 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1245-1249 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1297-1301 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1349-1353 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` as WHOLE FILES: this scan already matched 47 separate duplicated blocks between them, totalling at least 481 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 `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:139` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:222` calls `PointF` and `libs/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:137` 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 × 47) libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:102— libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:102-106 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:189-193 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:469-473 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:553-557 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:637-641 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:721-725 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1369-1373 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1382-1386 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1395-1399 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1408-1412 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1437-1441 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1449-1453 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1461-1465 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1473-1477 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1615-1619 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:913-917 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:940-944 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:991-995 | libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1018-1022 | libs/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:484-488 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:772-776 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:819-823 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:866-870 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:913-917 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1467-1471 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1482-1486 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1598-1602 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1617-1621 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1630-1634 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1680-1684 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1741-1745 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1753-1757 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1806-1810 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1821-1825 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1834-1838 | libs/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:77-81 | libs/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:86-90 | libs/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:102-106 | libs/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:116-120 | libs/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:140-144 | libs/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:149-153 | libs/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:164-168 | libs/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:179-184 | libs/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:199-203 | libs/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:208-212 | libs/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:227-231 | libs/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:236-240 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt` as WHOLE FILES: this scan already matched 52 separate duplicated blocks between them, totalling at least 544 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 10) libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1371— libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1371-1375 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1384-1388 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1397-1401 | libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1410-1414 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1619-1623 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1632-1636 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1667-1671 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1682-1686 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1823-1827 | libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1836-1840 — before extracting anything, compare `libs/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` and `libs/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt` as WHOLE FILES: this scan already matched 25 separate duplicated blocks between them, totalling at least 221 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 (2–5 lines × 6) libs/diagram/src/upstream/java/com/hrm/diagram/render/graph/GraphIrRenderer.kt:119— libs/diagram/src/upstream/java/com/hrm/diagram/render/graph/GraphIrRenderer.kt:119-121 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidBlockSubPipeline.kt:246-247 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidRequirementSubPipeline.kt:136-140 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidStateSubPipeline.kt:142-146 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlActivitySubPipeline.kt:485-489 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlStateSubPipeline.kt:178-182 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 6 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 6 times. Read the line range as the matched WINDOW rather than a finished unit: at `libs/diagram/src/upstream/java/com/hrm/diagram/render/graph/GraphIrRenderer.kt:119` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (3–5 lines × 4) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidClassSubPipeline.kt:449— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidClassSubPipeline.kt:449-453 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidErSubPipeline.kt:617-619 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidSequenceSubPipeline.kt:227-231 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidStateSubPipeline.kt:292-294 — before extracting anything, compare `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidClassSubPipeline.kt` and `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidStateSubPipeline.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 55 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidClassSubPipeline.kt:449` 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. 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 (4–5 lines × 3) libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidErSubPipeline.kt:229— libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidErSubPipeline.kt:229-233 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidRequirementSubPipeline.kt:160-163 | libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlErdSubPipeline.kt:183-187 — before extracting anything, compare `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidErSubPipeline.kt` and `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/plantuml/PlantUmlErdSubPipeline.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 144 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 `libs/diagram/src/upstream/java/com/hrm/diagram/render/streaming/mermaid/MermaidErSubPipeline.kt:229` 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 × 3) feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageChessTool.kt:257— feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageChessTool.kt:257-284 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageGomokuTool.kt:257-284 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageXiangqiTool.kt:257-284 — before extracting anything, compare `feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageChessTool.kt` and `feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ManageGomokuTool.kt` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 137 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.
Duplicated block (63 lines × 3) feature/chess/src/main/java/com/wanbaohe/chess/data/AudioAdapter.kt:39— feature/chess/src/main/java/com/wanbaohe/chess/data/AudioAdapter.kt:39-101 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/AudioAdapter.kt:39-101 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/AudioAdapter.kt:39-101 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/data/AudioAdapter.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/AudioAdapter.kt` as WHOLE FILES: 94% 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 `feature/chess/src/main/java/com/wanbaohe/chess/data/AudioAdapter.kt:39` 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. Note first that the copies are not typed on the same thing: `CachedAudio` names `com.wanbaohe.chess.application.port.outbound.CachedAudio` in one and `com.wanbaohe.gomoku.application.port.outbound.CachedAudio` 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 × 6) feature/chess/src/main/java/com/wanbaohe/chess/data/ChessAiPrefsAdapter.kt:43— feature/chess/src/main/java/com/wanbaohe/chess/data/ChessAiPrefsAdapter.kt:43-48 | feature/chess/src/main/java/com/wanbaohe/chess/data/SettingsPrefsAdapter.kt:41-48 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/GomokuAiPrefsAdapter.kt:43-48 | feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/SettingsPrefsAdapter.kt:41-48 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/SettingsPrefsAdapter.kt:41-48 | feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/data/XiangqiAiPrefsAdapter.kt:43-48 — before extracting anything, compare `feature/chess/src/main/java/com/wanbaohe/chess/data/SettingsPrefsAdapter.kt` and `feature/gomoku/src/main/java/com/wanbaohe/gomoku/data/SettingsPrefsAdapter.kt` 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. 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. Note first that the copies are not typed on the same thing: `AudioSettings` names `com.wanbaohe.chess.application.port.outbound.AudioSettings` in one and `com.wanbaohe.gomoku.application.port.outbound.AudioSettings` 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 × 6) feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/compress/screenLogic/CompressPdfToolComponent.kt:74— feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/compress/screenLogic/CompressPdfToolComponent.kt:74-85 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/pdf_to_images/screenLogic/ExtractPagesPdfToolComponent.kt:114-125 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rearrange/screenLogic/RearrangePdfToolComponent.kt:74-85 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_pages/screenLogic/RemovePagesPdfToolComponent.kt:73-84 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rotate/screenLogic/RotatePdfToolComponent.kt:73-84 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/split/screenLogic/SplitPdfToolComponent.kt:85-96 — before extracting anything, compare `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/compress/screenLogic/CompressPdfToolComponent.kt` and `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rearrange/screenLogic/RearrangePdfToolComponent.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 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/split/screenLogic/SplitPdfToolComponent.kt:83` calls `getKey` and `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/pdf_to_images/screenLogic/ExtractPagesPdfToolComponent.kt:112` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 11) core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/preferences/PreferenceItemsGrid.kt:105— core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/preferences/PreferenceItemsGrid.kt:105-110 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/preferences/PreferenceItemsGrid.kt:113-118 | core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/preferences/PreferenceItemsGrid.kt:121-126 | feature/app/src/main/java/com/wanbaohe/app/components/AddMenuFloatingPanel.kt:111-116 | feature/app/src/main/java/com/wanbaohe/app/components/AddMenuFloatingPanel.kt:119-124 | feature/common/src/main/java/com/shifenmiao/common/components/FeaturedComponents.kt:447-452 | feature/common/src/main/java/com/shifenmiao/common/components/FeaturedComponents.kt:455-460 | feature/common/src/main/java/com/shifenmiao/common/components/FeaturedComponents.kt:463-468 | feature/common/src/main/java/com/shifenmiao/common/components/FeaturedComponents.kt:471-476 | feature/marktodo/src/main/java/com/shifenmiao/marktodo/theme/MarkTodoThemeColors.kt:59-64 | feature/marktodo/src/main/java/com/shifenmiao/marktodo/theme/MarkTodoThemeColors.kt:67-72 — there are 11 copies across 4 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 11 sites; resolving a subset leaves the remainder to drift apart. Note first that the copies are not typed on the same thing: the declarations holding them bind `theme` to `PreferenceItemTheme): Color = when (theme` in one and `AddMenuItemTheme): Color = when (theme` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (9 lines × 7) feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/EditFileTool.kt:320— feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/EditFileTool.kt:320-328 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/GlobFilesTool.kt:115-123 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/GrepFilesTool.kt:120-128 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ProcessFileTool.kt:197-205 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/ReadMultipleFilesTool.kt:110-118 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/StatFileTool.kt:86-94 | feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/builtin/WorkspaceRootsTool.kt:67-75 — 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. 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–17 lines × 2) libs/twain/src/main/java/io/noties/markwon/prism4j/languages/Prism_javascript.java:69— libs/twain/src/main/java/io/noties/markwon/prism4j/languages/Prism_javascript.java:69-80 | libs/twain/src/main/java/io/noties/markwon/prism4j/languages/Prism_kotlin.java:63-79 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `libs/twain/src/main/java/io/noties/markwon/prism4j/languages/Prism_javascript.java: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. 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–12 lines × 3) feature/demo/src/main/java/com/shifenmiao/demo/screen/NavigationDeeplinkHelpSheet.kt:165— feature/demo/src/main/java/com/shifenmiao/demo/screen/NavigationDeeplinkHelpSheet.kt:165-176 | feature/demo/src/main/java/com/shifenmiao/demo/screen/NavigationDeeplinkHelpSheet.kt:179-190 | feature/demo/src/main/java/com/shifenmiao/demo/screen/NavigationDeeplinkHelpSheet.kt:191-198 — 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/demo/src/main/java/com/shifenmiao/demo/screen/NavigationDeeplinkHelpSheet.kt:165` 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.
Duplication concentrated across 3 sibling directories (7 clone groups) web/code-editor/build.js:47— 7 duplicated blocks under web/ have copies in at least two of the sibling directories code-editor, file_transfer, milkdown-editor — 6 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 7 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 7 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 7 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
Duplicated block (20 lines × 2 locations) web/code-editor/editor.src.js:438— web/code-editor/editor.src.js:438 · web/code-editor/editor.src.js:474 — 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.
R10 · Code Duplication· Duplicated block with local edits (17 matched lines × 2 locations) · ×1
Duplicated block with local edits (17 matched lines × 2 locations) web/file_transfer/js/core/api.js:93— web/file_transfer/js/core/api.js:93 · web/file_transfer/js/features/chat/fileUpload.js:93 — the two spans are one implementation copied and then locally edited — 133 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (16 lines × 2 locations) web/file_transfer/js/features/transfer/transfers.js:87— web/file_transfer/js/features/transfer/transfers.js:87 · web/file_transfer/js/features/upload/upload.js:381 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
Duplicated block (13 lines × 2 locations) web/code-editor/build.js:47— web/code-editor/build.js:47 · web/milkdown-editor/build.js:57 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication· Duplicated block with local edits (12 matched lines × 2 locations) · ×1
Duplicated block with local edits (12 matched lines × 2 locations) web/file_transfer/js/features/auth.js:22— web/file_transfer/js/features/auth.js:22 · web/file_transfer/js/features/files/files.js:21 — the two spans are one implementation copied and then locally edited — 72 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (10 lines × 3 locations) web/file_transfer/js/features/files/ops.js:31— web/file_transfer/js/features/files/ops.js:31 · web/file_transfer/js/features/files/ops.js:74 · web/file_transfer/js/features/files/ops.js:93 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication· Duplicated block with local edits (10 matched lines × 2 locations) · ×1
Duplicated block with local edits (10 matched lines × 2 locations) web/file_transfer/js/features/upload/upload.js:551— web/file_transfer/js/features/upload/upload.js:551 · web/file_transfer/js/features/upload/upload.js:622 — the two spans are one implementation copied and then locally edited — 64 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (9 lines × 3 locations) web/code-editor/editor.src.js:498— web/code-editor/editor.src.js:498 · web/code-editor/editor.src.js:620 · web/milkdown-editor/editor.src.js:1318 — the 3 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication· Duplicated block with local edits (8 matched lines × 2 locations) · ×1
Duplicated block with local edits (8 matched lines × 2 locations) web/file_transfer/js/features/files/render.js:101— web/file_transfer/js/features/files/render.js:101 · web/file_transfer/js/features/files/render.js:151 — the two spans are one implementation copied and then locally edited — 65 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (7 lines × 4 locations) REDACTED:187— REDACTED:187 · REDACTED:239 · REDACTED:380 · REDACTED:413 — 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.
Duplicated block (7 lines × 3 locations) web/file_viewer/src/prose-odt.js:228— web/file_viewer/src/prose-odt.js:228 · web/file_viewer/src/prose-odt.js:263 · web/file_viewer/src/prose-odt.js:282 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication· Duplicated block with local edits (6 matched lines × 2 locations) · ×1
Duplicated block with local edits (6 matched lines × 2 locations) web/file_viewer/src/docx-night.js:122— web/file_viewer/src/docx-night.js:122 · web/file_viewer/src/docx-night.js:133 — the two spans are one implementation copied and then locally edited — 51 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Complex function rtfWord (cyclomatic 149, cognitive 58) web/file_viewer/src/prose-rtf.js:629— rtfWord has cyclomatic complexity 149 and cognitive complexity 58; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function docApplyTap (cyclomatic 85, cognitive 152) web/file_viewer/src/prose-doc.js:387— docApplyTap has cyclomatic complexity 85 and cognitive complexity 152; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function rewrite (cyclomatic 81, cognitive 145) REDACTED:1417— rewrite has cyclomatic complexity 81 and cognitive complexity 145; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function vwReadRtf (cyclomatic 74, cognitive 145) web/file_viewer/src/prose-rtf.js:1027— vwReadRtf has cyclomatic complexity 74 and cognitive complexity 145; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function odtReadStyle (cyclomatic 65, cognitive 116) web/file_viewer/src/prose-odt.js:164— odtReadStyle has cyclomatic complexity 65 and cognitive complexity 116; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function docDrawTable (cyclomatic 63, cognitive 141) web/file_viewer/src/prose-doc.js:1682— docDrawTable has cyclomatic complexity 63 and cognitive complexity 141; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function docDrawParagraph (cyclomatic 55, cognitive 121) web/file_viewer/src/prose-doc.js:1445— docDrawParagraph has cyclomatic complexity 55 and cognitive complexity 121; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function docApplyPap (cyclomatic 45, cognitive 19) web/file_viewer/src/prose-doc.js:339— docApplyPap has cyclomatic complexity 45 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function vwProseDeclare (cyclomatic 44, cognitive 55) web/file_viewer/src/prose-draw.js:168— vwProseDeclare has cyclomatic complexity 44 and cognitive complexity 55; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function rtfBuildTable (cyclomatic 41, cognitive 97) web/file_viewer/src/prose-rtf.js:431— rtfBuildTable has cyclomatic complexity 41 and cognitive complexity 97; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function readPackage (cyclomatic 37, cognitive 45) REDACTED:527— readPackage has cyclomatic complexity 37 and cognitive complexity 45; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function docApplyChp (cyclomatic 37, cognitive 13) web/file_viewer/src/prose-doc.js:297— docApplyChp has cyclomatic complexity 37 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function executeAction (cyclomatic 34, cognitive 15) web/milkdown-editor/editor.src.js:1341— executeAction has cyclomatic complexity 34 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function docStyles (cyclomatic 30, cognitive 42) web/file_viewer/src/prose-doc.js:785— docStyles has cyclomatic complexity 30 and cognitive complexity 42; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 30, cognitive 36) web/file_viewer/src/docx-pages.js:306— (anonymous) has cyclomatic complexity 30 and cognitive complexity 36; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function docCompound (cyclomatic 29, cognitive 35) web/file_viewer/src/prose-doc.js:67— docCompound has cyclomatic complexity 29 and cognitive complexity 35; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function odtLabel (cyclomatic 28, cognitive 49) web/file_viewer/src/prose-odt.js:421— odtLabel has cyclomatic complexity 28 and cognitive complexity 49; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function docPieces (cyclomatic 27, cognitive 59) web/file_viewer/src/prose-doc.js:581— docPieces has cyclomatic complexity 27 and cognitive complexity 59; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function docDrawStory (cyclomatic 25, cognitive 41) web/file_viewer/src/prose-doc.js:1622— docDrawStory has cyclomatic complexity 25 and cognitive complexity 41; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function docBlip (cyclomatic 24, cognitive 23) web/file_viewer/src/prose-doc.js:1074— docBlip has cyclomatic complexity 24 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function docLists (cyclomatic 23, cognitive 35) web/file_viewer/src/prose-doc.js:917— docLists has cyclomatic complexity 23 and cognitive complexity 35; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function vwFormatJson (cyclomatic 22, cognitive 32) web/file_viewer/src/app.js:471— vwFormatJson has cyclomatic complexity 22 and cognitive complexity 32; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function odtInlineNode (cyclomatic 22, cognitive 28) web/file_viewer/src/prose-odt.js:838— odtInlineNode has cyclomatic complexity 22 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function rtfClosePara (cyclomatic 22, cognitive 22) web/file_viewer/src/prose-rtf.js:293— rtfClosePara has cyclomatic complexity 22 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function disarm (cyclomatic 21, cognitive 30) REDACTED:802— disarm has cyclomatic complexity 21 and cognitive complexity 30; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function tokens (cyclomatic 21, cognitive 26) REDACTED:1277— tokens has cyclomatic complexity 21 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function docChpBag (cyclomatic 21, cognitive 19) web/file_viewer/src/prose-doc.js:1399— docChpBag has cyclomatic complexity 21 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function rtfCharBag (cyclomatic 21, cognitive 19) web/file_viewer/src/prose-rtf.js:173— rtfCharBag has cyclomatic complexity 21 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity· Complex function walk (cyclomatic 20, cognitive 34) · ×1
Complex function walk (cyclomatic 20, cognitive 34) web/file_viewer/src/find.js:118— walk has cyclomatic complexity 20 and cognitive complexity 34; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function renderShape (cyclomatic 20, cognitive 21) web/file_viewer/src/odp.js:225— renderShape has cyclomatic complexity 20 and cognitive complexity 21; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function vwNumberPages (cyclomatic 19, cognitive 35) web/file_viewer/src/docx-pages.js:480— vwNumberPages has cyclomatic complexity 19 and cognitive complexity 35; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function styleTheDesignGives (cyclomatic 19, cognitive 26) REDACTED:236— styleTheDesignGives has cyclomatic complexity 19 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function rtfTextOut (cyclomatic 19, cognitive 25) web/file_viewer/src/prose-rtf.js:973— rtfTextOut has cyclomatic complexity 19 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function docParagraph (cyclomatic 19, cognitive 21) web/file_viewer/src/prose-doc.js:1285— docParagraph has cyclomatic complexity 19 and cognitive complexity 21; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function linesLeftWhole (cyclomatic 19, cognitive 20) REDACTED:377— linesLeftWhole has cyclomatic complexity 19 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function normalize (cyclomatic 19, cognitive 19) web/file_transfer/js/core/i18n.js:14— normalize has cyclomatic complexity 19 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function docPapBag (cyclomatic 19, cognitive 17) web/file_viewer/src/prose-doc.js:1419— docPapBag has cyclomatic complexity 19 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function docLabel (cyclomatic 18, cognitive 26) web/file_viewer/src/prose-doc.js:1019— docLabel has cyclomatic complexity 18 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function addTransferItem (cyclomatic 18, cognitive 25) web/file_transfer/js/features/transfer/transfers.js:104— addTransferItem has cyclomatic complexity 18 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function odtBag (cyclomatic 18, cognitive 25) web/file_viewer/src/prose-odt.js:307— odtBag has cyclomatic complexity 18 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
REDACTED: 2644 lines of code REDACTED:1— REDACTED has 2644 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· web/file_viewer/src/prose-doc.js · ×1
web/file_viewer/src/prose-doc.js: 1808 lines of code web/file_viewer/src/prose-doc.js:1— web/file_viewer/src/prose-doc.js has 1808 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· web/milkdown-editor/editor.src.js · ×1
web/milkdown-editor/editor.src.js: 1752 lines of code web/milkdown-editor/editor.src.js:1— web/milkdown-editor/editor.src.js has 1752 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· web/file_viewer/src/prose-rtf.js · ×1
web/file_viewer/src/prose-rtf.js: 1097 lines of code web/file_viewer/src/prose-rtf.js:1— web/file_viewer/src/prose-rtf.js has 1097 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· web/file_viewer/src/prose-odt.js · ×1
web/file_viewer/src/prose-odt.js: 1013 lines of code web/file_viewer/src/prose-odt.js:1— web/file_viewer/src/prose-odt.js has 1013 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· web/code-editor/editor.src.js · ×1
web/code-editor/editor.src.js: 701 lines of code web/code-editor/editor.src.js:1— web/code-editor/editor.src.js has 701 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· web/file_transfer/js/features/upload/upload.js · ×1
web/file_transfer/js/features/upload/upload.js: 586 lines of code web/file_transfer/js/features/upload/upload.js:1— web/file_transfer/js/features/upload/upload.js has 586 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 582 lines of code REDACTED:1— REDACTED has 582 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· web/file_viewer/src/docx-pages.js · ×1
web/file_viewer/src/docx-pages.js: 564 lines of code web/file_viewer/src/docx-pages.js:1— web/file_viewer/src/docx-pages.js has 564 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
web/file_viewer/src/app.js: 525 lines of code web/file_viewer/src/app.js:1— web/file_viewer/src/app.js has 525 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· web/file_viewer/src/find.js · ×1
web/file_viewer/src/find.js: 433 lines of code web/file_viewer/src/find.js:1— web/file_viewer/src/find.js has 433 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files· web/file_viewer/src/prose-draw.js · ×1
web/file_viewer/src/prose-draw.js: 401 lines of code web/file_viewer/src/prose-draw.js:1— web/file_viewer/src/prose-draw.js has 401 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R6 · Tooling· No test, lint or typecheck script · ×1
No test, lint or typecheck script — test ✗ · lint ✗ · typecheck ✗ — read from this repository's package.json scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.
Unused dependency 'codemirror' web/code-editor/package.json:11— Declared in web/code-editor/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency '@milkdown/ctx' web/milkdown-editor/package.json:22— Declared in web/milkdown-editor/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Duplicated predicate libs/twain/src/main/java/io/noties/markwon/prism4j/syntax/Prism4jThemeDarkula.java:69— `isOfType("important", type, alias) || isOfType("bold", type, alias)` appears character-identically in 2 files — libs/twain/src/main/java/io/noties/markwon/prism4j/syntax/Prism4jThemeDarkula.java, libs/twain/src/main/java/io/noties/markwon/prism4j/syntax/Prism4jThemeDefault.java. 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 web/file_transfer/js/features/auth.js:42— `data?.message || i18n.t('files.loadFailed', '加载失败')` appears character-identically in 2 files — web/file_transfer/js/features/auth.js, web/file_transfer/js/features/files/files.js. 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 web/code-editor/editor.src.js:660— `pendingContent !== null && pendingContent !== undefined` appears character-identically in 2 files — web/code-editor/editor.src.js, web/milkdown-editor/editor.src.js. 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 web/file_transfer/js/features/transfer/transfers.js:196— `t.status === 'uploading' || t.status === 'queued'` appears character-identically in 2 files — web/file_transfer/js/features/transfer/transfers.js, web/file_transfer/js/features/upload/upload.js. 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 web/code-editor/editor.src.js:171— `window.Android && window.Android.onContentChanged` appears character-identically in 2 files — web/code-editor/editor.src.js, web/milkdown-editor/editor.src.js. 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 web/code-editor/editor.src.js:178— `window.Android && window.Android.onEditorReady` appears character-identically in 2 files — web/code-editor/editor.src.js, web/milkdown-editor/editor.src.js. 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 web/file_transfer/js/core/api.js:121— `xhr.status === 200 && payload && payload.success` appears character-identically in 2 files — web/file_transfer/js/core/api.js, web/file_transfer/js/features/chat/fileUpload.js. 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 core/network/src/main/java/com/shifenmiao/network/service/NetworkInfoService.kt:214— `!address.isLoopbackAddress && address is Inet4Address` appears character-identically in 2 files — core/network/src/main/java/com/shifenmiao/network/service/NetworkInfoService.kt, feature/file-transfer/src/main/java/com/wanbaohe/file_transfer/util/NetworkUtils.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 feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessSetupScreen.kt:236— `!busy && (!draft.hasChanges || issue == null)` appears character-identically in 3 files — feature/chess/src/main/java/com/wanbaohe/chess/screen/ChessSetupScreen.kt, feature/gomoku/src/main/java/com/wanbaohe/gomoku/screen/GomokuSetupScreen.kt, feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/XiangqiSetupScreen.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 feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:236— `!component.isLoading && component.type != null` appears character-identically in 3 files — feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt, feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/GifToolsContent.kt, feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.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 feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt:105— `!component.uris.isNullOrEmpty() && workspaceState.currentTabIndex == 0` appears character-identically in 2 files — feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt, feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/WeightResizeContent.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 feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupProjectStore.kt:382— `!destination.isFile || destination.length() != pending.length() || checksum(destination, cancellation) != digestHex` appears character-identically in 2 files — feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupProjectStore.kt, feature/text-card/src/main/java/com/wanbaohe/textcard/data/project/AndroidTextCardProjectStore.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 feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupProjectStore.kt:569— `!directory.mkdirs() || !directory.isDirectory` appears character-identically in 2 files — feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupProjectStore.kt, feature/text-card/src/main/java/com/wanbaohe/textcard/data/project/AndroidTextCardProjectStore.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 feature/dsh-client/src/main/java/com/wanbaohe/dsh/session/CommandStore.kt:109— `!disposed && snapshot.phase == ConnectionPhase.Ready && snapshot.generation > lastReadyGeneration` appears character-identically in 3 files — feature/dsh-client/src/main/java/com/wanbaohe/dsh/session/CommandStore.kt, feature/dsh-client/src/main/java/com/wanbaohe/dsh/session/SessionStore.kt, feature/dsh-client/src/main/java/com/wanbaohe/dsh/session/WorkspaceStore.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 core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/editor/EditorLayerBox.kt:488— `!dragging && (root - startRoot).getDistance() > viewConfiguration.touchSlop` appears character-identically in 2 files — core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/editor/EditorLayerBox.kt, feature/text-card/src/main/java/com/wanbaohe/textcard/presentation/editor/TextBlockTransformHandles.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 feature/file-transfer/src/main/java/com/wanbaohe/file_transfer/screen/FileTransferScreen.kt:485— `!file.exists() || !file.isFile || !file.canRead()` appears character-identically in 2 files — feature/file-transfer/src/main/java/com/wanbaohe/file_transfer/screen/FileTransferScreen.kt, feature/file-transfer/src/main/java/com/wanbaohe/file_transfer/screen/components/ChatMessageItem.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 feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupProjectStore.kt:542— `!file.isFile || file.length() != bytes.size.toLong() || File(file.path + ".new").exists() || File(file.path + ".bak").exists()` appears character-identically in 2 files — feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupProjectStore.kt, feature/text-card/src/main/java/com/wanbaohe/textcard/data/project/AndroidTextCardProjectStore.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 feature/chess/src/main/java/com/wanbaohe/chess/ui/board/ChessBoard.kt:196— `!forExport && (candidateTargets.isNotEmpty() || lastMove != null)` appears character-identically in 3 files — feature/chess/src/main/java/com/wanbaohe/chess/ui/board/ChessBoard.kt, feature/gomoku/src/main/java/com/wanbaohe/gomoku/ui/board/GomokuBoard.kt, feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/ui/board/XiangqiBoard.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 feature/ai/src/main/java/com/shifenmiao/ai/component/AIDuelChatComponent.kt:367— `!forceUpdate && currentTime - lastRenderTime < RENDER_THROTTLE_MS` appears character-identically in 2 files — feature/ai/src/main/java/com/shifenmiao/ai/component/AIDuelChatComponent.kt, feature/ai/src/main/java/com/shifenmiao/ai/component/StreamContentProcessor.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 feature/file-browser/src/main/java/com/wanbaohe/file/browser/ui/RecentAccessGridItem.kt:65— `!isFolder && extension in IMAGE_EXTENSIONS` appears character-identically in 2 files — feature/file-browser/src/main/java/com/wanbaohe/file/browser/ui/RecentAccessGridItem.kt, feature/file-browser/src/main/java/com/wanbaohe/file/browser/ui/RecentAccessListItem.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 feature/file-browser/src/main/java/com/wanbaohe/file/browser/ui/RecentAccessGridItem.kt:66— `!isFolder && extension in VIDEO_EXTENSIONS` appears character-identically in 2 files — feature/file-browser/src/main/java/com/wanbaohe/file/browser/ui/RecentAccessGridItem.kt, feature/file-browser/src/main/java/com/wanbaohe/file/browser/ui/RecentAccessListItem.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 feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiGameComponent.kt:644— `!isLocalEnginePackaged || localEngineInstallState.value !is XiangqiEngineWeights.InstallState.Installed` appears character-identically in 2 files — feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiGameComponent.kt, feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/router/screenLogic/XiangqiRouterComponent.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 core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/AdaptiveBottomScaffoldLayoutScreen.kt:160— `!isPortrait && canShowScreenData && showActionsInTopAppBar` appears character-identically in 2 files — core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/AdaptiveBottomScaffoldLayoutScreen.kt, core/ui/src/main/kotlin/com/wanbaohe/core/ui/widget/AdaptiveLayoutScreen.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 feature/chess/src/main/java/com/wanbaohe/chess/application/dto/GamePreparation.kt:54— `!it.isNonChat && it != AiRequestProtocol.LOCAL_ON_DEVICE` appears character-identically in 2 files — feature/chess/src/main/java/com/wanbaohe/chess/application/dto/GamePreparation.kt, feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/dto/GamePreparation.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 feature/marktodo/src/main/java/com/shifenmiao/marktodo/screenLogic/CategoryDetailComponent.kt:239— `!newValue && wasPending && task.isCompleted` appears character-identically in 2 files — feature/marktodo/src/main/java/com/shifenmiao/marktodo/screenLogic/CategoryDetailComponent.kt, feature/marktodo/src/main/java/com/shifenmiao/marktodo/screenLogic/MarkTodoComponent.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 core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/ChoicePickerRenderer.kt:86— `parseOptions` 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 core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/ColorPickerRenderer.kt:104— `parseColors` 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 core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/RadioGroupRenderer.kt:103— `parseOptions` 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 core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/builtin/input/SelectorSupport.kt:76— `parseSelectorOptions` 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 core/base/src/main/java/com/shifenmiao/base/utils/DateUtils.kt:102— `formatDate` 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 core/database/src/main/java/com/shifenmiao/database/data_draft/DataDraftHelper.kt:157— `decodeCategoryIds` 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 core/domain/src/main/kotlin/com/t8rin/imagetoolbox/core/domain/model/ColorPalette.kt:109— `encode` 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 core/domain/src/main/kotlin/com/t8rin/imagetoolbox/core/domain/model/ColorPalette.kt:115— `decode` 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 core/image-generation/src/main/java/com/shifenmiao/imagegeneration/repository/ImageProviderConfigRepository.kt:86— `loadConfigs` 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 core/model/src/main/java/com/shifenmiao/model/JsonMaps.kt:79— `parseLooseJsonObject` 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 core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/data/FontDownloadStore.kt:167— `readDownloadedIds` 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 core/storage/src/main/java/com/shifenmiao/storage/ColorPickHistoryStore.kt:48— `loadHistory` 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 core/storage/src/main/java/com/shifenmiao/storage/ScanHistoryStore.kt:43— `loadHistory` 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 core/utils/src/main/java/com/wanbaohe/com/string/TimeFormatter.kt:87— `formatDate` 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 core/utils/src/main/java/com/wanbaohe/com/string/TimeFormatter.kt:146— `formatDateTime` 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 core/weather/src/main/java/com/wanbaohe/core/weather/domain/model/PlaceWeather.kt:52— `clientUpdatedAtMillis` 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 feature/ai/src/main/java/com/shifenmiao/ai/a2ui/A2uiMarkdownPlugin.kt:53— `decodeA2uiSource` 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 feature/ai/src/main/java/com/shifenmiao/ai/agent/AgentLoopExecutor.kt:517— `serializeToolCallsChain` 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 feature/ai/src/main/java/com/shifenmiao/ai/agent/AgentLoopExecutor.kt:529— `deserializeToolCallsChain` 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 feature/ai/src/main/java/com/shifenmiao/ai/agent/AgentLoopExecutor.kt:933— `parseFromJson` 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 feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/AgentToolRegistry.kt:515— `parseDeepLinks` 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 feature/ai/src/main/java/com/shifenmiao/ai/agent/tool/ConversationToolPolicyRepository.kt:93— `decodeStringList` 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 feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIAgentComponent.kt:904— `decodeDraftToolNames` 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 feature/ai/src/main/java/com/shifenmiao/ai/component/CreateAIPromptComponent.kt:939— `decodeDraftToolNames` 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 feature/ai/src/main/java/com/shifenmiao/ai/execution/presenter/AiExecutionPresenter.kt:234— `extractDeepLinks` 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.
+ 15 more in this group — see findings.md.
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×29
Projects may be oversized for their cohesion core/resources/build.gradle.kts:1— `core/resources` (258479 LoC, 812 module-visible types across 7 directories) overshoots its size bounds. 29 of 155 build unit(s) (Gradle, npm) overshoot their size bounds, lowering Project Cohesion to 6.5/10. 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.
Projects may be oversized for their cohesion core/weather/build.gradle.kts:1— `core/weather` (228941 LoC, 545 module-visible types across 12 directories) overshoots its size bounds. 29 of 155 build unit(s) (Gradle, npm) overshoot their size bounds, lowering Project Cohesion to 6.5/10. 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.
Projects may be oversized for their cohesion core/ui/build.gradle.kts:1— `core/ui` (75856 LoC, 1035 module-visible types across 79 directories) overshoots its size bounds. 29 of 155 build unit(s) (Gradle, npm) overshoot their size bounds, lowering Project Cohesion to 6.5/10. 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.
Projects may be oversized for their cohesion feature/ai/build.gradle.kts:1— `feature/ai` (63359 LoC, 635 module-visible types across 48 directories) overshoots its size bounds. 29 of 155 build unit(s) (Gradle, npm) overshoot their size bounds, lowering Project Cohesion to 6.5/10. 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.
Projects may be oversized for their cohesion core/database/build.gradle.kts:1— `core/database` (15365 LoC, 255 module-visible types across 100 directories) overshoots its size bounds. 29 of 155 build unit(s) (Gradle, npm) overshoot their size bounds, lowering Project Cohesion to 6.5/10. 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.
Projects may be oversized for their cohesion core/model/build.gradle.kts:1— `core/model` (14206 LoC, 922 module-visible types across 65 directories) overshoots its size bounds. 29 of 155 build unit(s) (Gradle, npm) overshoot their size bounds, lowering Project Cohesion to 6.5/10. 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.
Projects may be oversized for their cohesion core/domain/build.gradle.kts:1— `core/domain` (7227 LoC, 841 module-visible types across 20 directories) overshoots its size bounds. 29 of 155 build unit(s) (Gradle, npm) overshoot their size bounds, lowering Project Cohesion to 6.5/10. 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.
Projects may be oversized for their cohesion core/filters/build.gradle.kts:1— `core/filters` (24798 LoC, 829 module-visible types across 13 directories) overshoots its size bounds. 29 of 155 build unit(s) (Gradle, npm) overshoot their size bounds, lowering Project Cohesion to 6.5/10. 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.
Projects may be oversized for their cohesion feature/common/build.gradle.kts:1— `feature/common` (31908 LoC, 354 module-visible types across 35 directories) overshoots its size bounds. 29 of 155 build unit(s) (Gradle, npm) overshoot their size bounds, lowering Project Cohesion to 6.5/10. 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.
Projects may be oversized for their cohesion feature/pdf-tools/build.gradle.kts:1— `feature/pdf-tools` (11899 LoC, 158 module-visible types across 44 directories) overshoots its size bounds. 29 of 155 build unit(s) (Gradle, npm) overshoot their size bounds, lowering Project Cohesion to 6.5/10. 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.
Projects may be oversized for their cohesion libs/diagram/build.gradle.kts:1— `libs/diagram` (23697 LoC, 261 module-visible types across 16 directories) overshoots its size bounds. 29 of 155 build unit(s) (Gradle, npm) overshoot their size bounds, lowering Project Cohesion to 6.5/10. 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.
Projects may be oversized for their cohesion libs/markdown/build.gradle.kts:1— `libs/markdown` (16891 LoC, 392 module-visible types across 22 directories) overshoots its size bounds. 29 of 155 build unit(s) (Gradle, npm) overshoot their size bounds, lowering Project Cohesion to 6.5/10. 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.
Projects may be oversized for their cohesion feature/dsh-client/build.gradle.kts:1— `feature/dsh-client` (18450 LoC, 383 module-visible types across 9 directories) overshoots its size bounds. 29 of 155 build unit(s) (Gradle, npm) overshoot their size bounds, lowering Project Cohesion to 6.5/10. 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.
Projects may be oversized for their cohesion feature/filters/build.gradle.kts:1— `feature/filters` (18655 LoC, 375 module-visible types across 18 directories) overshoots its size bounds. 29 of 155 build unit(s) (Gradle, npm) overshoot their size bounds, lowering Project Cohesion to 6.5/10. 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.
Projects may be oversized for their cohesion feature/markup-layers/build.gradle.kts:1— `feature/markup-layers` (18629 LoC, 193 module-visible types across 29 directories) overshoots its size bounds. 29 of 155 build unit(s) (Gradle, npm) overshoot their size bounds, lowering Project Cohesion to 6.5/10. 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.
Projects may be oversized for their cohesion feature/settings/build.gradle.kts:1— `feature/settings` (15953 LoC, 155 module-visible types across 25 directories) overshoots its size bounds. 29 of 155 build unit(s) (Gradle, npm) overshoot their size bounds, lowering Project Cohesion to 6.5/10. 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.
Projects may be oversized for their cohesion feature/xiangqi/build.gradle.kts:1— `feature/xiangqi` (15507 LoC, 295 module-visible types across 19 directories) overshoots its size bounds. 29 of 155 build unit(s) (Gradle, npm) overshoot their size bounds, lowering Project Cohesion to 6.5/10. 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.
Projects may be oversized for their cohesion feature/chess/build.gradle.kts:1— `feature/chess` (13276 LoC, 280 module-visible types across 18 directories) overshoots its size bounds. 29 of 155 build unit(s) (Gradle, npm) overshoot their size bounds, lowering Project Cohesion to 6.5/10. 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.
Projects may be oversized for their cohesion feature/gomoku/build.gradle.kts:1— `feature/gomoku` (12509 LoC, 261 module-visible types across 18 directories) overshoots its size bounds. 29 of 155 build unit(s) (Gradle, npm) overshoot their size bounds, lowering Project Cohesion to 6.5/10. 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.
Projects may be oversized for their cohesion feature/app/build.gradle.kts:1— `feature/app` (11724 LoC, 214 module-visible types across 17 directories) overshoots its size bounds. 29 of 155 build unit(s) (Gradle, npm) overshoot their size bounds, lowering Project Cohesion to 6.5/10. 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.
Projects may be oversized for their cohesion core/base/build.gradle.kts:1— `core/base` (6611 LoC, 89 module-visible types across 19 directories) overshoots its size bounds. 29 of 155 build unit(s) (Gradle, npm) overshoot their size bounds, lowering Project Cohesion to 6.5/10. 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.
Projects may be oversized for their cohesion feature/marktodo/build.gradle.kts:1— `feature/marktodo` (9934 LoC, 224 module-visible types across 10 directories) overshoots its size bounds. 29 of 155 build unit(s) (Gradle, npm) overshoot their size bounds, lowering Project Cohesion to 6.5/10. 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.
Projects may be oversized for their cohesion feature/text-card/build.gradle.kts:1— `feature/text-card` (10772 LoC, 114 module-visible types across 16 directories) overshoots its size bounds. 29 of 155 build unit(s) (Gradle, npm) overshoot their size bounds, lowering Project Cohesion to 6.5/10. 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.
Projects may be oversized for their cohesion feature/watermarking/build.gradle.kts:1— `feature/watermarking` (6172 LoC, 131 module-visible types across 17 directories) overshoots its size bounds. 29 of 155 build unit(s) (Gradle, npm) overshoot their size bounds, lowering Project Cohesion to 6.5/10. 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.
Projects may be oversized for their cohesion feature/webview/build.gradle.kts:1— `feature/webview` (8992 LoC, 86 module-visible types across 11 directories) overshoots its size bounds. 29 of 155 build unit(s) (Gradle, npm) overshoot their size bounds, lowering Project Cohesion to 6.5/10. 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.
Fat interface: A2uiRendererModule (36 abstract methods) core/a2ui/src/main/java/com/wanbaohe/a2ui/di/A2uiRendererModule.kt:67— `A2uiRendererModule` declares 36 abstract methods: `bindColumnRenderer`, `bindRowRenderer`, `bindCardRenderer`, `bindListRenderer`, `bindButtonRenderer`, `bindTextFieldRenderer`, `bindCheckboxRenderer`, `bindChoicePickerRenderer`, `bindSliderRenderer`, `bindDateInputRenderer`, `bindTimeInputRenderer`, `bindTextRenderer`, `bindImageRenderer`, `bindIconRenderer`, `bindDividerRenderer`, `bindVideoRenderer`, `bindAudioPlayerRenderer`, `bindTabsRenderer`, `bindProgressRenderer`, `bindModalRenderer`, `bindSpacerRenderer`, `bindSwitchRenderer`, `bindStepperRenderer`, `bindRadioGroupRenderer`, `bindRowSelectorRenderer`, `bindColumnSelectorRenderer`, `bindGridSelectorRenderer`, `bindListSelectorRenderer`, `bindColorPickerRenderer`, `bindLocationPickerRenderer`, `bindImagePickerRenderer`, `bindFilePickerRenderer`, `bindFolderPickerRenderer`, `bindRangeSliderRenderer`, `bindRatingRenderer`, `bindBadgeRenderer`. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: AppDatabase (25 abstract methods) core/database/src/main/java/com/shifenmiao/database/AppDatabase.kt:136— `AppDatabase` declares 25 abstract methods: `blogArticleDao`, `searchResultDao`, `imageDao`, `aiEngineDao`, `aiModelDao`, `itemEntityDao`, `itemDataDao`, `messageDao`, `conversationDao`, `agentDao`, `chatPromptDao`, `categoryDao`, `activityLogDao`, `toolCallTaskDao`, `themePresetDao`, `toolCatalogDao`, `conversationToolPolicyDao`, `toolBindingDao`, `ttsAudioEntryDao`, `passwordVaultEntryDao`, `passwordVaultCategoryDao`, `authCodeDao`, `memoryEntryDao`, `skillDao`, `conversationMemoryPolicyDao`. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: FeatureDatabase (46 abstract methods) core/database/src/main/java/com/shifenmiao/database/FeatureDatabase.kt:185— `FeatureDatabase` declares 46 abstract methods: `paddleOcrTaskDao`, `docConvertTaskDao`, `markTodoCategoryDao`, `markTodoTaskDao`, `markTodoDashboardDao`, `markTodoTagDao`, `scheduleEventDao`, `scheduleProviderBindingDao`, `scheduleSyncStateDao`, `frequencyEventDao`, `personalMilestoneDao`, `countdownEventDao`, `milestoneAiInsightDao`, `watermarkTemplateDao`, `idPhotoSizeDao`, `altitudeRecordDao`, `speedTestRecordDao`, `speedTestConfigDao`, `bookkeepingCategoryDao`, `bookkeepingRecordDao`, `teleprompterScriptDao`, `dataDraftDao`, `xiangqiGameDao`, `xiangqiPlyDao`, `xiangqiAiTaskDao`, `gomokuGameDao`, `gomokuPlyDao`, `gomokuAiTaskDao`, `chessGameDao`, `chessPlyDao`, `chessAiTaskDao`, `wheelDao`, `chatMessageDao`, `chatSessionDao`, `recentAccessDao`, `blessingRecordDao`, `blessingWishDao`, `blessingTabConfigDao`, `poemDao`, `habitDao`, and 6 more. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: AiEngineDao (20 abstract methods) core/database/src/main/java/com/shifenmiao/database/ai/dao/AiEngineDao.kt:27— `AiEngineDao` declares 20 abstract methods: `getAllEngines`, `getAllEnginesList`, `getEnginesByUserLevel`, `getEnginesListByUserLevel`, `getEngineByName`, `getEnginesByName`, `getEngineById`, `getEngineByNameAndProtocol`, `updateEngineSelectedModelName`, `updateEnginesSelectedModelNameByNameAndCurrentModelName`, `insertEngine`, `insertEngines`, `insertEnginesIgnore`, `updateEngine`, `deleteEngine`, `deleteEngineByNameAndProtocol`, `renameEngineName`, `deleteAllEngines`, `getEngineCount`, `clearProxyRoutesByNames`. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: AiModelDao (19 abstract methods) core/database/src/main/java/com/shifenmiao/database/ai/dao/AiModelDao.kt:27— `AiModelDao` declares 19 abstract methods: `getAllModels`, `getAllModelsList`, `getModelById`, `getMaxSortOrderForEngine`, `getModelByNameAndEngineName`, `getModelByRemoteIdAndEngineName`, `getModelsByProvider`, `getModelsByEngineName`, `getModelsByEngineNameFlow`, `getFirstAvailableModel`, `getFirstAvailableModelForEngine`, `deleteModelsByEngineName`, `updateModelsEngineName`, `updateModelsProvider`, `insertModel`, `insertModels`, `updateModel`, `deleteModel`, `deleteAllModels`. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: ConversationDao (16 abstract methods) core/database/src/main/java/com/shifenmiao/database/ai/dao/ConversationDao.kt:31— `ConversationDao` declares 16 abstract methods: `insertReplace`, `update`, `getConversationById`, `getConversationByConversationId`, `deleteConversationById`, `deleteConversationByConversationId`, `deleteAll`, `getLastConversationByType`, `getLastHiddenConversationByType`, `getConversationsByType`, `getVisibleConversationsByType`, `getLastConversationByEntry`, `observeConversation`, `observeAllConversations`, `observeHistoryConversations`, `updateTitle`. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: MessageDao (40 abstract methods) core/database/src/main/java/com/shifenmiao/database/ai/dao/MessageDao.kt:36— `MessageDao` declares 40 abstract methods: `insertReplace`, `insertNew`, `delete`, `deleteMessagesByConversationId`, `deleteMessagesByCompletionId`, `updateTitlesByConversationId`, `getMessagesForConversation`, `getMessagesBeforeCurrentTime`, `insertAll`, `getMessagesByConversationId`, `getMessagesForPage`, `getEarliestMessagesForPage`, `getHistoryMessageList`, `getEarliestMessagesForPageFlow`, `deleteAll`, `getMessagesFlow`, `getMessagesFlowPaged`, `getMessageListOnce`, `getMessagesBeforeCurrentTimeFlow`, `getById`, `searchQuestionOrAnswer`, `updateMessageEntityExpiredByCompletionId`, `updateStreamDraft`, `getMessagesByFinishReason`, `updateMessageAnswerAndFinishReason`, `getMessageFinishReason`, `deleteMessagesByIds`, `queryQuestionAndAnswerByCompletionId`, `findLatestStreamAnswer`, `getActiveMessageCountsByConversationIds`, `getMessageWithImages`, `getMessagesWithImagesByConversationId`, `getMessageWithSearchResults`, `getMessagesWithSearchResultsByConversationId`, `getMessageWithAllRelations`, `getMessagesWithAllRelationsByConversationId`, `getRecentDistinctQuestions`, `getTokenUsageSummary`, `getTokenUsageByModel`, `getTopTokenQueries`. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: PromptDao (21 abstract methods) core/database/src/main/java/com/shifenmiao/database/chat_prompt/dao/PromptDao.kt:32— `PromptDao` declares 21 abstract methods: `getPromptById`, `getPromptByRemoteId`, `getPromptByDocumentId`, `backfillDocumentIdIfMissing`, `getAllPrompts`, `getAllPromptsFlow`, `getPromptsBySource`, `getPromptsBySourceFlow`, `getPromptBySource`, `getPromptLinkByItemId`, `getItemIdByPromptId`, `getItemIdsByPromptId`, `insertPromptLink`, `deletePromptLinkByItemId`, `deletePromptById`, `deleteBySource`, `deleteAll`, `insertPrompt`, `updatePromptPreservingRemoteFields`, `getSystemPromptByKey`, `getPromptsByCategoryId`. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: WheelDao (24 abstract methods) core/database/src/main/java/com/shifenmiao/database/decision_wheel/dao/WheelDao.kt:30— `WheelDao` declares 24 abstract methods: `insertWheel`, `updateWheel`, `deleteWheel`, `observeWheelsWithOptions`, `getWheelById`, `observeRecentWheelsWithOptions`, `updateWheelUsage`, `insertOption`, `insertOptions`, `updateOption`, `deleteOption`, `getOptionsByWheelId`, `getOptionsByWheelIdFlow`, `deleteOptionsByWheelId`, `updateOptionEnabled`, `resetOptionsEnabled`, `resetAllOptionsEnabled`, `insertHistory`, `getWheelHistory`, `getAllHistory`, `observeAllHistory`, `deleteHistoryByWheelId`, `deleteHistoryById`, `clearAllHistory`. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: ItemDataDao (16 abstract methods) core/database/src/main/java/com/shifenmiao/database/item/dao/ItemDataDao.kt:33— `ItemDataDao` declares 16 abstract methods: `getByItemId`, `observeByItemId`, `getByRemoteId`, `getByDocumentId`, `getById`, `insertIgnore`, `insertOrReplace`, `updateContent`, `updateFromSync`, `insertLink`, `getDataLinkByItemId`, `deleteLinkByItemId`, `getItemIdsByDataId`, `getLinkedItemIds`, `deleteById`, `getBySource`. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: ItemEntityDao (85 abstract methods) core/database/src/main/java/com/shifenmiao/database/item/dao/ItemEntityDao.kt:47— `ItemEntityDao` declares 85 abstract methods: `updateItem`, `getItemEntityById`, `insertItem`, `insertItemIgnore`, `getItemByRemoteId`, `getItemByDocumentId`, `getItemByTitle`, `getItemsByTypeTitleAndSource`, `lastUpdated`, `getItemsByListType`, `updateItemFromSync`, `upsertUserState`, `getUserStateByItemId`, `setFavorited`, `setPinned`, `bumpPinnedAt`, `setCanEdit`, `setRequiresAuth`, `clearAllRequiresAuth`, `observeItemsRequiringAuth`, `ensureClickStat`, `updateClickStat`, `findItemIdByMiniProgramId`, `getCategoryByName`, `getCategoryByDocumentId`, `updateCategoryFromSync`, `updateCategory`, `insertCategory`, `insertItemCategoryCrossRef`, `insertAgent`, `getAgentByRemoteId`, `getAgentByDocumentId`, `getAgentById`, `updateAgentFromSync`, `getAgentLinkByItemId`, `getPromptLinkByItemId`, `getDataLinkByItemId`, `deleteItemDataById`, `insertPrompt`, `getPromptByRemoteId`, and 45 more. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: MarkTodoTaskDao (18 abstract methods) core/database/src/main/java/com/shifenmiao/database/marktodo/dao/MarkTodoTaskDao.kt:30— `MarkTodoTaskDao` declares 18 abstract methods: `getByCategoryId`, `getAll`, `search`, `observeAll`, `getById`, `getByIdIncludingDeleted`, `getSoftDeleted`, `getAllByCategoryIdIncludingDeleted`, `upsert`, `setCompleted`, `setStarred`, `updateSortOrder`, `getMaxSortOrder`, `softDeleteById`, `restoreByIdAndDeletedAt`, `purgeByIdAndDeletedAt`, `deleteAll`, `countByCategoryIdAndNormalizedTitle`. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: BrowserAutomationService (16 abstract methods) core/interfaces/src/main/java/com/shifenmiao/interfaces/browser/BrowserAutomationService.kt:32— `BrowserAutomationService` declares 16 abstract methods: `attach`, `detach`, `navigateToUrl`, `goBack`, `goForward`, `reload`, `getPageInfo`, `extractPageText`, `extractDom`, `executeJavaScript`, `getTabsInfo`, `switchTab`, `createTab`, `closeTab`, `captureScreenshot`, `getSnapshot`. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: BrowserController (16 abstract methods) core/interfaces/src/main/java/com/shifenmiao/interfaces/browser/BrowserAutomationService.kt:82— `BrowserController` declares 16 abstract methods: `loadUrl`, `goBack`, `goForward`, `reload`, `stopLoading`, `addTab`, `closeTab`, `switchTab`, `getCurrentUrl`, `getCurrentTitle`, `canGoBack`, `canGoForward`, `isLoading`, `getTabs`, `evaluateJavascript`, `captureScreenshotBase64`. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: AgentFileService (16 abstract methods) core/model/src/main/java/com/shifenmiao/model/file/AgentFileService.kt:22— `AgentFileService` declares 16 abstract methods: `workspaceRoots`, `browseFiles`, `locateFile`, `globFiles`, `grepFiles`, `statFile`, `readFile`, `readMultipleFiles`, `searchInFile`, `readSearchContext`, `editFile`, `applyTextPatch`, `applyRangePatch`, `manageFile`, `unzipFile`, `resolveContentUriToFile`. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: MarkTodoServiceInterface (18 abstract methods) core/model/src/main/java/com/shifenmiao/model/todo/MarkTodoServiceInterface.kt:32— `MarkTodoServiceInterface` declares 18 abstract methods: `getDashboardDto`, `getTaskDto`, `getInboxTasksDto`, `searchTasks`, `findCategoryByTitle`, `createCategory`, `updateCategory`, `deleteCategory`, `reorderCategories`, `createTask`, `updateTask`, `duplicateTask`, `deleteTask`, `undoDeleteTask`, `toggleTaskComplete`, `toggleTaskStar`, `reorderTasks`, `createTag`. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: ApiService (63 abstract methods) core/network/src/main/java/com/shifenmiao/network/api/ApiService.kt:111— `ApiService` declares 63 abstract methods: `fetchItemsSync`, `fetchBlogs`, `fetchBlog`, `fetchBlogTags`, `createFeedback`, `uploadFile`, `fetchAgent`, `updateAgent`, `fetchPrompt`, `updatePrompt`, `fetchAiConfig`, `submitAiModels`, `fetchAnnouncements`, `checkUpdate`, `fetchTextCardPapers`, `fetchCategories`, `fetchCategoriesSync`, `loginOut`, `sendCode`, `sendCodeNoCheck`, `bindPhone`, `loginByPhone`, `updateRemoteConfig`, `getVoiceAsrWsAuth`, `checkSensitiveWords`, `detectAiText`, `detectAiImage`, `wechatPublicAccountLogin`, `wechatLogin`, `googleLogin`, `login`, `register`, `loginUnified`, `forgotPassword`, `resetPassword`, `applyInvitationCode`, `updateNickname`, `changePassword`, `sendEmailCode`, `sendBindEmailCode`, and 23 more. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: SettingsInteractor (113 abstract methods) core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/domain/SettingsInteractor.kt:46— `SettingsInteractor` declares 113 abstract methods: `toggleAddSequenceNumber`, `toggleAddOriginalFilename`, `setEmojisCount`, `setImagePickerMode`, `toggleAddFileSize`, `setEmoji`, `setFilenamePrefix`, `toggleShowUpdateDialogOnStartup`, `setColorTuple`, `setPresets`, `toggleDynamicColors`, `setBorderWidth`, `toggleAllowImageMonet`, `toggleAmoledMode`, `setNightMode`, `setSaveFolderUri`, `setColorTuples`, `setAlignment`, `setScreenOrder`, `toggleClearCacheOnLaunch`, `toggleGroupOptionsByTypes`, `toggleRandomizeFilename`, `createBackupFile`, `restoreFromBackupFile`, `resetSettings`, `createBackupFilename`, `setFont`, `setFontScale`, `toggleAllowCrashlytics`, `toggleAllowAnalytics`, `toggleAllowBetas`, `toggleDrawContainerShadows`, `toggleLockDrawOrientation`, `setThemeStyle`, `setThemeContrast`, `setThemeColorSpec`, `setExpressiveTheme`, `toggleInvertColors`, `toggleScreensSearchEnabled`, `setCopyToClipboardMode`, and 73 more. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: ThemeSettingService (19 abstract methods) core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/domain/ThemeSettingService.kt:38— `ThemeSettingService` declares 19 abstract methods: `getCurrentTheme`, `listThemes`, `observeThemes`, `switchTheme`, `updateThemeColors`, `setGlassmorphism`, `setLiquidGlass`, `setMeshGradient`, `setGradientStyle`, `setGlassBaseAlpha`, `setGlassBorderAlpha`, `saveUserTheme`, `deleteUserTheme`, `applyThemePreset`, `previewThemePreset`, `setNightMode`, `getNightMode`, `getColorSystem`, `setColorSystem`. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: CloudStorageRepository (26 abstract methods) feature/cloud-storage/src/main/java/com/wanbaohe/cloud/storage/data/CloudStorageRepository.kt:27— `CloudStorageRepository` declares 26 abstract methods: `getConnections`, `getLastConnectionId`, `getLastBucket`, `getLastPrefix`, `getLastSearchQuery`, `getSort`, `saveSort`, `isGridMode`, `saveUiState`, `saveGridMode`, `saveConnection`, `deleteConnection`, `testConnection`, `listBuckets`, `listObjects`, `searchObjects`, `headObject`, `readBytes`, `uploadObject`, `uploadStream`, `createFolder`, `deleteObject`, `renameObject`, `moveObject`, `buildAuthHeaders`, `buildSignedGetUrl`. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: PdfManager (29 abstract methods) feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/domain/PdfManager.kt:41— `PdfManager` declares 29 abstract methods: `extractPages`, `createPdf`, `createSearchablePdf`, `mergePdfs`, `splitPdf`, `removePdfPages`, `rotatePdf`, `rearrangePdf`, `addPageNumbers`, `addWatermark`, `addSignature`, `protectPdf`, `unlockPdf`, `opensWithoutPassword`, `passwordMatches`, `extractPagesFromPdf`, `compressPdf`, `convertToGrayscale`, `repairPdf`, `changePdfMetadata`, `getPdfMetadata`, `stripText`, `cropPdf`, `flattenPdf`, `detectPdfAutoRotations`, `extractImagesFromPdf`, `convertToZip`, `printPdf`, `removeAnnotations`. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: WebViewNavigator (16 abstract methods) feature/webview/src/main/java/com/shifenmiao/webview/browser/WebViewNavigator.kt:26— `WebViewNavigator` declares 16 abstract methods: `attach`, `detach`, `isAttached`, `loadUrl`, `loadHtml`, `goBack`, `goForward`, `reload`, `stopLoading`, `canGoBack`, `canGoForward`, `captureBitmap`, `createPrintDocumentAdapter`, `evaluateJavascript`, `applySettings`, `clearCache`. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
DM2 · Strongly-typed ids· Primitive id on a domain type · ×12
Primitive id on a domain type: Category.documentId core/database/src/main/java/com/shifenmiao/database/item/entity/Category.kt:45— `Category.documentId` 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: ItemAgentLink.itemId core/database/src/main/java/com/shifenmiao/database/item/entity/ItemAgentLink.kt:46— `ItemAgentLink.itemId` 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: ItemAgentLink.agentId core/database/src/main/java/com/shifenmiao/database/item/entity/ItemAgentLink.kt:47— `ItemAgentLink.agentId` 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: ItemCategoryCrossRef.itemId core/database/src/main/java/com/shifenmiao/database/item/entity/ItemCategoryCrossRef.kt:59— `ItemCategoryCrossRef.itemId` 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: ItemCategoryCrossRef.categoryId core/database/src/main/java/com/shifenmiao/database/item/entity/ItemCategoryCrossRef.kt:60— `ItemCategoryCrossRef.categoryId` 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: ItemDataLink.itemId core/database/src/main/java/com/shifenmiao/database/item/entity/ItemDataLink.kt:42— `ItemDataLink.itemId` 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: ItemDataLink.dataId core/database/src/main/java/com/shifenmiao/database/item/entity/ItemDataLink.kt:43— `ItemDataLink.dataId` 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: ItemPromptLink.itemId core/database/src/main/java/com/shifenmiao/database/item/entity/ItemPromptLink.kt:43— `ItemPromptLink.itemId` 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: ItemPromptLink.promptId core/database/src/main/java/com/shifenmiao/database/item/entity/ItemPromptLink.kt:44— `ItemPromptLink.promptId` 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: ItemUserState.itemId core/database/src/main/java/com/shifenmiao/database/item/entity/ItemUserState.kt:55— `ItemUserState.itemId` 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: OnlineGameEvent.roomId feature/chess/src/main/java/com/wanbaohe/chess/application/usecase/OnlineGameSyncUseCase.kt:28— `OnlineGameEvent.roomId` 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: OnlineGameEvent.roomId feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/usecase/OnlinePlayUseCase.kt:60— `OnlineGameEvent.roomId` 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.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 145 significant file(s) lose their only recent owner: feature/settings/src/main/java/com/wanbaohe/setting/ai/screen/AIEngineSettingsDetailScreen.kt, feature/login/src/main/java/com/shifenmiao/login/viewModel/LoginComponent.kt, feature/ai/src/main/java/com/shifenmiao/ai/screen/CreateAIAgentScreen.kt, feature/iching-divination/src/main/java/com/wanbaohe/iching/ui/icons/CoinFrontQian.kt, core/resources/src/main/java/com/t8rin/imagetoolbox/core/resources/icons/line/LineAddToHome.kt, feature/dsh-client/src/main/java/com/wanbaohe/dsh/component/DshRootComponent.kt, feature/survive30s/src/main/java/com/wanbaohe/survive30s/screen/Survive30sScreen.kt, feature/marktodo/src/main/java/com/shifenmiao/marktodo/screen/MarkTodoScreen.kt (+137 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 130 significant file(s) lose their only recent owner: feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuGameComponent.kt, feature/camera-watermark/src/main/java/com/wanbaohe/camera/watermark/presentation/components/StyleCustomizer.kt, feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt, feature/markup-layers/src/main/java/com/wanbaohe/markuplayers/data/project/MarkupDocumentCodec.kt, libs/documentscanner/src/main/java/com/t8rin/documentscanner/DocumentScannerActivity.kt, feature/boardgame/src/main/java/com/wanbaohe/boardgame/export/BoardGameGifExportDialog.kt, feature/lifetime/src/main/java/com/shifenmiao/lifetime/ui/HourglassHeroCard.kt, feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/screen/OnlineMatchScreen.kt (+122 more). Pair on, review, or document these before any departure.
D21 · Naming Consistency· `currentAIEngine` spells `AI` where 78 names in the project spell it `Ai` · ×2
`currentAIEngine` spells `AI` where 78 names in the project spell it `Ai` feature/chess/src/main/java/com/wanbaohe/chess/component/ChessGameComponent.kt:672— 78 of 80 names in project chess spell the token `Ai` (78 of 80; unit: names in project chess containing `Ai`). Peers: GameSummary.whiteAiConfig (feature/chess/src/main/java/com/wanbaohe/chess/application/dto/GameDtos.kt:40); GameSummary.blackAiConfig (feature/chess/src/main/java/com/wanbaohe/chess/application/dto/GameDtos.kt:41); GameDetail.whiteAiConfig (feature/chess/src/main/java/com/wanbaohe/chess/application/dto/GameDtos.kt:68); GameDetail.blackAiConfig (feature/chess/src/main/java/com/wanbaohe/chess/application/dto/GameDtos.kt:69); com.wanbaohe.chess.application.dto.GameAiPlayerConfig (feature/chess/src/main/java/com/wanbaohe/chess/application/dto/GamePreparation.kt:41). Rename to `currentAiEngine`. [rule N6]
`currentAIEngine` spells `AI` where 78 names in the project spell it `Ai` feature/chess/src/main/java/com/wanbaohe/chess/router/screenLogic/ChessRouterComponent.kt:154— 78 of 80 names in project chess spell the token `Ai` (78 of 80; unit: names in project chess containing `Ai`). Peers: GameSummary.whiteAiConfig (feature/chess/src/main/java/com/wanbaohe/chess/application/dto/GameDtos.kt:40); GameSummary.blackAiConfig (feature/chess/src/main/java/com/wanbaohe/chess/application/dto/GameDtos.kt:41); GameDetail.whiteAiConfig (feature/chess/src/main/java/com/wanbaohe/chess/application/dto/GameDtos.kt:68); GameDetail.blackAiConfig (feature/chess/src/main/java/com/wanbaohe/chess/application/dto/GameDtos.kt:69); com.wanbaohe.chess.application.dto.GameAiPlayerConfig (feature/chess/src/main/java/com/wanbaohe/chess/application/dto/GamePreparation.kt:41). Rename to `currentAiEngine`. [rule N6]
D21 · Naming Consistency· `currentAIEngine` spells `AI` where 79 names in the project spell it `Ai` · ×2
`currentAIEngine` spells `AI` where 79 names in the project spell it `Ai` feature/gomoku/src/main/java/com/wanbaohe/gomoku/component/GomokuGameComponent.kt:732— 79 of 81 names in project gomoku spell the token `Ai` (79 of 81; unit: names in project gomoku containing `Ai`). Peers: GameSummary.blackAiConfig (feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/dto/GameDtos.kt:40); GameSummary.whiteAiConfig (feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/dto/GameDtos.kt:41); GameDetail.blackAiConfig (feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/dto/GameDtos.kt:70); GameDetail.whiteAiConfig (feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/dto/GameDtos.kt:71); com.wanbaohe.gomoku.application.dto.GameAiPlayerConfig (feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/dto/GamePreparation.kt:41). Rename to `currentAiEngine`. [rule N6]
`currentAIEngine` spells `AI` where 79 names in the project spell it `Ai` feature/gomoku/src/main/java/com/wanbaohe/gomoku/router/screenLogic/GomokuRouterComponent.kt:151— 79 of 81 names in project gomoku spell the token `Ai` (79 of 81; unit: names in project gomoku containing `Ai`). Peers: GameSummary.blackAiConfig (feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/dto/GameDtos.kt:40); GameSummary.whiteAiConfig (feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/dto/GameDtos.kt:41); GameDetail.blackAiConfig (feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/dto/GameDtos.kt:70); GameDetail.whiteAiConfig (feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/dto/GameDtos.kt:71); com.wanbaohe.gomoku.application.dto.GameAiPlayerConfig (feature/gomoku/src/main/java/com/wanbaohe/gomoku/application/dto/GamePreparation.kt:41). Rename to `currentAiEngine`. [rule N6]
D21 · Naming Consistency· `currentAIEngine` spells `AI` where 83 names in the project spell it `Ai` · ×2
`currentAIEngine` spells `AI` where 83 names in the project spell it `Ai` feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/component/XiangqiGameComponent.kt:585— 83 of 85 names in project xiangqi spell the token `Ai` (83 of 85; unit: names in project xiangqi containing `Ai`). Peers: GameSummary.redAiConfig (feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/dto/GameDtos.kt:40); GameSummary.blackAiConfig (feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/dto/GameDtos.kt:41); GameDetail.redAiConfig (feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/dto/GameDtos.kt:68); GameDetail.blackAiConfig (feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/dto/GameDtos.kt:69); com.wanbaohe.xiangqi.application.dto.GameAiPlayerConfig (feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/dto/GamePreparation.kt:39). Rename to `currentAiEngine`. [rule N6]
`currentAIEngine` spells `AI` where 83 names in the project spell it `Ai` feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/router/screenLogic/XiangqiRouterComponent.kt:156— 83 of 85 names in project xiangqi spell the token `Ai` (83 of 85; unit: names in project xiangqi containing `Ai`). Peers: GameSummary.redAiConfig (feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/dto/GameDtos.kt:40); GameSummary.blackAiConfig (feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/dto/GameDtos.kt:41); GameDetail.redAiConfig (feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/dto/GameDtos.kt:68); GameDetail.blackAiConfig (feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/dto/GameDtos.kt:69); com.wanbaohe.xiangqi.application.dto.GameAiPlayerConfig (feature/xiangqi/src/main/java/com/wanbaohe/xiangqi/application/dto/GamePreparation.kt:39). Rename to `currentAiEngine`. [rule N6]
D21 · Naming Consistency· `produceID` spells `ID` where 154 names in the project spell it `Id` · ×1
`produceID` spells `ID` where 154 names in the project spell it `Id` core/model/src/main/java/com/shifenmiao/model/ai/AIGCInfo.kt:59— 154 of 156 names in project model spell the token `Id` (154 of 156; unit: names in project model containing `Id`). Peers: Wechat.appId (core/model/src/foss/java/com/shifenmiao/model/wechat/Wechat.kt:34); Wechat.corpId (core/model/src/foss/java/com/shifenmiao/model/wechat/Wechat.kt:35); Wechat.register(appId) (core/model/src/foss/java/com/shifenmiao/model/wechat/Wechat.kt:45); Wechat.pay(appId) (core/model/src/foss/java/com/shifenmiao/model/wechat/Wechat.kt:49); Wechat.pay(partnerId) (core/model/src/foss/java/com/shifenmiao/model/wechat/Wechat.kt:49). Rename to `produceId`. [rule N6]
D21 · Naming Consistency· `propagateID` spells `ID` where 154 names in the project spell it `Id` · ×1
`propagateID` spells `ID` where 154 names in the project spell it `Id` core/model/src/main/java/com/shifenmiao/model/ai/AIGCInfo.kt:77— 154 of 156 names in project model spell the token `Id` (154 of 156; unit: names in project model containing `Id`). Peers: Wechat.appId (core/model/src/foss/java/com/shifenmiao/model/wechat/Wechat.kt:34); Wechat.corpId (core/model/src/foss/java/com/shifenmiao/model/wechat/Wechat.kt:35); Wechat.register(appId) (core/model/src/foss/java/com/shifenmiao/model/wechat/Wechat.kt:45); Wechat.pay(appId) (core/model/src/foss/java/com/shifenmiao/model/wechat/Wechat.kt:49); Wechat.pay(partnerId) (core/model/src/foss/java/com/shifenmiao/model/wechat/Wechat.kt:49). Rename to `propagateId`. [rule N6]
D21 · Naming Consistency· `showURL` spells `URL` where 38 names in the project spell it `Url` · ×1
`showURL` spells `URL` where 38 names in the project spell it `Url` core/model/src/main/java/com/shifenmiao/model/pay/alipay/PayParams.kt:77— 38 of 39 names in project model spell the token `Url` (38 of 39; unit: names in project model containing `Url`). Peers: DefaultDataItem.customUrl (core/model/src/main/java/com/shifenmiao/model/DataItem.kt:86); AiEngine.requestUrl (core/model/src/main/java/com/shifenmiao/model/ai/AiEngine.kt:64); AiEngine.proxyUrl (core/model/src/main/java/com/shifenmiao/model/ai/AiEngine.kt:66); AiEngine.isUrlError (core/model/src/main/java/com/shifenmiao/model/ai/AiEngine.kt:76); ImageContent.imageUrl (core/model/src/main/java/com/shifenmiao/model/ai/RequestContent.kt:135). Rename to `showUrl`. [rule N6]
D21 · Naming Consistency· `buildProduceID` spells `ID` where 70 names in the project spell it `Id` · ×1
`buildProduceID` spells `ID` where 70 names in the project spell it `Id` feature/common/src/main/java/com/shifenmiao/common/ai/aigc/AigcInfoGenerator.kt:230— 70 of 71 names in project common spell the token `Id` (70 of 71; unit: names in project common containing `Id`). Peers: AigcInfoGenerator.generateJson(completionId) (feature/common/src/main/java/com/shifenmiao/common/ai/aigc/AigcInfoGenerator.kt:75); AigcInfoGenerator.generateJson(conversationId) (feature/common/src/main/java/com/shifenmiao/common/ai/aigc/AigcInfoGenerator.kt:75); AigcInfoGenerator.generateJson(contentId) (feature/common/src/main/java/com/shifenmiao/common/ai/aigc/AigcInfoGenerator.kt:75); AigcInfoGenerator.generateJson(entryRefId) (feature/common/src/main/java/com/shifenmiao/common/ai/aigc/AigcInfoGenerator.kt:75); AigcInfoGenerator.generate(completionId) (feature/common/src/main/java/com/shifenmiao/common/ai/aigc/AigcInfoGenerator.kt:108). Rename to `buildProduceId`. [rule N6]
D28 · Secrets (history)· Rotate the exposed credentials · ×1
No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
Logging is not universal — Only 3/4 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`.
No SAST REDACTED:7— 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 3 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.
P3 · Security & performance tooling· Dependabot does not watch npm · ×1
Dependabot does not watch npm REDACTED:6— `REDACTED` schedules updates, but no `package-ecosystem` entry covers `npm`, which this tree depends on — so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entry to the `updates:` list.
No release approval gate REDACTED:433— The release is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever the release trigger points at is published to users unreviewed, so a mistagged or unverified commit ships and the only remedy is a follow-up release.
Benchmarks don't track allocations — A JMH/Jetpack Benchmark suite exists but nothing turns on its allocation measurement — allocations (the main way hot code pressures a garbage collector or allocator) aren't being measured.
R7 · Dead Code· Unused module-local declaration 'requestPickImage' · ×1
Unused module-local declaration 'requestPickImage' web/milkdown-editor/editor.src.js:1065— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'hideImageDialog' · ×1
Unused module-local declaration 'hideImageDialog' web/milkdown-editor/editor.src.js:1706— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'hideLinkDialog' · ×1
Unused module-local declaration 'hideLinkDialog' web/milkdown-editor/editor.src.js:1728— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
X2 · Cancellation propagation· Not all functions that make a request accept an AbortSignal or the coroutine's cancellation · ×1
Not all functions that make a request accept an AbortSignal or the coroutine's cancellation — Only 0/18 functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http; Ktor, OkHttp newCall, URL streams) accept an AbortSignal or the coroutine's cancellation or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, a cancelled request, a shutdown, an expired deadline. Take a `signal` () and hand it to the request; in a Kotlin 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.
Hand-rolled JSON/XML parsing via regex feature/ai/src/main/java/com/shifenmiao/ai/error/AiChatError.kt:120— A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JVM code already uses a real parser in the same package; use it here too.
Off the main sequence: WanBaoHe:feature:common — WanBaoHe:feature:common: abstractness 0.07, instability 0.14, distance 0.79 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.
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 253 file(s) — `build-logic/convention/src/main/kotlin/com/t8rin/imagetoolbox/ProjectExtensions.kt`, `core/a2ui/src/main/java/com/wanbaohe/a2ui/catalog/A2uiRenderContext.kt`, `core/a2ui/src/main/java/com/wanbaohe/a2ui/viewModel/A2uiComponent.kt`, `core/crash/src/main/java/com/t8rin/imagetoolbox/core/crash/presentation/screenLogic/CrashComponent.kt`, `core/data/src/main/java/com/t8rin/imagetoolbox/core/data/remote/AndroidRemoteResourcesStore.kt`, … (+248 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
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 01a1e86e-1498-78f1-84e8-241772e5eca7 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 41 · Warnings: 4438 · Recommendations: 169 · Info: 1 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 17-11-2026 @ 07:34 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.